Message ID | 20230523-nolibc-stackprotector-gcc9-v1-0-3e4804235d50@weissschuh.net |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2643934vqo; Tue, 23 May 2023 23:56:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7JOfthGG5Uv/MCJkkwpwMsBChzgIife3w70fCCuj2NUNKKG5OKX39oECBsQ3/LrqHuoVZr X-Received: by 2002:a17:903:2444:b0:1aa:f203:781c with SMTP id l4-20020a170903244400b001aaf203781cmr20982853pls.44.1684911386413; Tue, 23 May 2023 23:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684911386; cv=none; d=google.com; s=arc-20160816; b=Gg1m47JIlKB+koWgE2Ts1+WsTIodBxkA5qK92wEl3DwHwlUDAjpAXrz3jXPdpgL3gQ rp24yyhOVRkjyL/gLGEq/OFojEhqo+e1arPAQSeneyT1rw97CqUR0uGCbldX2PVjKRnJ PfgdHMopv6toUwfckxMcYFkZNOjwUrpKL6hnyfdmiVZoBBiVqBNWA67P5ok3BJfesvJx 9REFpbIQOd+FaVlOerLilmB5Qy1ORUDzzWTrRGC538fiYzV1v+zpPTLJwpL1VzHGqkD9 rHcFeDEte1+nQZkgXtQSSYs8bnaYscpkERvso4BOw+fkM6FviHGSNy3cNd74hEwY81Lb qQ5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:dkim-signature:from; bh=KXDQ/yxZ0ohgcdGi8Oi41N3h1dxnisFIXUO0K2t10Xg=; b=NR6zdwyxzPDSQOPkm7SBKnvWp74mcNKSfmAvQYj99mO/rDZOZqFOOCJCSYcGyD8ErD VuUe8i974Fqe0oFl6+hTs+rAUK/WnOUP96R+l1UJxGR5ljciI/rfn6BusSpbsyePAL/U EA1qxCPwh0lfl+MbjnruK7G4wvcvYh2WA6jb+dsPoEG3L5gTq81XQwwOl/px3cU7KSU7 /M5fwjcctjxWW1nqBvSL7SzgeuSDljZQS6XXbuBTXn6KEvz7Q/SxRoUVlfchoTQ9hdtu efIhNivXc6qom1vGAB9G3OOBnCqY4UbrNrAN0yT0qKBHNYk1d6dwt4BkmlJgC7+uc8t1 oS3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=ht2yqTZe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c12-20020a170902d48c00b001ae3fa8de08si213022plg.576.2023.05.23.23.56.13; Tue, 23 May 2023 23:56:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=ht2yqTZe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238865AbjEXGqu (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Wed, 24 May 2023 02:46:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235788AbjEXGpw (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 24 May 2023 02:45:52 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0F0C18D; Tue, 23 May 2023 23:44:50 -0700 (PDT) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1684910688; bh=O1oDBEfZrMirjlbecuPJrH574m6Ohdf1ItbhTKlrEjI=; h=From:Subject:Date:To:Cc:From; b=ht2yqTZeKv6LzUZha6EPeYtNgnQRnSMKkCA3G2s4yGzdGgvtCc3O+Wan3e1ulQ83c 5hCznMkRAXJtg0maOrsfdhdZx0HByzK8GLS/YPQs1U7yI3vZkvH5po12GhNTTF+0ze hGWJUTVA8Iz2jNwZPB5fYSbOaIZl8uc9hZNbqPrQ= Subject: [PATCH 0/3] tools/nolibc: stack protector compatibility fixes Date: Wed, 24 May 2023 08:44:41 +0200 Message-Id: <20230523-nolibc-stackprotector-gcc9-v1-0-3e4804235d50@weissschuh.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIAFmybWQC/x2NQQrCMBAAv1L27EKaorZ+RTwk27VdDEnZjSKU/ t3gceYws4OxChvcuh2UP2JScoP+1AGtIS+MMjcG7/zgzn7AXJJEQquBXpuWylSL4kI04cgc596 F63QZoQViMMaoIdPaEvmdUpOb8lO+/+P9cRw/ZUPgcoEAAAA= To: Willy Tarreau <w@1wt.eu>, Shuah Khan <shuah@kernel.org> Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Zhangjin Wu <falcon@tinylab.org>, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net> X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1684910688; l=1233; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=O1oDBEfZrMirjlbecuPJrH574m6Ohdf1ItbhTKlrEjI=; b=/4nb//vyfjDcXpmlXxL6cXxCgsjdFwq/fOL3SDCndBD3Ho39yWGtHbc5aYy8INfLQ+9gqYixE Xdusi0/HrzoBOe0uylH/Trhw7P0CNYYax0D1nidOclWIShxD6GWZrMp X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766757641915934571?= X-GMAIL-MSGID: =?utf-8?q?1766757641915934571?= |
Series |
tools/nolibc: stack protector compatibility fixes
|
|
Message
Thomas Weißschuh
May 24, 2023, 6:44 a.m. UTC
Two fixes for nolibc to
* allow users to explicitly disable (or theoretically enable) when
building the tests
* fix stackprotectors on GCC < 10.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Thomas Weißschuh (3):
Revert "EXP: tools/nolibc: partially revert stackprotector compiler flags"
selftests/nolibc: allow disabling of stackprotector support
tools/nolibc: fix segfaults on compilers without attribute no_stack_protector
tools/include/nolibc/arch-aarch64.h | 2 +-
tools/include/nolibc/arch-arm.h | 2 +-
tools/include/nolibc/arch-i386.h | 2 +-
tools/include/nolibc/arch-loongarch.h | 2 +-
tools/include/nolibc/arch-mips.h | 2 +-
tools/include/nolibc/arch-riscv.h | 2 +-
tools/include/nolibc/arch-x86_64.h | 2 +-
tools/include/nolibc/compiler.h | 10 ++++++++++
tools/include/nolibc/stackprotector.h | 2 +-
tools/testing/selftests/nolibc/Makefile | 13 ++-----------
10 files changed, 20 insertions(+), 19 deletions(-)
---
base-commit: 8213b0cdb51d1f66af713e00fd0dff3c2eb47636
change-id: 20230523-nolibc-stackprotector-gcc9-8eebd10a7968
Best regards,
Comments
Hi Thomas, On Wed, May 24, 2023 at 08:44:41AM +0200, Thomas Weißschuh wrote: > Two fixes for nolibc to > * allow users to explicitly disable (or theoretically enable) when > building the tests > * fix stackprotectors on GCC < 10. Nice, thank you. Just tested with gcc 9.5, works both with and without stkp. Now pushed to branch 20230524-nolibc-rv32+stkp4. I've dropped my exp patch and the associated revert. I think your two patches that clean up the makefile options and the new one here that restores the cflags should be squashed since the latter just partially reverts the former, and that way the series remains bisectable. Just let me know if you're OK, I can just to that and re-push. Have a nice day! Willy
On 2023-05-24 09:35:30+0200, Willy Tarreau wrote: > Hi Thomas, > > On Wed, May 24, 2023 at 08:44:41AM +0200, Thomas Weißschuh wrote: > > Two fixes for nolibc to > > * allow users to explicitly disable (or theoretically enable) when > > building the tests > > * fix stackprotectors on GCC < 10. > > Nice, thank you. Just tested with gcc 9.5, works both with and without > stkp. Now pushed to branch 20230524-nolibc-rv32+stkp4. I've dropped my > exp patch and the associated revert. I think your two patches that clean > up the makefile options and the new one here that restores the cflags > should be squashed since the latter just partially reverts the former, > and that way the series remains bisectable. Just let me know if you're > OK, I can just to that and re-push. Sounds good to me! Thomas
On Wed, May 24, 2023 at 09:38:44AM +0200, Thomas Weißschuh wrote: > On 2023-05-24 09:35:30+0200, Willy Tarreau wrote: > > Hi Thomas, > > > > On Wed, May 24, 2023 at 08:44:41AM +0200, Thomas Weißschuh wrote: > > > Two fixes for nolibc to > > > * allow users to explicitly disable (or theoretically enable) when > > > building the tests > > > * fix stackprotectors on GCC < 10. > > > > Nice, thank you. Just tested with gcc 9.5, works both with and without > > stkp. Now pushed to branch 20230524-nolibc-rv32+stkp4. I've dropped my > > exp patch and the associated revert. I think your two patches that clean > > up the makefile options and the new one here that restores the cflags > > should be squashed since the latter just partially reverts the former, > > and that way the series remains bisectable. Just let me know if you're > > OK, I can just to that and re-push. > > Sounds good to me! Now done, keeping the first commit's message (still valid) and force-pushed. thanks! Willy