Re: [PATCH v3 2/3] xen: common: add ability to enable stack protector

2025-01-15 Thread Yann Dirson
On 12/11/24 03:04, Volodymyr Babchuk wrote: > +menu "Compiler options" > + > +config STACK_PROTECTOR > + bool "Stack protector" > + depends on HAS_STACK_PROTECTOR > + help > + Enable the Stack Protector compiler hardening option. This inserts a > + canary value in the stack

Re: [PATCH v3 2/3] xen: common: add ability to enable stack protector

2024-12-12 Thread Jan Beulich
On 12.12.2024 01:47, Volodymyr Babchuk wrote: > Jan Beulich writes: >> On 11.12.2024 03:04, Volodymyr Babchuk wrote: >>> --- a/xen/include/asm-generic/random.h >>> +++ b/xen/include/asm-generic/random.h >>> @@ -2,6 +2,11 @@ >>> #ifndef __ASM_GENERIC_RANDOM_H__ >>> #define __ASM_GENERIC_RANDOM_H_

Re: [PATCH v3 2/3] xen: common: add ability to enable stack protector

2024-12-12 Thread Jan Beulich
On 12.12.2024 01:52, Andrew Cooper wrote: > On 11/12/2024 8:16 am, Jan Beulich wrote: >> On 11.12.2024 03:04, Volodymyr Babchuk wrote: >>> --- a/xen/Makefile >>> +++ b/xen/Makefile >>> @@ -432,7 +432,11 @@ else >>> CFLAGS_UBSAN := >>> endif >>> >>> +ifeq ($(CONFIG_STACK_PROTECTOR),y) >>> +CFLAG

Re: [PATCH v3 2/3] xen: common: add ability to enable stack protector

2024-12-11 Thread Andrew Cooper
On 11/12/2024 8:16 am, Jan Beulich wrote: > On 11.12.2024 03:04, Volodymyr Babchuk wrote: >> Both GCC and Clang support -fstack-protector feature, which add stack >> canaries to functions where stack corruption is possible. This patch >> makes general preparations to enable this feature on differen

Re: [PATCH v3 2/3] xen: common: add ability to enable stack protector

2024-12-11 Thread Volodymyr Babchuk
Hello Jan, Jan Beulich writes: > On 11.12.2024 03:04, Volodymyr Babchuk wrote: [...] > >> @@ -213,6 +216,18 @@ config SPECULATIVE_HARDEN_LOCK >> >> endmenu >> >> +menu "Compiler options" >> + >> +config STACK_PROTECTOR >> +bool "Stack protector" >> +depends on HAS_STACK_PROTECTO

Re: [PATCH v3 2/3] xen: common: add ability to enable stack protector

2024-12-11 Thread Jan Beulich
On 11.12.2024 03:04, Volodymyr Babchuk wrote: > Both GCC and Clang support -fstack-protector feature, which add stack > canaries to functions where stack corruption is possible. This patch > makes general preparations to enable this feature on different > supported architectures: > > - Added CONF

[PATCH v3 2/3] xen: common: add ability to enable stack protector

2024-12-10 Thread Volodymyr Babchuk
Both GCC and Clang support -fstack-protector feature, which add stack canaries to functions where stack corruption is possible. This patch makes general preparations to enable this feature on different supported architectures: - Added CONFIG_HAS_STACK_PROTECTOR option so each architecture can