From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74FC7C4332F for ; Mon, 7 Nov 2022 16:56:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1BAA76B0075; Mon, 7 Nov 2022 11:56:09 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 16B6A6B0078; Mon, 7 Nov 2022 11:56:09 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 032DD6B007B; Mon, 7 Nov 2022 11:56:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id E69676B0075 for ; Mon, 7 Nov 2022 11:56:08 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id C9CF51401A9 for ; Mon, 7 Nov 2022 16:56:08 +0000 (UTC) X-FDA: 80107248816.04.E6D293D Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf02.hostedemail.com (Postfix) with ESMTP id CF2EC80013 for ; Mon, 7 Nov 2022 16:56:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667840167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T50w0nkUuy7T2kUqSnZIRriHtEbo2iSXTPmDVdxQoV8=; b=BBBappHDpXzSDzbpyr58g/lpQFryWFSqGr7/HYROgluYZHTjHWzduuT79L6NoKwrsKGFF4 7ojOlp92BmN/YN8fdgYlDfKiLBL2P0IbnawP/s9WXKpkOwiYAvHB2fcNp6gBwLFsqPHHDH MeSmX7upUrW5NVIXajAHHiD57rhjDT4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-642-vUiqRtnoNq-2EW1fMouqkA-1; Mon, 07 Nov 2022 11:56:02 -0500 X-MC-Unique: vUiqRtnoNq-2EW1fMouqkA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 61A36101E14D; Mon, 7 Nov 2022 16:56:01 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A58641121314; Mon, 7 Nov 2022 16:55:55 +0000 (UTC) From: Florian Weimer To: "Edgecombe, Rick P" Cc: "hjl.tools@gmail.com" , "bsingharora@gmail.com" , "hpa@zytor.com" , "Syromiatnikov, Eugene" , "peterz@infradead.org" , "rdunlap@infradead.org" , "keescook@chromium.org" , "Yu, Yu-cheng" , "dave.hansen@linux.intel.com" , "Eranian, Stephane" , "kirill.shutemov@linux.intel.com" , "linux-mm@kvack.org" , "nadav.amit@gmail.com" , "jannh@google.com" , "dethoma@microsoft.com" , "kcc@google.com" , "linux-arch@vger.kernel.org" , "bp@alien8.de" , "oleg@redhat.com" , "Yang, Weijiang" , "Lutomirski, Andy" , "pavel@ucw.cz" , "arnd@arndb.de" , "tglx@linutronix.de" , "mike.kravetz@oracle.com" , "x86@kernel.org" , "linux-doc@vger.kernel.org" , "jamorris@linux.microsoft.com" , "john.allen@amd.com" , "rppt@kernel.org" , "mingo@redhat.com" , "Shankar, Ravi V" , "corbet@lwn.net" , "linux-kernel@vger.kernel.org" , "linux-api@vger.kernel.org" , "gorcunov@gmail.com" , "akpm@linux-foundation.org" Subject: Re: [RFC 37/37] fs/binfmt_elf: Block old shstk elf bit References: <20221104223604.29615-1-rick.p.edgecombe@intel.com> <20221104223604.29615-38-rick.p.edgecombe@intel.com> <87iljs4ecp.fsf@oldenburg.str.redhat.com> Date: Mon, 07 Nov 2022 17:55:54 +0100 In-Reply-To: (Rick P. Edgecombe's message of "Mon, 7 Nov 2022 16:49:58 +0000") Message-ID: <87h6zaiu05.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=BBBappHD; spf=pass (imf02.hostedemail.com: domain of fweimer@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=fweimer@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1667840168; a=rsa-sha256; cv=none; b=bmZnCxCpvWcyktPUsL0uh29LstmtxZqz0N4qqCxLFqcqxpC4Rx/VbPZsjhojwlxvV2MbzJ kVJlAUZiM1r3W2kBUKlWyekLTG6PSGcqbJ+HX0zjICJiev2uqVwYz0xHtAwoCcH7XGonFv kC4ZNoyJljQDTZRnKWOoQYVJwyhE4rw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1667840168; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=T50w0nkUuy7T2kUqSnZIRriHtEbo2iSXTPmDVdxQoV8=; b=dFodqwFsJxPVRwXUX49A5OxXtacHfFOpgbvn0vK7ZK8EZLo3KBE9nw4sDt087SzIRrmr0+ mK/vDtuoTaZrIvVMST6RWkMV9kiEDWOV7a4jLeka5Pc24hblYrUcts8JIIOWxSLo2SCMlB ro4n8l17vlroYXoJv+gJErfS2Mc3TI4= X-Stat-Signature: qdqth9qwka6z8mn3ek5qsbyw1hq4kndw X-Rspamd-Queue-Id: CF2EC80013 Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=BBBappHD; spf=pass (imf02.hostedemail.com: domain of fweimer@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=fweimer@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam05 X-Rspam-User: X-HE-Tag: 1667840167-469664 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: * Rick P. Edgecombe: > On Sun, 2022-11-06 at 10:33 +0100, Florian Weimer wrote: >> * H. J. Lu: >>=20 >> > This change doesn't make a binary CET compatible. It just requires >> > that the toolchain must be updated and all binaries have to be >> > recompiled with the new toolchain to enable CET. It doesn't solve >> > any >> > issue which can't be solved by not updating glibc. >>=20 >> Right, and it doesn't even address the library case (the kernel would >> have to hook into mmap for that). The kernel shouldn't do this. > > Shadow stack shouldn't enable as a result of loading a library, if > that's what you mean. It's the opposite=E2=80=94loading incompatible libraries needs to disable s= hadow stack (or ideally, not enable it in the first place). Technically, I think most incompatible code resides in libraries, so this kernel change achieves nothing besides punishing early implementations of the published-as-finalized x86-64 ABI. Thanks, Florian