On Mon, 2024-12-02 at 09:12 +0100, Jan Beulich wrote: > On 30.11.2024 02:10, Volodymyr Babchuk wrote: > > Enable previously added CONFIG_STACK_PROTECTOR feature for RISC-V > > platform. Here we can call boot_stack_chk_guard_setup() in > > start_xen() > > function, because it never returns, so stack protector code will > > not > > be triggered because of changed canary. > > > > Signed-off-by: Volodymyr Babchuk <volodymyr_babc...@epam.com> > > Tested-by: Oleksii Kurochko <oleksii.kuroc...@gmail.com> > > Isn't this premature? For ... > > > @@ -57,6 +58,8 @@ void __init noreturn start_xen(unsigned long > > bootcpu_id, > > if ( !boot_fdt_info(device_tree_flattened, dtb_addr) ) > > BUG(); > > > > + boot_stack_chk_guard_setup(); > > ... this function's use of get_random(), either arch_get_random() > needs > to be implemented, or (as Julien also pointed out for Arm64) NOW() > needs > to work. Yet get_s_time() presently expands to just BUG_ON(). Given > this > it's not even clear to me how Oleksii managed to actually test this. I will double check that but it worked for me ( I didn't face BUG_ON() ).
~ Oleksii