Re: [PATCH v2 3/4] xen: arm: enable stack protector feature

2024-12-09 Thread Volodymyr Babchuk
Hi Jan, Jan Beulich writes: [...] > >> #else >> const unsigned long a = 2862933555777941757; >> #endif >> const unsigned c = 1; > > I'm having a hard time seeing why this need to be a static variable. Its > sole use is ... It's a constant in a hope that compiler is smart enough to o

Re: [PATCH v2 3/4] xen: arm: enable stack protector feature

2024-12-09 Thread Jan Beulich
On 06.12.2024 05:46, Volodymyr Babchuk wrote: > So, apart from already present > > static always_inline void boot_stack_chk_guard_setup(void); > > I did this: > > /* > * Initial value is chosen by fair dice roll. > * It will be updated during boot process. > */ > #if BITS_PER_LONG == 32 > uns

Re: [PATCH v2 3/4] xen: arm: enable stack protector feature

2024-12-05 Thread Volodymyr Babchuk
Hi Andrew, Andrew Cooper writes: > On 03/12/2024 11:16 pm, Julien Grall wrote: >> On Tue, 3 Dec 2024 at 22:00, Andrew Cooper wrote: >>> On 30/11/2024 1:10 am, Volodymyr Babchuk wrote: diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 2e27af4560..f855e97e25 100644 --

Re: [PATCH v2 3/4] xen: arm: enable stack protector feature

2024-12-05 Thread Andrew Cooper
On 03/12/2024 11:16 pm, Julien Grall wrote: > On Tue, 3 Dec 2024 at 22:00, Andrew Cooper wrote: >> On 30/11/2024 1:10 am, Volodymyr Babchuk wrote: >>> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c >>> index 2e27af4560..f855e97e25 100644 >>> --- a/xen/arch/arm/setup.c >>> +++ b/xen/arch/

Re: [PATCH v2 3/4] xen: arm: enable stack protector feature

2024-12-03 Thread Julien Grall
On Tue, 3 Dec 2024 at 22:00, Andrew Cooper wrote: > > On 30/11/2024 1:10 am, Volodymyr Babchuk wrote: > > diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c > > index 2e27af4560..f855e97e25 100644 > > --- a/xen/arch/arm/setup.c > > +++ b/xen/arch/arm/setup.c > > @@ -341,6 +342,8 @@ void asml

Re: [PATCH v2 3/4] xen: arm: enable stack protector feature

2024-12-03 Thread Andrew Cooper
On 30/11/2024 1:10 am, Volodymyr Babchuk wrote: > diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c > index 2e27af4560..f855e97e25 100644 > --- a/xen/arch/arm/setup.c > +++ b/xen/arch/arm/setup.c > @@ -341,6 +342,8 @@ void asmlinkage __init start_xen(unsigned long fdt_paddr) > */ >

Re: [PATCH v2 3/4] xen: arm: enable stack protector feature

2024-11-30 Thread Julien Grall
Hi Volodymyr, On 30/11/2024 01:10, Volodymyr Babchuk wrote: Enable previously added CONFIG_STACK_PROTECTOR feature for ARM 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 c