From patchwork Thu Aug 29 04:56:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 172517 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1699502ily; Wed, 28 Aug 2019 21:56:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHpZFZ8jm6uK2imN7NvQqEic0cYzxu5uDxvbmEd6Zg8jrC+XX9uQCudkQ10/uz0OlZIPY3 X-Received: by 2002:a62:4e05:: with SMTP id c5mr8965292pfb.66.1567054593764; Wed, 28 Aug 2019 21:56:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567054593; cv=none; d=google.com; s=arc-20160816; b=J5mVUL5S40eYDS6j6uSt0pN99ZEDTMt0ZtRdrDUK0HLaIdJa6f0AtoJimwHS028XhE 9ALlM2jIRE2jXj7j+gIF1fiiM+cKjcLFhS6JeAs+RpHaf4HIMAZDyLvnVu7W2kLu6zub 3i516tYUcB9NQaewkuaohDHpbVO7FyCWmH/Mh22NU6j7SPzIjdMCosWevmIDn+Rqj7Zj prQicIxbLPdJtmDg3tJF8I2ppFHkbDogQM8ZzG10bD0AXGa0VWRy3kYmDMJwTu3V7ID0 d6M0NKmVBMOC57swOVzz8GThT8itQml4Rj5h1gEgXVDPExilMfOH2RE1gmMw1EUDgUGu o78Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=a3UGBIKWDfbsIBBpr1cpZ9vCHa/wcPDj6Sn4StE+Cx8=; b=HsqqPqOdl14WHAJ9pcDbFd+m25HHOTXbNSScOf8IJ0JdJXrb/fowzNMssat5DdMUGF QE5+Rr/73jPfe1a+oyOh+zWXQyHgNI4cIhBbKFNC7T3iR1I8R6eaypTtYuL6/KhT8Mcb all8nsvVr2aU6TIwo0i9F/MZh0Cq2+hawn7YEHu0A5+KgfD8ZnceRhjt3pgWbtYqQhQA V8ReO0e4XlNdPtlm6Zz79866rucWBFv1NVD6gYP1F446H1mJkQanUcNcC5IAXGLAjLDv PXA7TTjmfbXta6E6DTrtVD/+txJXehzdmA9TrKINQGrQBiezraW4LELepPH1ozyBmQjX kMPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=gnmOm+HR; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id o14si978129pgk.45.2019.08.28.21.56.33; Wed, 28 Aug 2019 21:56:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=gnmOm+HR; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id E9AD87F304; Thu, 29 Aug 2019 04:56:28 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by mail.openembedded.org (Postfix) with ESMTP id B81AF73196 for ; Thu, 29 Aug 2019 04:56:26 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id k3so905536pgb.10 for ; Wed, 28 Aug 2019 21:56:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cm1mUTcLeGEBNxPGNh04nC2U1wM8UpP+wOhq+TV8M6k=; b=gnmOm+HRmjzUPQGSNkDqoI76K1UW8ReEWGxqqE+gzEw1nH0jM+hIzo362ih3OfUuqC p41dOwD/4GhZQCrml+pYv2EuLt9GnAyajM5rqrW4MZqXLygW3vBp9Dyf6JbdBB1Q15I4 oh0q+z+rL2znq71+mnFvKHMGMFRaqMneIRWUCyR+P1ek660qc4RpDIb5CYJlJwjjy+nG VfBAUO3wYxXDCyMt/Te1tWQIv+JK4atV13J3wddLUkv4kNS4xr1C/VlxDf2OQQLlILcK 2VYE3AwM0UqWwxHm6u54T7NefazXLEJnXBisw8po6kXCanlFXzzEWVmHik3e4rWwSfSo t63Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cm1mUTcLeGEBNxPGNh04nC2U1wM8UpP+wOhq+TV8M6k=; b=aa3GxGubKasrABU0GdmLr1Tk7fKSEg/myLHHfGRlAia4ipDjb5SXDu4pMDk1CEK/Dm 2PJZJJ8PBdmCNikV+UVgNdg8CThGKDHSmGB848Zl7WpsguTYkRQHC+vkq8mRMR9ihrdF RCigjNuhGHuJ3TzOfbA9eOkU1poxh38PwGI7ErRfmapWN9lDP0FCcorYeTf6dBY0mzji pc3dW5APt/wb7InHsrrcRMQTOOrFKhzN+Y9ja3Kq3bpitJHMzGhDA4M/lWvUsQb9t5ka 10NjiEkWsgmWHDGOTJExQK3/OGyjVTuBT5tnYbDqTbhKtNPC40epYGjuzWELWhW4gF3X uTgw== X-Gm-Message-State: APjAAAUF3a5TPZoT9FQcNGZlr/8jFFAp/eKHnjGhWnlCY7z38/wpJQoT jRBLnOqRYDW9QeTWPpLXbD5eNlioIRw= X-Received: by 2002:a63:4c5a:: with SMTP id m26mr6442834pgl.270.1567054587244; Wed, 28 Aug 2019 21:56:27 -0700 (PDT) Received: from apollo.hsd1.ca.comcast.net (c-73-71-176-3.hsd1.ca.comcast.net. [73.71.176.3]) by smtp.gmail.com with ESMTPSA id e13sm1234261pff.181.2019.08.28.21.56.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2019 21:56:26 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Wed, 28 Aug 2019 21:56:15 -0700 Message-Id: <20190829045615.8476-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Subject: [oe] [meta-oe][PATCH] kernel-selftest: Explicitly disable stack protector X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org 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 --- .../kernel-selftest/kernel-selftest.bb | 22 ++----------------- 1 file changed, 2 insertions(+), 20 deletions(-) -- 2.23.0 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb index dce33c16c5..ff9720f8d0 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 = ""