Skip to content

Don't declare nostack on pushf/pop in is_irq_enabled - #70

Open
Garfield1002 wants to merge 1 commit into
RWTH-OS:mainfrom
Garfield1002:fix/pushf-nostack
Open

Garfield1002 wants to merge 1 commit into
RWTH-OS:mainfrom
Garfield1002:fix/pushf-nostack

Conversation

@Garfield1002

Copy link
Copy Markdown

is_irq_enabled() (src/arch/x86/kernel/irq.rs) reads RFLAGS with pushf; pop {}but declaresoptions(nomem, nostack, preserves_flags). This PR drops nostack`.

Why

The Rust Reference (asm.options.supported-options.nostack):

nostack: The assembly code does not push data to the stack, or write to the stack red-zone (if supported by the target).

pushf pushes data onto the stack. nomem remains correct: the Reference treats stack space the block allocates and frees itself as private to the block.

The block pushes RFLAGS and pops it again, which contradicts nostack.

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.

2 participants