[oe-commits] [meta-openembedded] branch master-next updated: kernel-selftest: Explicitly disable stack protector

git at git.openembedded.org git at git.openembedded.org
Thu Aug 29 04:57:11 UTC 2019


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

The following commit(s) were added to refs/heads/master-next by this push:
     new 28fb594  kernel-selftest: Explicitly disable stack protector
28fb594 is described below

commit 28fb594aa93e032d25f42b3011909aeff8092e46
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Wed Aug 28 21:54:13 2019 -0700

    kernel-selftest: Explicitly disable stack protector
    
    selftests do not support it and clang from meta-clang builds with this
    turned on by default
    
    Disable security flags completely, drop all workarounds used to get
    around the hoop
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 .../kernel-selftest/kernel-selftest.bb             | 22 ++--------------------
 1 file changed, 2 insertions(+), 20 deletions(-)

diff --git a/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb
index dce33c1..ff9720f 100644
--- a/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb
+++ b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb
@@ -39,6 +39,7 @@ EXTRA_OEMAKE = '\
     CROSS_COMPILE=${TARGET_PREFIX} \
     ARCH=${ARCH} \
     CC="${CC}" \
+    CLANG="clang -fno-stack-protector" \
     AR="${AR}" \
     LD="${LD}" \
     DESTDIR="${D}" \
@@ -52,16 +53,6 @@ KERNEL_SELFTEST_SRC ?= "Makefile \
                         LICENSES \
 "
 
-python __anonymous () {
-    import re
-
-    var = d.getVar('TARGET_CC_ARCH')
-    pattern = '_FORTIFY_SOURCE=[^0]'
-
-    if re.search(pattern, var):
-        d.appendVar('TARGET_CC_ARCH', " -O")
-}
-
 do_compile() {
     if [ ${@bb.utils.contains('DEPENDS', 'clang-native', 'True', 'False', d)} = 'False' ]; then
         bbwarn "clang >= 6.0 with bpf support is needed with kernel 4.18+ so
@@ -123,13 +114,4 @@ RDEPENDS_${PN} += "python3"
 # tools/testing/selftests/vm/Makefile doesn't respect LDFLAGS and tools/testing/selftests/Makefile explicitly overrides to empty
 INSANE_SKIP_${PN} += "ldflags"
 
-# userfaultfd.c:126:2: error: format not a string literal and no format arguments [-Werror=format-security]
-#  fprintf(stderr, examples);
-#  ^~~~~~~
-SECURITY_STRINGFORMAT = ""
-
-# https://errors.yoctoproject.org/Errors/Details/261657/
-# kernel-selftest/1.0-r0/recipe-sysroot/usr/include/bits/fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments
-#     __open_missing_mode ();
-#     ^~~~~~~~~~~~~~~~~~~~~~
-lcl_maybe_fortify = ""
+SECURITY_CFLAGS = ""

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list