Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segfault accessing menvcfg when U-mode doesn't exist #1753

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

aswaterman
Copy link
Collaborator

The simplest fix is to create the CSRs even if they don't need to exist, and just skip adding them to the CSR map to prevent the target machine from being able to access them.

It looks like there are other place we should be following this pattern: e.g. why does sstatus exist if S-mode does not exist? But that's a matter for another day.

Resolves #1752

The simplest fix is to create the CSRs even if they don't need to exist,
and just skip adding them to the CSR map to prevent the target machine
from being able to access them.

It looks like there are other place we should be following this pattern:
e.g. why does sstatus exist if S-mode does not exist?  But that's a
matter for another day.

Resolves #1752
Copy link
Collaborator

@jerryz123 jerryz123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable

@aswaterman aswaterman merged commit 9572283 into master Aug 1, 2024
3 checks passed
@aswaterman aswaterman deleted the fix-1752 branch August 1, 2024 00:47
aswaterman added a commit that referenced this pull request Aug 1, 2024
I introduced a regression in #1753.

Resolves #1755
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.

Segmentation Fault when interrupt handled while interrupts are disabled in machine mode
2 participants