On Mon, Apr 29, 2024 at 03:03:50PM +0200, Ard Biesheuvel wrote: > On Sat, 27 Apr 2024 at 15:08, Glenn Washburn > <developm...@efficientek.com> wrote: > > > > From: Ard Biesheuvel <a...@kernel.org> > > > > The 'ground truth' stack protector cookie value is kept in a global > > variable, and loaded in every function prologue and epilogue to store > > it into resp. compare it with the stack slot holding the cookie. > > > > If the comparison fails, the program aborts, and this might occur > > spuriously when the global variable changes values between the entry and > > exit of a function. This implies that assigning the global variable at > > boot should not involve any instrumented function calls, unless special > > care is taken to ensure that the live call stack is synchronized, which > > is non-trivial. > > > > So avoid any function calls, including grub_memcpy(), which is > > unnecessary given that the stack cookie is always a suitably aligned > > variable of the native word size. > > > > While at it, leave the last byte 0x0 to avoid inadvertent unbounded > > strings on the stack. > > > > Note that the use of __attribute__((optimize)) is described as > > unsuitable for production use in the GCC documentation, so let's drop > > this as well now that it is no longer needed. > > > > Signed-off-by: Ard Biesheuvel <a...@kernel.org> > > Reviewed-by: Glenn Washburn <developm...@efficientek.com>
I think this RB does not make a lot of sens if we have your SOB below. I will drop the RB. > > Signed-off-by: Glenn Washburn <developm...@efficientek.com> > > Thanks for taking care of this. Yeah, thanks a lot Glenn! > I'd ack it but that would make the signoff chain look even weirder :-) :-) Reviewed-by: Daniel Kiper <daniel.ki...@oracle.com> Daniel _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel