All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] commands/setpci: honor write mask argument
@ 2021-08-12 14:56 Wouter van Kesteren
  2021-08-13 20:41 ` Daniel Kiper
  0 siblings, 1 reply; 4+ messages in thread
From: Wouter van Kesteren @ 2021-08-12 14:56 UTC (permalink / raw)
  To: grub-devel

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(-)

diff --git a/grub-core/commands/setpci.c b/grub-core/commands/setpci.c
index 8a0c91f02..5917625f8 100644
--- a/grub-core/commands/setpci.c
+++ b/grub-core/commands/setpci.c
@@ -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;
     }
-- 
2.32.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] commands/setpci: honor write mask argument
  2021-08-12 14:56 [PATCH] commands/setpci: honor write mask argument Wouter van Kesteren
@ 2021-08-13 20:41 ` Daniel Kiper
  2021-08-14 18:23   ` Wouter van Kesteren
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Kiper @ 2021-08-13 20:41 UTC (permalink / raw)
  To: Wouter van Kesteren; +Cc: grub-devel

On Thu, Aug 12, 2021 at 04:56:13PM +0200, Wouter van Kesteren wrote:
> 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...

May I add "Signed-off-by: Wouter van Kesteren <woutershep@gmail.com>" to
this patch?

Otherwise Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>

Daniel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] commands/setpci: honor write mask argument
  2021-08-13 20:41 ` Daniel Kiper
@ 2021-08-14 18:23   ` Wouter van Kesteren
  2021-08-25 13:28     ` Daniel Kiper
  0 siblings, 1 reply; 4+ messages in thread
From: Wouter van Kesteren @ 2021-08-14 18:23 UTC (permalink / raw)
  To: Daniel Kiper; +Cc: grub-devel

On Fri, Aug 13, 2021 at 10:41 PM Daniel Kiper <dkiper@net-space.pl> wrote:
> May I add "Signed-off-by: Wouter van Kesteren <woutershep@gmail.com>" to
> this patch?
>
> Otherwise Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
>
> 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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] commands/setpci: honor write mask argument
  2021-08-14 18:23   ` Wouter van Kesteren
@ 2021-08-25 13:28     ` Daniel Kiper
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Kiper @ 2021-08-25 13:28 UTC (permalink / raw)
  To: Wouter van Kesteren; +Cc: grub-devel

On Sat, Aug 14, 2021 at 08:23:09PM +0200, Wouter van Kesteren wrote:
> On Fri, Aug 13, 2021 at 10:41 PM Daniel Kiper <dkiper@net-space.pl> wrote:
> > May I add "Signed-off-by: Wouter van Kesteren <woutershep@gmail.com>" to
> > this patch?
> >
> > Otherwise Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
> >
> > 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!

> 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-25 13:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12 14:56 [PATCH] commands/setpci: honor write mask argument Wouter van Kesteren
2021-08-13 20:41 ` Daniel Kiper
2021-08-14 18:23   ` Wouter van Kesteren
2021-08-25 13:28     ` Daniel Kiper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.