Re: [PATCH v9] Add support for stack-protector

2021-04-10 Thread Tom Rini
On Sat, Apr 10, 2021 at 12:11:33PM +0200, Heinrich Schuchardt wrote:
> On 4/10/21 12:27 AM, Joel Peshkin wrote:
> > 
> > Hi Heinrich,
> > 
> > Has there been any progress in getting the EFI erors fixed so that this
> > can be committed?  There seems to be little point in my refreshing this
> > patch until that is done.
> 
> I have fixed up your patch to work with EFI and will add it to my next
> pull request.

If all of CI now works with -fstack-protector enabled, I'll take it up
in my tree.

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH v9] Add support for stack-protector

2021-04-10 Thread Heinrich Schuchardt

On 4/10/21 12:27 AM, Joel Peshkin wrote:


Hi Heinrich,

Has there been any progress in getting the EFI erors fixed so that this
can be committed?  There seems to be little point in my refreshing this
patch until that is done.


I have fixed up your patch to work with EFI and will add it to my next
pull request.

I did not get qemu-x86_64_defconfig and qemu-x86_defconfig to build with
CONFIG_STACK_PROTECTOR=y, CONFIG_SPL_STACK_PROTECTOR = no.

arch/x86/cpu/irq.c and arch/x86/cpu/mtrr.c give me an undefined
reference to `__stack_chk_fail' when SPL is built. It seems that these
files are only built once instead of separately for SPL and main U-Boot.

Best regards

Heinrich



Thanks,

-Joel


On Mon, Mar 22, 2021 at 10:37 AM Heinrich Schuchardt mailto:xypron.g...@gmx.de>> wrote:

On 09.02.21 04:36, Joel Peshkin wrote:
 > Add support for stack protector for UBOOT, SPL, and TPL
 > as well as new pytest for stackprotector
 >
 > Signed-off-by: Joel Peshkin mailto:joel.pesh...@broadcom.com>>
 > ---
 > Cc: Simon Glass mailto:s...@chromium.org>>
 > Cc: Heinrich Schuchardt mailto:xypron.g...@gmx.de>>
 >
 > Changes for v9:
 >    - Fix pytest script post-test reboot
 > Changes for v8:
 >    - Fix commit message
 >    - Force canary to UL type
 > Changes for v7:
 >    - Fix commit message
 >    - add __builtin_extract_return_addr() calls
 > Changes for v6:
 >    - Fix commit message
 > Changes for v5:
 >    - Rebase
 > Changes for v4:
 >    - Exclude EFI from stackprotector
 >    - Cleanups of extra includes and declaration
 > Changes for v3:
 >    - Move test command to cmd/
 >    - Update Kconfig names and depends
 >    - clean up default canary initialization
 > Changes for v2:
 >    - Add test command and corresponding config
 >    - Fixed incorrect description in Kconfig
 >    - Add unit test
 > ---
 >  MAINTAINERS                          |  7 +++
 >  Makefile                             |  5 +
 >  cmd/Kconfig                          | 10 ++
 >  cmd/Makefile                         |  1 +
 >  cmd/stackprot_test.c                 | 21 +
 >  common/Kconfig                       | 17 +
 >  common/Makefile                      |  2 ++
 >  common/stackprot.c                   | 19 +++
 >  configs/sandbox_defconfig            | 14 +++---
 >  scripts/Makefile.spl                 |  6 ++
 >  test/py/tests/test_stackprotector.py | 15 +++
 >  11 files changed, 110 insertions(+), 7 deletions(-)
 >  create mode 100644 cmd/stackprot_test.c
 >  create mode 100644 common/stackprot.c
 >  create mode 100644 test/py/tests/test_stackprotector.py
 >
 > diff --git a/MAINTAINERS b/MAINTAINERS
 > index 26dd254..d3971e8 100644
 > --- a/MAINTAINERS
 > +++ b/MAINTAINERS
 > @@ -1024,6 +1024,13 @@ F:     include/sqfs.h
 >  F:   cmd/sqfs.c
 >  F:   test/py/tests/test_fs/test_squashfs/
 >
 > +STACKPROTECTOR
 > +M:   Joel Peshkin mailto:joel.pesh...@broadcom.com>>
 > +S:   Maintained
 > +F:   common/stackprot.c
 > +F:   cmd/stackprot_test.c
 > +F:   test/py/tests/test_stackprotector.py
 > +
 >  TARGET_BCMNS3
 >  M:   Bharat Gooty mailto:bharat.go...@broadcom.com>>
 >  M:   Rayagonda Kokatanur mailto:rayagonda.kokata...@broadcom.com>>
 > diff --git a/Makefile b/Makefile
 > index 902a976..65c5cb8 100644
 > --- a/Makefile
 > +++ b/Makefile
 > @@ -677,7 +677,12 @@ else
 >  KBUILD_CFLAGS        += -O2
 >  endif
 >
 > +ifeq ($(CONFIG_STACKPROTECTOR),y)
 > +KBUILD_CFLAGS += $(call cc-option,-fstack-protector-strong)
 > +CFLAGS_EFI += $(call cc-option,-fno-stack-protector)
 > +else
 >  KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
 > +endif
 >  KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks)
 >
 >  # disable stringop warnings in gcc 8+
 > diff --git a/cmd/Kconfig b/cmd/Kconfig
 > index da86a94..054b2f3 100644
 > --- a/cmd/Kconfig
 > +++ b/cmd/Kconfig
 > @@ -2280,6 +2280,16 @@ config CMD_AVB
 >           avb read_part_hex - read data from partition and output
to stdout
 >           avb write_part - write data to partition
 >           avb verify - run full verification chain
 > +
 > +config CMD_STACKPROTECTOR_TEST
 > +     bool "Test command for stack protector"
 > +     depends on STACKPROTECTOR
 > +     default n
 > +     help
 > +       Enable stackprot_test command
 > +       The stackprot_test command will force a stack overrun to test
 > +       the stack smashing detection mechanisms.
 > +
 >  endmenu
 >
 >  config CMD_UBI
 > diff --git a/cmd/Makefile b/cmd/Makefile
 > index 5b3400a..1d7afea 100644
  

Re: [PATCH v9] Add support for stack-protector

2021-04-09 Thread Joel Peshkin
Hi Heinrich,

Has there been any progress in getting the EFI erors fixed so that this can
be committed?  There seems to be little point in my refreshing this patch
until that is done.

Thanks,

-Joel


On Mon, Mar 22, 2021 at 10:37 AM Heinrich Schuchardt 
wrote:

> On 09.02.21 04:36, Joel Peshkin wrote:
> > Add support for stack protector for UBOOT, SPL, and TPL
> > as well as new pytest for stackprotector
> >
> > Signed-off-by: Joel Peshkin 
> > ---
> > Cc: Simon Glass 
> > Cc: Heinrich Schuchardt 
> >
> > Changes for v9:
> >- Fix pytest script post-test reboot
> > Changes for v8:
> >- Fix commit message
> >- Force canary to UL type
> > Changes for v7:
> >- Fix commit message
> >- add __builtin_extract_return_addr() calls
> > Changes for v6:
> >- Fix commit message
> > Changes for v5:
> >- Rebase
> > Changes for v4:
> >- Exclude EFI from stackprotector
> >- Cleanups of extra includes and declaration
> > Changes for v3:
> >- Move test command to cmd/
> >- Update Kconfig names and depends
> >- clean up default canary initialization
> > Changes for v2:
> >- Add test command and corresponding config
> >- Fixed incorrect description in Kconfig
> >- Add unit test
> > ---
> >  MAINTAINERS  |  7 +++
> >  Makefile |  5 +
> >  cmd/Kconfig  | 10 ++
> >  cmd/Makefile |  1 +
> >  cmd/stackprot_test.c | 21 +
> >  common/Kconfig   | 17 +
> >  common/Makefile  |  2 ++
> >  common/stackprot.c   | 19 +++
> >  configs/sandbox_defconfig| 14 +++---
> >  scripts/Makefile.spl |  6 ++
> >  test/py/tests/test_stackprotector.py | 15 +++
> >  11 files changed, 110 insertions(+), 7 deletions(-)
> >  create mode 100644 cmd/stackprot_test.c
> >  create mode 100644 common/stackprot.c
> >  create mode 100644 test/py/tests/test_stackprotector.py
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index 26dd254..d3971e8 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -1024,6 +1024,13 @@ F: include/sqfs.h
> >  F:   cmd/sqfs.c
> >  F:   test/py/tests/test_fs/test_squashfs/
> >
> > +STACKPROTECTOR
> > +M:   Joel Peshkin 
> > +S:   Maintained
> > +F:   common/stackprot.c
> > +F:   cmd/stackprot_test.c
> > +F:   test/py/tests/test_stackprotector.py
> > +
> >  TARGET_BCMNS3
> >  M:   Bharat Gooty 
> >  M:   Rayagonda Kokatanur 
> > diff --git a/Makefile b/Makefile
> > index 902a976..65c5cb8 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -677,7 +677,12 @@ else
> >  KBUILD_CFLAGS+= -O2
> >  endif
> >
> > +ifeq ($(CONFIG_STACKPROTECTOR),y)
> > +KBUILD_CFLAGS += $(call cc-option,-fstack-protector-strong)
> > +CFLAGS_EFI += $(call cc-option,-fno-stack-protector)
> > +else
> >  KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
> > +endif
> >  KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks)
> >
> >  # disable stringop warnings in gcc 8+
> > diff --git a/cmd/Kconfig b/cmd/Kconfig
> > index da86a94..054b2f3 100644
> > --- a/cmd/Kconfig
> > +++ b/cmd/Kconfig
> > @@ -2280,6 +2280,16 @@ config CMD_AVB
> >   avb read_part_hex - read data from partition and output to
> stdout
> >   avb write_part - write data to partition
> >   avb verify - run full verification chain
> > +
> > +config CMD_STACKPROTECTOR_TEST
> > + bool "Test command for stack protector"
> > + depends on STACKPROTECTOR
> > + default n
> > + help
> > +   Enable stackprot_test command
> > +   The stackprot_test command will force a stack overrun to test
> > +   the stack smashing detection mechanisms.
> > +
> >  endmenu
> >
> >  config CMD_UBI
> > diff --git a/cmd/Makefile b/cmd/Makefile
> > index 5b3400a..1d7afea 100644
> > --- a/cmd/Makefile
> > +++ b/cmd/Makefile
> > @@ -142,6 +142,7 @@ obj-$(CONFIG_CMD_SPI) += spi.o
> >  obj-$(CONFIG_CMD_STRINGS) += strings.o
> >  obj-$(CONFIG_CMD_SMC) += smccc.o
> >  obj-$(CONFIG_CMD_SYSBOOT) += sysboot.o pxe_utils.o
> > +obj-$(CONFIG_CMD_STACKPROTECTOR_TEST) += stackprot_test.o
> >  obj-$(CONFIG_CMD_TERMINAL) += terminal.o
> >  obj-$(CONFIG_CMD_TIME) += time.o
> >  obj-$(CONFIG_CMD_TIMER) += timer.o
> > diff --git a/cmd/stackprot_test.c b/cmd/stackprot_test.c
> > new file mode 100644
> > index 000..6ad287e
> > --- /dev/null
> > +++ b/cmd/stackprot_test.c
> > @@ -0,0 +1,21 @@
> > +// SPDX-License-Identifier: GPL-2.0+
> > +/*
> > + *  Copyright 2021 Broadcom
> > + */
> > +
> > +#include 
> > +#include 
> > +
> > +DECLARE_GLOBAL_DATA_PTR;
>
> Hello Joël,
>
> This line is not needed.
>
> > +
> > +static int do_test_stackprot_fail(struct cmd_tbl *cmdtp, int flag, int
> argc,
> > +   char *const argv[])
> > +{
> > + char a[128];
> > +
> > + memset(a, 0xa5, 512);
> > + 

Re: [PATCH v9] Add support for stack-protector

2021-03-22 Thread Heinrich Schuchardt
On 09.02.21 04:36, Joel Peshkin wrote:
> Add support for stack protector for UBOOT, SPL, and TPL
> as well as new pytest for stackprotector
>
> Signed-off-by: Joel Peshkin 
> ---
> Cc: Simon Glass 
> Cc: Heinrich Schuchardt 
>
> Changes for v9:
>- Fix pytest script post-test reboot
> Changes for v8:
>- Fix commit message
>- Force canary to UL type
> Changes for v7:
>- Fix commit message
>- add __builtin_extract_return_addr() calls
> Changes for v6:
>- Fix commit message
> Changes for v5:
>- Rebase
> Changes for v4:
>- Exclude EFI from stackprotector
>- Cleanups of extra includes and declaration
> Changes for v3:
>- Move test command to cmd/
>- Update Kconfig names and depends
>- clean up default canary initialization
> Changes for v2:
>- Add test command and corresponding config
>- Fixed incorrect description in Kconfig
>- Add unit test
> ---
>  MAINTAINERS  |  7 +++
>  Makefile |  5 +
>  cmd/Kconfig  | 10 ++
>  cmd/Makefile |  1 +
>  cmd/stackprot_test.c | 21 +
>  common/Kconfig   | 17 +
>  common/Makefile  |  2 ++
>  common/stackprot.c   | 19 +++
>  configs/sandbox_defconfig| 14 +++---
>  scripts/Makefile.spl |  6 ++
>  test/py/tests/test_stackprotector.py | 15 +++
>  11 files changed, 110 insertions(+), 7 deletions(-)
>  create mode 100644 cmd/stackprot_test.c
>  create mode 100644 common/stackprot.c
>  create mode 100644 test/py/tests/test_stackprotector.py
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 26dd254..d3971e8 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1024,6 +1024,13 @@ F: include/sqfs.h
>  F:   cmd/sqfs.c
>  F:   test/py/tests/test_fs/test_squashfs/
>
> +STACKPROTECTOR
> +M:   Joel Peshkin 
> +S:   Maintained
> +F:   common/stackprot.c
> +F:   cmd/stackprot_test.c
> +F:   test/py/tests/test_stackprotector.py
> +
>  TARGET_BCMNS3
>  M:   Bharat Gooty 
>  M:   Rayagonda Kokatanur 
> diff --git a/Makefile b/Makefile
> index 902a976..65c5cb8 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -677,7 +677,12 @@ else
>  KBUILD_CFLAGS+= -O2
>  endif
>
> +ifeq ($(CONFIG_STACKPROTECTOR),y)
> +KBUILD_CFLAGS += $(call cc-option,-fstack-protector-strong)
> +CFLAGS_EFI += $(call cc-option,-fno-stack-protector)
> +else
>  KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
> +endif
>  KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks)
>
>  # disable stringop warnings in gcc 8+
> diff --git a/cmd/Kconfig b/cmd/Kconfig
> index da86a94..054b2f3 100644
> --- a/cmd/Kconfig
> +++ b/cmd/Kconfig
> @@ -2280,6 +2280,16 @@ config CMD_AVB
>   avb read_part_hex - read data from partition and output to stdout
>   avb write_part - write data to partition
>   avb verify - run full verification chain
> +
> +config CMD_STACKPROTECTOR_TEST
> + bool "Test command for stack protector"
> + depends on STACKPROTECTOR
> + default n
> + help
> +   Enable stackprot_test command
> +   The stackprot_test command will force a stack overrun to test
> +   the stack smashing detection mechanisms.
> +
>  endmenu
>
>  config CMD_UBI
> diff --git a/cmd/Makefile b/cmd/Makefile
> index 5b3400a..1d7afea 100644
> --- a/cmd/Makefile
> +++ b/cmd/Makefile
> @@ -142,6 +142,7 @@ obj-$(CONFIG_CMD_SPI) += spi.o
>  obj-$(CONFIG_CMD_STRINGS) += strings.o
>  obj-$(CONFIG_CMD_SMC) += smccc.o
>  obj-$(CONFIG_CMD_SYSBOOT) += sysboot.o pxe_utils.o
> +obj-$(CONFIG_CMD_STACKPROTECTOR_TEST) += stackprot_test.o
>  obj-$(CONFIG_CMD_TERMINAL) += terminal.o
>  obj-$(CONFIG_CMD_TIME) += time.o
>  obj-$(CONFIG_CMD_TIMER) += timer.o
> diff --git a/cmd/stackprot_test.c b/cmd/stackprot_test.c
> new file mode 100644
> index 000..6ad287e
> --- /dev/null
> +++ b/cmd/stackprot_test.c
> @@ -0,0 +1,21 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + *  Copyright 2021 Broadcom
> + */
> +
> +#include 
> +#include 
> +
> +DECLARE_GLOBAL_DATA_PTR;

Hello Joël,

This line is not needed.

> +
> +static int do_test_stackprot_fail(struct cmd_tbl *cmdtp, int flag, int argc,
> +   char *const argv[])
> +{
> + char a[128];
> +
> + memset(a, 0xa5, 512);
> + return 0;
> +}
> +
> +U_BOOT_CMD(stackprot_test, 1, 1, do_test_stackprot_fail,
> +"test stack protector fail", "");
> diff --git a/common/Kconfig b/common/Kconfig
> index 2bce8c9..6a94045 100644
> --- a/common/Kconfig
> +++ b/common/Kconfig
> @@ -595,6 +595,23 @@ config TPL_HASH
> and the algorithms it supports are defined in common/hash.c. See
> also CMD_HASH for command-line access.
>
> +config STACKPROTECTOR
> + bool "Stack Protector buffer overflow detection"
> + default n
> + help
> +   Enable stack smash 

Re: [PATCH v9] Add support for stack-protector

2021-02-09 Thread Heinrich Schuchardt
On 09.02.21 13:49, Heinrich Schuchardt wrote:
> On 09.02.21 04:36, Joel Peshkin wrote:
>> Add support for stack protector for UBOOT, SPL, and TPL
>> as well as new pytest for stackprotector
>>
>> Signed-off-by: Joel Peshkin 
>
> Before merging the patch the stack smash in
>
> test/py/tests/test_efi_capsule/test_capsule_firmware.py
> function efi_launch_capsules()
>
> must be fixed.

This patch fixes the problem with
test/py/tests/test_efi_capsule/test_capsule_firmware.py:

https://lists.denx.de/pipermail/u-boot/2021-February/440872.html
[PATCH 1/1] efi_loader: fix get_last_capsule()

Best regards

Heinrich


[PATCH v9] Add support for stack-protector

2021-02-08 Thread Joel Peshkin
Add support for stack protector for UBOOT, SPL, and TPL
as well as new pytest for stackprotector

Signed-off-by: Joel Peshkin 
---
Cc: Simon Glass 
Cc: Heinrich Schuchardt 

Changes for v9:
   - Fix pytest script post-test reboot
Changes for v8:
   - Fix commit message
   - Force canary to UL type
Changes for v7:
   - Fix commit message
   - add __builtin_extract_return_addr() calls
Changes for v6:
   - Fix commit message
Changes for v5:
   - Rebase
Changes for v4:
   - Exclude EFI from stackprotector
   - Cleanups of extra includes and declaration
Changes for v3:
   - Move test command to cmd/
   - Update Kconfig names and depends
   - clean up default canary initialization
Changes for v2:
   - Add test command and corresponding config
   - Fixed incorrect description in Kconfig
   - Add unit test
---
 MAINTAINERS  |  7 +++
 Makefile |  5 +
 cmd/Kconfig  | 10 ++
 cmd/Makefile |  1 +
 cmd/stackprot_test.c | 21 +
 common/Kconfig   | 17 +
 common/Makefile  |  2 ++
 common/stackprot.c   | 19 +++
 configs/sandbox_defconfig| 14 +++---
 scripts/Makefile.spl |  6 ++
 test/py/tests/test_stackprotector.py | 15 +++
 11 files changed, 110 insertions(+), 7 deletions(-)
 create mode 100644 cmd/stackprot_test.c
 create mode 100644 common/stackprot.c
 create mode 100644 test/py/tests/test_stackprotector.py

diff --git a/MAINTAINERS b/MAINTAINERS
index 26dd254..d3971e8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1024,6 +1024,13 @@ F:   include/sqfs.h
 F: cmd/sqfs.c
 F: test/py/tests/test_fs/test_squashfs/
 
+STACKPROTECTOR
+M: Joel Peshkin 
+S: Maintained
+F: common/stackprot.c
+F: cmd/stackprot_test.c
+F: test/py/tests/test_stackprotector.py
+
 TARGET_BCMNS3
 M: Bharat Gooty 
 M: Rayagonda Kokatanur 
diff --git a/Makefile b/Makefile
index 902a976..65c5cb8 100644
--- a/Makefile
+++ b/Makefile
@@ -677,7 +677,12 @@ else
 KBUILD_CFLAGS  += -O2
 endif
 
+ifeq ($(CONFIG_STACKPROTECTOR),y)
+KBUILD_CFLAGS += $(call cc-option,-fstack-protector-strong)
+CFLAGS_EFI += $(call cc-option,-fno-stack-protector)
+else
 KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
+endif
 KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks)
 
 # disable stringop warnings in gcc 8+
diff --git a/cmd/Kconfig b/cmd/Kconfig
index da86a94..054b2f3 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -2280,6 +2280,16 @@ config CMD_AVB
avb read_part_hex - read data from partition and output to stdout
avb write_part - write data to partition
avb verify - run full verification chain
+
+config CMD_STACKPROTECTOR_TEST
+   bool "Test command for stack protector"
+   depends on STACKPROTECTOR
+   default n
+   help
+ Enable stackprot_test command
+ The stackprot_test command will force a stack overrun to test
+ the stack smashing detection mechanisms.
+
 endmenu
 
 config CMD_UBI
diff --git a/cmd/Makefile b/cmd/Makefile
index 5b3400a..1d7afea 100644
--- a/cmd/Makefile
+++ b/cmd/Makefile
@@ -142,6 +142,7 @@ obj-$(CONFIG_CMD_SPI) += spi.o
 obj-$(CONFIG_CMD_STRINGS) += strings.o
 obj-$(CONFIG_CMD_SMC) += smccc.o
 obj-$(CONFIG_CMD_SYSBOOT) += sysboot.o pxe_utils.o
+obj-$(CONFIG_CMD_STACKPROTECTOR_TEST) += stackprot_test.o
 obj-$(CONFIG_CMD_TERMINAL) += terminal.o
 obj-$(CONFIG_CMD_TIME) += time.o
 obj-$(CONFIG_CMD_TIMER) += timer.o
diff --git a/cmd/stackprot_test.c b/cmd/stackprot_test.c
new file mode 100644
index 000..6ad287e
--- /dev/null
+++ b/cmd/stackprot_test.c
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ *  Copyright 2021 Broadcom
+ */
+
+#include 
+#include 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static int do_test_stackprot_fail(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
+{
+   char a[128];
+
+   memset(a, 0xa5, 512);
+   return 0;
+}
+
+U_BOOT_CMD(stackprot_test, 1, 1, do_test_stackprot_fail,
+  "test stack protector fail", "");
diff --git a/common/Kconfig b/common/Kconfig
index 2bce8c9..6a94045 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -595,6 +595,23 @@ config TPL_HASH
  and the algorithms it supports are defined in common/hash.c. See
  also CMD_HASH for command-line access.
 
+config STACKPROTECTOR
+   bool "Stack Protector buffer overflow detection"
+   default n
+   help
+ Enable stack smash detection through compiler's stack-protector
+ canary logic
+
+config SPL_STACKPROTECTOR
+   bool "Stack Protector buffer overflow detection for SPL"
+   depends on STACKPROTECTOR && SPL
+   default n
+
+config TPL_STACKPROTECTOR
+   bool "Stack Protector buffer overflow detection for TPL"
+