Skip to content

Added a test that the Cortex-A35 module ports refuse user mode - #839

Open
fdesbiens wants to merge 1 commit into
eclipse-threadx:devfrom
fdesbiens:test/a35-module-unsupported-options
Open

fdesbiens wants to merge 1 commit into
eclipse-threadx:devfrom
fdesbiens:test/a35-module-unsupported-options

Conversation

@fdesbiens

Copy link
Copy Markdown
Contributor

#817 removed TXM_MODULE_USER_MODE and TXM_MODULE_MEMORY_PROTECTION from the supported options of the four Cortex-A35 and Cortex-A35 SMP module port headers without a test, so nothing kept either option from returning and a module from again loading as user-mode while running at the Module Manager's exception level.

The new host test compiles the Module Manager's initialization and loaders against each of the four headers, at native 64-bit width because the ports are AArch64. Through the in-place and absolute loaders it expects user mode, alone or with memory protection, to be refused with TXM_MODULE_INVALID_PROPERTIES, and a privileged module, with or without shared external memory access, to load. Memory protection alone is refused on every port, so the test also checks the options the manager initializes from the port. The port's alignment macro makes the loaders report set-but-unused variables, which these targets silence.

4/4 pass on dev with zero warnings in the default, notify-disabled, both stack-checking and trace configurations; 17/17 Module Manager tests pass. With #817 reverted, 4/4 fail, 8 of 27 expectations each; re-adding the options to one header fails only its test. Both loaders take the supported-options check both ways.

eclipse-threadx#817 removed TXM_MODULE_USER_MODE and TXM_MODULE_MEMORY_PROTECTION from the supported
options of the four Cortex-A35 and Cortex-A35 SMP module port headers without a test, so
nothing kept either option from returning and a module from again loading as user-mode
while running at the Module Manager's exception level.

The new host test compiles the Module Manager's initialization and loaders against each
of the four headers, at native 64-bit width because the ports are AArch64. Through the
in-place and absolute loaders it expects user mode, alone or with memory protection, to
be refused with TXM_MODULE_INVALID_PROPERTIES, and a privileged module, with or without
shared external memory access, to load. Memory protection alone is refused on every
port, so the test also checks the options the manager initializes from the port. The
port's alignment macro makes the loaders report set-but-unused variables, which these
targets silence.

4/4 pass on dev with zero warnings in the default, notify-disabled, both stack-checking
and trace configurations; 17/17 Module Manager tests pass. With eclipse-threadx#817 reverted, 4/4 fail,
8 of 27 expectations each; re-adding the options to one header fails only its test. Both
loaders take the supported-options check both ways.

Assisted-by: Claude Code (Opus 5.5) <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant