From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by sourceware.org (Postfix) with ESMTPS id 333CD384B0C1 for ; Tue, 21 Apr 2020 09:57:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 333CD384B0C1 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=fw@deneb.enyo.de Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1jQpeG-0001PA-Iu; Tue, 21 Apr 2020 09:57:00 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1jQpeG-0008JI-Gx; Tue, 21 Apr 2020 11:57:00 +0200 From: Florian Weimer To: Nicholas Piggin Cc: Rich Felker , Nicholas Piggin via Libc-alpha , libc-dev@lists.llvm.org, linuxppc-dev@lists.ozlabs.org, musl@lists.openwall.com Subject: Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2 References: <1586931450.ub4c8cq8dj.astroid@bobo.none> <20200415225539.GL11469@brightrain.aerifal.cx> <1586994952.nnxigedbu2.astroid@bobo.none> <20200416095800.GC23945@port70.net> <1587341904.1r83vbudyf.astroid@bobo.none> <20200420012904.GY11469@brightrain.aerifal.cx> <1587348046.pwnfbo52iq.astroid@bobo.none> <20200420211751.GF23945@port70.net> Date: Tue, 21 Apr 2020 11:57:00 +0200 In-Reply-To: <20200420211751.GF23945@port70.net> (Szabolcs Nagy's message of "Mon, 20 Apr 2020 23:17:51 +0200") Message-ID: <87eeshupoz.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_NUMSUBJECT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 09:57:05 -0000 * Szabolcs Nagy: > * Nicholas Piggin [2020-04-20 12:08:36 +1000]: >> Excerpts from Rich Felker's message of April 20, 2020 11:29 am: >> > Also, allowing patching of executable pages is generally frowned upon >> > these days because W^X is a desirable hardening property. >> >> Right, it would want be write-protected after being patched. > > "frowned upon" means that users may have to update > their security policy setting in pax, selinux, apparmor, > seccomp bpf filters and who knows what else that may > monitor and flag W&X mprotect. > > libc update can break systems if the new libc does W&X. It's possible to map over pre-compiled alternative implementations, though. Basically, we would do the patching and build time and store the results in the file. It works best if the variance is concentrated on a few pages, and there are very few alternatives. For example, having two syscall APIs and supporting threading and no-threading versions would need four code versions in total, which is likely excessive.