From patchwork Sun Apr 11 09:21:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1464768 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.a=rsa-sha256 header.s=badeba3b8450 header.b=hOxyMsM1; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FJ5yt6Wdpz9sV5 for ; Sun, 11 Apr 2021 19:23:50 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4B9D380590; Sun, 11 Apr 2021 11:23:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="hOxyMsM1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9332D8051D; Sun, 11 Apr 2021 11:23:19 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DDD5E80202 for ; Sun, 11 Apr 2021 11:23:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1618132976; bh=s+vd7KIQl9Dlr5gjkee9Oy56xMDmHov+So46JUeJXd8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=hOxyMsM1RKF0lXScX7B6BvIjdn509v6/y3thTyrGpOJl2yObyB/amLMwZiJ6Xa6B9 qOPaAMQJS6Z8gtXyDQC0W3qcR0QYY0nTo4xYwbvhUWXLJmolwvTU3WXTxQ7U/wZf9Q DsCUdMECYjfvIyBhwLf8mmYTp7MMiL4RPBsDn2xU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from LT02.fritz.box ([62.143.247.63]) by mail.gmx.net (mrgmx004 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MtfNl-1lq3fL0iCt-00v9Pv; Sun, 11 Apr 2021 11:22:56 +0200 From: Heinrich Schuchardt To: Tom Rini Cc: u-boot@lists.denx.de, Rick Chen , Simon Glass , Bin Meng , Joel Peshkin , Heinrich Schuchardt Subject: [PATCH v10 0/3] Add support for stack-protector Date: Sun, 11 Apr 2021 11:21:55 +0200 Message-Id: <20210411092158.5244-1-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Provags-ID: V03:K1:ZyBKdEUvD7g6azYfy1Mb5VrGT042Sl4wES7u4QmyYXAJG5oZnY9 ibpNVXKSnN/kxlvf8KwFrZqFiQDYZbSX0NishUCjsfq+2v2nQbF3PmezwhcIZXW8co58LWi 0CcDIms5gObI95EVT+8pI+upgaaXOtG43ovzgd8vbQYKdPyPa4ZTVv469LMN4T8UnGcY2YP 4Hz5DYZtdhXyONErWvzeQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:olIXS86oaYI=:9vP0n/9gVmEQMmMMJsE5h/ 5Flbczv+ePRMN8hzYvMvBwU9YbF7zDV9U/N/C2E/oTOxosLGD9zLfyep9igwhP8AXcYmGKDlW RrHTFjILmco3XJA4bbYa+cd47I1jq1eoyx83MRkkW+d9xT/RrOHiDFgyHhqLW6y5HfFZV7RD2 SLQwZSK1rjYNCvpnJFhgr3Yyi0SYZQRk5uRI2JFINTRaForNoZnpwTEoRHdABOvRj9toyXw6b 7fFmyfcCfzb7P17sRkTggK/srt0bifjHapUPxFP0FRxQmo+yNiGfmiV/WvYmFxm0HXShEabWZ 47iBl0DZ/RS/q1e+IMYW1F9+ArfIJkVfvKagG3h+ANTCWnOLOOrJty0JCod/pysfe4XtftNW8 kNF9PAHqlebvCzb/wS4e1g9YRpaBtjyEWEt8fK87VDYJa1yA44jX+FJdr5RT/a+oJxM6JQsB3 cF71blndWpLArHBbc3kCPsGZcUzfRm186/3xSq405o6rtbJPx6mviqwiURcANwGWhcVuTwWGp jzbWk4p+paoBleeuH5oQTa6oKkMlIqSIkXU89yIgZqZXDMF7UWTVBmyxpmXzhq7UbNN8R7XFU s3itKTjjYOrWivZmN0lyy/ltw3eHn57tghwIRNq3GFMKCzU44FqQgDgNaF6V8bozzZTghClo7 G/SKaEddfhXO361qQCIEbCD6ACtdEsk3GL++ADbgYyioK32W/f4ijMIy/65+/G5Seda7icxvv eE9DhRFlRjRCQXjL1aq7I07j4NUjrwE2WLmW7V4a7AaOCGQsEVtVeSz4LLu11a9bf0keNFMtG Xnk2hplefb6OWz1lgHorObGD06+MS3RIDhxM5C8Q82rEexYike3S2UTH1+adYK2HWtFa2HJCl iKkP5djyrlQ55X3lUyw9+zqxj018z2zWchpZt2DyFGdLvBYsAwi3puWziduC0xdLvRVfvjtoH PVHSVfHZAaZrA1tnnZgpzmEyCnST86hdoc5jNeIOszQuQ2BI4On53leviw2TOuzJLh+AeOpwl rk3HB58xXuHya7LDSssdFE4HQC1UXPttN0nuKlF9ue/U4LQ2ydF8IJgbro7qK0bVZDL1zRPcC aqy2XJXqMTrjiiehpZfTQb99N962SlDBGrsIg2H0xfBxbCpjHjl553qMlY5XYuSptFMW615y1 sW4t/YPeeSxMXbjP7zlAMCTOEp4dmTjhPn6dcTExDBDBbAvIxJxLQ2eLUnaaJKTzBgCx0= X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Add support for stack protector for UBOOT, SPL, and TPL as well as new pytest for stackprotector Two preparatory patches are needed. The first one avoids random failures of a unit test. The second cleans up the usage of CFLAGS_NON_EFI. The series was passes Gitlab CI: https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/7133 v10: Preparatory patches. Fix build errors. Heinrich Schuchardt (2): test: fix test/dm/regmap.c x86: correct usage of CFLAGS_NON_EFI Joel Peshkin (1): Add support for stack-protector MAINTAINERS | 7 +++++++ Makefile | 5 +++++ arch/arm/config.mk | 3 ++- arch/riscv/lib/Makefile | 1 + arch/x86/config.mk | 10 ++++++---- cmd/Kconfig | 9 +++++++++ cmd/Makefile | 1 + cmd/stackprot_test.c | 19 +++++++++++++++++++ common/Kconfig | 17 +++++++++++++++++ common/Makefile | 1 + common/stackprot.c | 20 ++++++++++++++++++++ configs/sandbox_defconfig | 2 ++ scripts/Makefile.spl | 6 ++++++ test/dm/regmap.c | 9 +++++---- test/py/tests/test_stackprotector.py | 14 ++++++++++++++ 15 files changed, 115 insertions(+), 9 deletions(-) create mode 100644 cmd/stackprot_test.c create mode 100644 common/stackprot.c create mode 100644 test/py/tests/test_stackprotector.py --- 2.30.2