commands/setpci: honor write mask argument
PATCH 1/1 commands/setpci: honor write mask argument
In the case that one passes a write mask with :
the write_mask is obtained from grub_strtoul and then promptly overwritten by 0xffffffff three lines later.
This appears to have been so since the initial version of setpci in 2009. I'm suprised no one else has hit this issue in the past 12 years...
--- grub-core/commands/setpci.c | 1 - 1 file changed, 1 deletion(-)
grub-core/commands/setpci.c +0 -1
@@ -311,7 +311,6 @@ grub_cmd_setpci (grub_extcmd_context_t ctxt, int argc, char **argv) write_mask =grub_strtoul (ptr, &ptr,16 );if (grub_errno)return grub_errno; - write_mask =0xffffffff ; } regwrite &= write_mask; }
Signature · 1 line
2.32.0
Quoted 6 lines · Wouter van Kesteren
In the case that one passes a write mask with :
thewrite_maskis obtained fromgrub_strtouland then promptly overwritten by0xffffffffthree lines later.This appears to have been so since the initial version of setpci in 2009. I'm suprised no one else has hit this issue in the past 12 years...
May I add "Signed-off-by: Wouter van Kesteren <[email protected]>" to this patch?
Otherwise Reviewed-by: Daniel Kiper <[email protected]>
Daniel
Quoted 6 lines · Daniel Kiper
May I add "Signed-off-by: Wouter van Kesteren <[email protected]>" to this patch?
Otherwise Reviewed-by: Daniel Kiper <[email protected]>
Daniel
Hey Daniel,
Thanks for the reply. You're more than welcome to add those two lines. That is assuming it means the same here as it does for the kernel.
I couldn't find any CONTRIBUTING document so i wasn't sure what the proper procedures would be.
If you want to be more formal just let me know and i can resubmit it in its entirety too.
Quoted 4 lines · Wouter van Kesteren
Quoted 3 lines · Daniel Kiper
May I add "Signed-off-by: Wouter van Kesteren <[email protected]>" to this patch?
Quoted 8 lines
Quoted 3 lines
Otherwise Reviewed-by: Daniel Kiper <[email protected]>
Daniel
Hey Daniel,
Thanks for the reply. You're more than welcome to add those two lines. That is assuming it means the same here as it does for the kernel.
Yep!
Quoted 4 lines
I couldn't find any CONTRIBUTING document so i wasn't sure what the proper procedures would be.
If you want to be more formal just let me know and i can resubmit it in its entirety too.
No, this is sufficient for now.
Thanks,
Daniel