Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp167749rdb; Thu, 8 Feb 2024 02:20:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV1M1j6Zts4Uxt2p3yfejJH/x4KTwopCA2nr7KsiMR3HSQoC8KV44CDP3AS6IKN7rrzQG3iQEw6cDAKUdfwc5XkVT36cgXtrOtsU8M1pQ== X-Google-Smtp-Source: AGHT+IEwKmunBhD2QhpsBBjmG2L3rbXa4by73xGsnhz9oN0f5ExwJRRddxGNxkoYkIztCTGKiAKL X-Received: by 2002:a25:aa72:0:b0:dc6:7176:b390 with SMTP id s105-20020a25aa72000000b00dc67176b390mr7849029ybi.21.1707387608206; Thu, 08 Feb 2024 02:20:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707387608; cv=pass; d=google.com; s=arc-20160816; b=o98rlnv+1cJYPLV3m7E/071lGfXFA2bQTGmRkTeKusdh+1YwO1ieXcKJT6yMyA/A2H l5uL2kXj31wx7Eio4t2h+8fnUauE55RLNdcQxmGvftS6sdO6W+xX5swtWJXO1wWmYVID spIISZ2Kf+0eqSVQhn4NLplYKZgIwPUNUOAFMnNx0xGwHw0P/dPwKHrIXMJIDY+j0AC3 3+Bsr9faeSpOO3os1pUhxO5B463IvLZKmu2vO8iiVzSaGF8ucAl0HrYhq8G3MNqxvvLD GWNf4O9ilr33phlKXTAyttnGzb73UhKAYub/+H5aXUF/K6LZrWNRgL/pIHPtySxKCmIx UA5g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=z5fQJ45PdxccK1L56OVjul93Ta54zY+xbJ8VnsBJoxY=; fh=s9ZGuFnpSwi7p+NLVe7hsxFgGNSWfH+X8gOEeQrV41M=; b=QNeb0oYlrtk4tSskdEptxp3hvwKPTu7gZug6Xe+BjgtW0p9ZfJLMrdB5ZNG9Pcs0zp ag7s2971hbFk1OspCBvSMQMhGwMVxfImYFM1j5YvzSVWwR4bn55s0/4augg7JNfiry2f 86PpzV/y/Ln3F+c5QiBdY1PemX5SlHAI/L8Nn+Dz5hhM6UUXDTKvns8EmglylXanMhBK 2j1ptb53X5bTzVJrcbgwGZgzIXUipuaE6M7Pydtl13Bj4/kpsR9oJbv5zIPPfnBoBxCu 29ymkGpk5TcdSE4C+JAYNwJUUOUMpQ0lNRhhfvUx2tIbR2xGDe0F0s5ZI2VVvdPuaF2T LATg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bewilderbeest.net header.s=thorn header.b=bIF6OqoW; arc=pass (i=1 spf=pass spfdomain=bewilderbeest.net dkim=pass dkdomain=bewilderbeest.net dmarc=pass fromdomain=bewilderbeest.net); spf=pass (google.com: domain of linux-kernel+bounces-57831-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57831-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=bewilderbeest.net X-Forwarded-Encrypted: i=2; AJvYcCUxAftJmrMO4ZOx26EK8g3z297DmK0/tm3zckGjhkqkXEqVG9VrUI/czHe8dBvyH9b1aX5bSaysi/Rx+SZqX+mRKsrM1FB0jiNTm9LObg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d30-20020a63735e000000b005cfbf651e25si3457865pgn.111.2024.02.08.02.20.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 02:20:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57831-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bewilderbeest.net header.s=thorn header.b=bIF6OqoW; arc=pass (i=1 spf=pass spfdomain=bewilderbeest.net dkim=pass dkdomain=bewilderbeest.net dmarc=pass fromdomain=bewilderbeest.net); spf=pass (google.com: domain of linux-kernel+bounces-57831-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57831-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=bewilderbeest.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3A57028BDCE for ; Thu, 8 Feb 2024 10:17:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CADB06D1CD; Thu, 8 Feb 2024 10:17:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=bewilderbeest.net header.i=@bewilderbeest.net header.b="bIF6OqoW" Received: from thorn.bewilderbeest.net (thorn.bewilderbeest.net [71.19.156.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 533636BFC2; Thu, 8 Feb 2024 10:17:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=71.19.156.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707387452; cv=none; b=DP792yGVH3xOTKf4PuDZYxT1nFZ42z9MxAcuutPyREovg6TXHYBF0F8nSpNhX4iHeBf9P7bv3NUkHalU5vGMWyIG03W8YlqEABrqlAFv75uc25kK3dqlIZOfjCrvy5ssRvd6TGeunxsPPhCYlqb2Y7qi0XFtBBcmJhtlydPVSzI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707387452; c=relaxed/simple; bh=Mx97f1IIrXA5jx8KWxAtL2kPGmFBm5rDhdqH8r3HIHE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=E+Jfzys9MXcajh2rn5SRi24AcYfsJ6YiilqDv718IFyOwNc9KvdhVtzoTuSFxgcFyHJMRbx9Oy9yenvIbRaCPX3oz2JpeQIrRG3L0OgqF8Mn0HjCfVVVuak6t4Nvm6m2gPRmpgeK5s0hYqO5RS1p6ZSFfZwuzfFYOGxuIyBKPao= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bewilderbeest.net; spf=pass smtp.mailfrom=bewilderbeest.net; dkim=pass (1024-bit key) header.d=bewilderbeest.net header.i=@bewilderbeest.net header.b=bIF6OqoW; arc=none smtp.client-ip=71.19.156.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bewilderbeest.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bewilderbeest.net Received: from hatter.bewilderbeest.net (unknown [IPv6:2602:61:712b:6300::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: zev) by thorn.bewilderbeest.net (Postfix) with ESMTPSA id E90BC55F; Thu, 8 Feb 2024 02:17:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bewilderbeest.net; s=thorn; t=1707387449; bh=z5fQJ45PdxccK1L56OVjul93Ta54zY+xbJ8VnsBJoxY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bIF6OqoW6AfsT35L0rMEayR+qDlGF+ec6WL21Y4yhwHGkxdCzxvZG+fEhr5dTj3pg 1pvLBexs36v9IPcDFVPiMPXUI2EGynxqw/J3nDIksQcBAHJf4GNNy6QRb/jfEGCrNa 60NIPtjNH6JFTBkkJfjQPGABrHnGg7Ntjgp1J30k= Date: Thu, 8 Feb 2024 02:17:27 -0800 From: Zev Weiss To: "Russell King (Oracle)" Cc: linux-parisc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Helge Deller , Florent Revest , "James E.J. Bottomley" , "Mike Rapoport (IBM)" , Rick Edgecombe , "Borislav Petkov (AMD)" , Andrew Morton , Yang Shi , Stefan Roesch , Oleg Nesterov , David Hildenbrand , Josh Triplett , Ondrej Mosnacek , Miguel Ojeda , openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, Sam James , stable@vger.kernel.org Subject: Re: [PATCH 0/2] ARM: prctl: Reject PR_SET_MDWE where not supported Message-ID: <3c8dd43f-9ab0-4b98-bad2-71c5f3da0348@hatter.bewilderbeest.net> References: <20240208012620.32604-4-zev@bewilderbeest.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: On Thu, Feb 08, 2024 at 01:20:57AM PST, Russell King (Oracle) wrote: >Hi, > >Where is patch 1 of this series? It doesn't seem to have been Cc'd to >linux-arm-kernel. Therefore, this can't be reviewed. > It went to (among others) the linux-parisc list, but not linux-arm-kernel as scripts/get_maintainers.pl didn't list it for that patch: https://lore.kernel.org/lkml/20240208012620.32604-5-zev@bewilderbeest.net/ I think I've gotten differing opinions from different subsystem maintainers on this, but FWIW my usual default approach is to use scripts/get_maintainer.pl on each patch and then add the set-union of them all to the cover letter for context; I'll try to remember the preference for linux-arm-kernel though. Is the link above sufficient for now, or shall I resend the series? Thanks, Zev >Thanks. > >On Wed, Feb 07, 2024 at 05:26:18PM -0800, Zev Weiss wrote: >> Hello, >> >> I noticed after a recent kernel update that my ARM926 system started >> segfaulting on any execve() after calling prctl(PR_SET_MDWE). After >> some investigation it appears that ARMv5 is incapable of providing the >> appropriate protections for MDWE, since any readable memory is also >> implicitly executable. >> >> (Note that I'm not an expert in either ARM arch details or the mm >> subsystem, so please bear with me if I've botched something in the >> above analysis.) >> >> The prctl_set_mdwe() function already had some special-case logic >> added disabling it on PARISC (commit 793838138c15, "prctl: Disable >> prctl(PR_SET_MDWE) on parisc"); this patch series (1) generalizes that >> check to use an arch_*() function, and (2) adds a corresponding >> override for ARM to disable MDWE on pre-ARMv6 CPUs. >> >> With the series applied, prctl(PR_SET_MDWE) is rejected on ARMv5 and >> subsequent execve() calls (as well as mmap(PROT_READ|PROT_WRITE)) can >> succeed instead of unconditionally failing; on ARMv6 the prctl works >> as it did previously. >> >> Since this was effectively a userspace-breaking change in v6.3 (with >> newer MDWE-aware userspace on older pre-MDWE kernels the prctl would >> simply fail safely) I've CCed -stable for v6.3+, though since the >> patches depend on the PARISC one above it will only apply cleanly on >> the linux-6.6.y and linux-6.7.y branches, since at least at time of >> writing the 6.3 through 6.5 branches don't have that patch backported >> (due to further missing dependencies [0]). >> >> >> Thanks, >> Zev >> >> [0] https://lore.kernel.org/all/2023112456-linked-nape-bf19@gregkh/ >> >> Zev Weiss (2): >> prctl: Generalize PR_SET_MDWE support check to be per-arch >> ARM: prctl: Reject PR_SET_MDWE on pre-ARMv6 >> >> arch/arm/include/asm/mman.h | 14 ++++++++++++++ >> arch/parisc/include/asm/mman.h | 14 ++++++++++++++ >> include/linux/mman.h | 8 ++++++++ >> kernel/sys.c | 7 +++++-- >> 4 files changed, 41 insertions(+), 2 deletions(-) >> create mode 100644 arch/arm/include/asm/mman.h >> create mode 100644 arch/parisc/include/asm/mman.h >> >> -- >> 2.43.0 >> >> >> _______________________________________________ >> linux-arm-kernel mailing list >> linux-arm-kernel@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel >> > >-- >RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ >FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!