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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8930C433F5 for ; Wed, 20 Apr 2022 05:33:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351104AbiDTFgK (ORCPT ); Wed, 20 Apr 2022 01:36:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236362AbiDTFgI (ORCPT ); Wed, 20 Apr 2022 01:36:08 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A25836B6A for ; Tue, 19 Apr 2022 22:33:20 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id d23-20020a17090a115700b001d2bde6c234so2811370pje.1 for ; Tue, 19 Apr 2022 22:33:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hnW6ITWz2YDcWQnTq9FpOk+73CLbsXJ06SvhUXIrkNc=; b=QYDHiQY3dNhb27GABAU/5GW+ECc/5koOekibJmxPB5ip6j7KOnFXo356i6Rkkk+Y0y 4zFkMztQuIBzKS+1AiRkHsUbySJA1DT30XoEvhpV8F64jPpoCdcOQlOT/pYg4+SNAO6a U37u6JBkFPpdx6VVYg8yf5ml0lWSoHnGHzFpc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hnW6ITWz2YDcWQnTq9FpOk+73CLbsXJ06SvhUXIrkNc=; b=UXkRIaFWaYP5e2Ep6QJscmDVOHkuHPcofWbCHUZUDcJ0o8FiywLSGsxteqf/uuv/30 ANKti9Xx5No0fKIsSFFoRuW9S12eB6uZDs85z1soTMXjTtlWIyE3rOySl2K5xZ6ssAAy G1tI4/nqETvCh7xIvhP789Ki2N06MwPoHlNsvVCY2z5c2sHQ0vG6DzL5EEXKrvsVZTHe lcove/mDxs0y5kNrGdgqqEAkyL5PU8wH6r6lnWNf0imrLE/hZYnL6r+WZXcuTMqioZzR jBSguRuEGxW3iaClRgmBLEpfzxXfe/0BPCYH+LgztHju6co/BItDpU48/0zhiemu1ZkD 9JcA== X-Gm-Message-State: AOAM533erq4Hf+auKWzDXKUnCN0XhPa/8RfFVclxoY8g8e9/Pn65wUkI D2kyuMcX08DAsin5U3UjE6XDEA== X-Google-Smtp-Source: ABdhPJx41LeczR669y78GNJRIV70hrjaeefY5K7srln+1SMsu01He+CrKVT95wg8yWPc6eF9mmQeTw== X-Received: by 2002:a17:902:c40d:b0:15a:2d52:7900 with SMTP id k13-20020a170902c40d00b0015a2d527900mr1457170plk.99.1650432800101; Tue, 19 Apr 2022 22:33:20 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id ml1-20020a17090b360100b001cd40539cd9sm17636859pjb.1.2022.04.19.22.33.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Apr 2022 22:33:19 -0700 (PDT) From: Kees Cook To: will@kernel.org, broonie@kernel.org, catalin.marinas@arm.com Cc: Kees Cook , linux-arm-kernel@lists.infradead.org, jeremy.linton@arm.com, hjl.tools@gmail.com, libc-alpha@sourceware.org, szabolcs.nagy@arm.com, yu-cheng.yu@intel.com, ebiederm@xmission.com, linux-arch@vger.kernel.org Subject: Re: [PATCH v13 0/2] arm64: Enable BTI for the executable as well as the interpreter Date: Tue, 19 Apr 2022 22:33:06 -0700 Message-Id: <165043278356.1481705.13924459838445776007.b4-ty@chromium.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220419105156.347168-1-broonie@kernel.org> References: <20220419105156.347168-1-broonie@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org On Tue, 19 Apr 2022 11:51:54 +0100, Mark Brown wrote: > Deployments of BTI on arm64 have run into issues interacting with > systemd's MemoryDenyWriteExecute feature. Currently for dynamically > linked executables the kernel will only handle architecture specific > properties like BTI for the interpreter, the expectation is that the > interpreter will then handle any properties on the main executable. > For BTI this means remapping the executable segments PROT_EXEC | > PROT_BTI. > > [...] Applied to for-next/execve, thanks! [1/2] elf: Allow architectures to parse properties on the main executable https://git.kernel.org/kees/c/b2f2553c8e89 [2/2] arm64: Enable BTI for main executable as well as the interpreter https://git.kernel.org/kees/c/b65c760600e2 -- Kees Cook 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7782AC433EF for ; Wed, 20 Apr 2022 05:34:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=U5Fnc5vrCNzFQg1IwwEt/pqkTjCcOb/qpafJKezr55Q=; b=OqhNueshqE6dOD 8UO6VLaKUcrEX8kEInYQ6RduYmvcPxtZOUFNYXeQ1n6iR06zqfgVzcdnN8QjBEcJjUP//npeWFA8H m8fo1PWcwjyJHqHYZRp1dM7r2tAqGS4/dHh5le2mFENZa5QdE4oe4GXqHmOd5kdVER2aRkiisfKrE u3s9suCif0YKwFX0XoFETWC09wykkmXAAvzerm7UQbjfy3DLOL8XLAky9DTiU/u4uEqfCROMcCgU7 wBy6t51k8zjPQ4dnuTHntZGzMRQXdhMbstsU+eQEHNMzo4GiPEB4663cmGC38XoA29RjaLFvZ0lCF dvmlu8QMbGmNtfmllVAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nh2xx-007QQ7-R0; Wed, 20 Apr 2022 05:33:25 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nh2xu-007QP7-Cr for linux-arm-kernel@lists.infradead.org; Wed, 20 Apr 2022 05:33:23 +0000 Received: by mail-pl1-x62b.google.com with SMTP id j8so805955pll.11 for ; Tue, 19 Apr 2022 22:33:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hnW6ITWz2YDcWQnTq9FpOk+73CLbsXJ06SvhUXIrkNc=; b=QYDHiQY3dNhb27GABAU/5GW+ECc/5koOekibJmxPB5ip6j7KOnFXo356i6Rkkk+Y0y 4zFkMztQuIBzKS+1AiRkHsUbySJA1DT30XoEvhpV8F64jPpoCdcOQlOT/pYg4+SNAO6a U37u6JBkFPpdx6VVYg8yf5ml0lWSoHnGHzFpc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hnW6ITWz2YDcWQnTq9FpOk+73CLbsXJ06SvhUXIrkNc=; b=s4oD//eQva1DqN0vdcDl+hvQjBkteunKR5CDLS2km6x16NOTOJ5NfUjZCHTIuMbnE/ DJpZuzNGhU9IiH2Ln9r7Hm/pITSSdEfph5zKY70DRpN2wIvO7rphJff5+en+YLIP2TVe r5nzHQuSzQFLutTGh8lRVG0oVDxHCSw4j7XJ0wEa+4kUS35PY1dZ6gbc8lcegpryd4EA JXH5wP36F9bDz1pS4RNLQSXipQ18s4JPQOufBEqn49iKmGH/DP+OSUzadUGJ/9FZKwny jhx9AUmx4lWxKCuBju0dqKsXABOne9jgHWNQ/FAPTzw2tYAsw+gKbc9gi1PDccxVzUR/ 0ztQ== X-Gm-Message-State: AOAM531UfYctWJfag0gDu6JKRyWpskK8nzhZbtkZypHi1V/P51hIhyJY CiT0nQ2FF0Z7Sh9FpGBCtXXepg== X-Google-Smtp-Source: ABdhPJx41LeczR669y78GNJRIV70hrjaeefY5K7srln+1SMsu01He+CrKVT95wg8yWPc6eF9mmQeTw== X-Received: by 2002:a17:902:c40d:b0:15a:2d52:7900 with SMTP id k13-20020a170902c40d00b0015a2d527900mr1457170plk.99.1650432800101; Tue, 19 Apr 2022 22:33:20 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id ml1-20020a17090b360100b001cd40539cd9sm17636859pjb.1.2022.04.19.22.33.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Apr 2022 22:33:19 -0700 (PDT) From: Kees Cook To: will@kernel.org, broonie@kernel.org, catalin.marinas@arm.com Cc: Kees Cook , linux-arm-kernel@lists.infradead.org, jeremy.linton@arm.com, hjl.tools@gmail.com, libc-alpha@sourceware.org, szabolcs.nagy@arm.com, yu-cheng.yu@intel.com, ebiederm@xmission.com, linux-arch@vger.kernel.org Subject: Re: [PATCH v13 0/2] arm64: Enable BTI for the executable as well as the interpreter Date: Tue, 19 Apr 2022 22:33:06 -0700 Message-Id: <165043278356.1481705.13924459838445776007.b4-ty@chromium.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220419105156.347168-1-broonie@kernel.org> References: <20220419105156.347168-1-broonie@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220419_223322_491292_EF0323DE X-CRM114-Status: GOOD ( 10.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 19 Apr 2022 11:51:54 +0100, Mark Brown wrote: > Deployments of BTI on arm64 have run into issues interacting with > systemd's MemoryDenyWriteExecute feature. Currently for dynamically > linked executables the kernel will only handle architecture specific > properties like BTI for the interpreter, the expectation is that the > interpreter will then handle any properties on the main executable. > For BTI this means remapping the executable segments PROT_EXEC | > PROT_BTI. > > [...] Applied to for-next/execve, thanks! [1/2] elf: Allow architectures to parse properties on the main executable https://git.kernel.org/kees/c/b2f2553c8e89 [2/2] arm64: Enable BTI for main executable as well as the interpreter https://git.kernel.org/kees/c/b65c760600e2 -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel