From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by sourceware.org (Postfix) with ESMTPS id 3BE883857C5A for ; Tue, 8 Sep 2020 10:16:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3BE883857C5A Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4Bm1KL5QclzQlQB; Tue, 8 Sep 2020 12:16:54 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter01.heinlein-hosting.de (spamfilter01.heinlein-hosting.de [80.241.56.115]) (amavisd-new, port 10030) with ESMTP id ojFlOldI9Lqo; Tue, 8 Sep 2020 12:16:51 +0200 (CEST) Date: Tue, 08 Sep 2020 12:16:45 +0200 From: Iain Buclaw Subject: Re: [PATCH] libphobos: libdruntime doesn't support shadow stack (PR95680) To: "H.J. Lu" Cc: GCC Patches References: <20200907213540.1881766-1-ibuclaw@gdcproject.org> In-Reply-To: MIME-Version: 1.0 Message-Id: <1599560137.uqp3ab0rt4.astroid@galago.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-MBO-SPAM-Probability: X-Rspamd-Score: -3.88 / 15.00 / 15.00 X-Rspamd-Queue-Id: A60FA26B X-Rspamd-UID: a4c392 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2020 10:17:00 -0000 Excerpts from H.J. Lu's message of September 8, 2020 4:09 am: > On Mon, Sep 7, 2020 at 2:35 PM Iain Buclaw wrote= : >> >> Hi, >> >> This patch removes whatever CET support was in the switchContext routine >> for x86 D runtime, and instead uses the ucontext fallback, which propely >> handles shadow stack handling. >> >> Rather than implementing support within D runtime itself, use libc >> getcontext/setcontext functions if CET is enabled instead. >> >> HJ, does this look reasonable before I commit it? The detection has >> been done at configure-time, rather than adding a predefined version >> condition for CET within the compiler. >> >> Done regression testing on x86_64-linux-gnu/-m32/-mx32. >> >> Regards >> Iain. >> >> --- >> libphobos/ChangeLog: >> >> PR d/95680 >> * Makefile.in: Regenerate. >> * configure: Regenerate. >> * configure.ac (DCFG_ENABLE_CET): Substitute. >> * libdruntime/Makefile.in: Regenerate. >> * libdruntime/config/x86/switchcontext.S: Remove CET support cod= e. >> * libdruntime/core/thread.d: Import gcc.config. Don't set versi= on >> AsmExternal when GNU_Enable_CET is true. >> * libdruntime/gcc/config.d.in (GNU_Enable_CET): Define. >> * src/Makefile.in: Regenerate. >> * testsuite/Makefile.in: Regenerate. >=20 > Looks good. I can try it on Tiger Lake after it has been checked in. >=20 OK, I have committed it as r11-3047. Iain.