-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Linux: fix zfs_uio_dio_check_for_zero_page #16812
Conversation
The intent here is to replace the zero page pointer in the array of pointers to pages in the struct. Signed-off-by: Pavel Snajdr <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix makes sense to me.
I am just curios about all this special case: why do we need custom zero page? Can system-wide zero page become non-zero somehow? We are talking about write here, not read.
not directly related but I'm just wondering is running tests additinally with |
AFAIK this is because the zero_page symbol is now GPL-only |
That is not what I asked. Why do we even need to know that some page is zero page? |
Well there's this:
which I just took at face value, but I honestly have no idea how it might happen, the contents being changed by the user, if we didn't do this at all... because and also there's the typo of @bwatkinson can you remember any details about this? What if we nuke all these lines of code that are about the zero page? What bad would happen, how can a user change the uio dio buffer content and am I reading it right that the protection isn't really there |
We want to keep the zero page check here to handle this case. I suspect we could end up with a zero page in the draid case where we're padding out a write which is smaller than the minimum allocation size.
Would you mind opening a PR to fix this typo too. |
The intent here is to replace the zero page pointer in the array of pointers to pages in the struct. Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Pavel Snajdr <[email protected]> Closes openzfs#16812 Closes openzfs#16689 Closes openzfs#16642
The intent here is to replace the zero page pointer in the array of pointers to pages in the struct. Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Pavel Snajdr <[email protected]> Closes openzfs#16812 Closes openzfs#16689 Closes openzfs#16642
Motivation and Context
#16689 #16642
Description
How Has This Been Tested?
locally with reproducer in #16689
Types of changes
Checklist:
Signed-off-by
.