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

ZAP: Align za_name in zap_attribute_t to 8 bytes #16606

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

amotin
Copy link
Member

@amotin amotin commented Oct 4, 2024

Our code reading/writing there may not handle misaligned accesses on platforms that may care about it. I don't see a point to complicate it to satisfy UBSan in CI. This alignment costs nothing.

Fixes: #15921

How Has This Been Tested?

Not really, lets see what CI say.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

Our code reading/writing there may not handle misaligned accesses
on a platforms that may care about it.  I don't see a point to
complicate it to satisfy UBSan in CI. This alignment costs nothing.

Fixes:		openzfs#15921
Signed-off-by:	Alexander Motin <[email protected]>
Sponsored by:	iXsystems, Inc.
@amotin amotin requested a review from behlendorf October 4, 2024 16:15
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Oct 4, 2024
Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

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

Agreed. This is a no brainer and best to add the padding now.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Oct 4, 2024
@behlendorf behlendorf merged commit 42ce4b1 into openzfs:master Oct 4, 2024
16 of 20 checks passed
@amotin amotin deleted the name_align branch October 7, 2024 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants