From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC99624DD17 for ; Sun, 23 Aug 2026 16:47:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787503624; cv=none; b=Zz+1D8aaOCfjDMuwt9S7QgnqLdfp60IV8M++uX/KOn3el7XZmKIke2EZCaG8i4TA5twEbWCVxvf12jp9jzUw+lPkTUZn7U2mtj9Kl0LIXg/Y+iDlFL15sE8FQaDHlt4QhhOU6v9IUZQZrjb2XP8Gq1o8f6/Uapvu23Lag49sgfA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787503624; c=relaxed/simple; bh=4nJtT0eByBpmmlqV8mf77eY46G8vbRGQvMMyJIfFa2M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=f2eEnB03nfuro4utSVEZc02QPRZZPacWN+JqgKmb/EGJX85TUgfRDDb2W2/sBpXcQypaF+VnzFN1D35x/fuWM7NBuqF5P28S/xRAc2s9bgdjlO2cF2vk7vyO4cLMMavqwEXwxlIs7HMEy1Nt5YalkN0wuONdgaR+f7j4YVMRkwM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=ctcOsr2z; arc=none smtp.client-ip=209.85.221.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ctcOsr2z" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-47fde295992so1766868f8f.0 for ; Sun, 23 Aug 2026 09:47:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1787503621; x=1788108421; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=/ZF6HUGQYWvBUACVOKONbBRQQpsYWeEt/fKmrPzcNd4=; b=ctcOsr2z/R+JRBIwogX2QZBRCa1XQokGcjKMYqrvZwX4qOGvf8zUPEC+ZQ1UpqcSgN VpgBAZjep0QM8rxzl3kpCWVuHD7aD3o5OpGvbL7vg3MkH3qih9ef8UkI2twA1DG3SyCU JeoydYU2UM+bpcvzkBKPX0QYB7A40IOWXv2ifGU9kidkcOhPkqARTJQdIMfKc/HIx7Ri q4lFdiBZERWNWhR+FJJyBjZColY5s0j8hqe4Wd34sRkH68KyNkpxuSJjforgtZvrust/ Q5E6z2TUauD5qi37KGEsSI8V1G5wuBX3UzxoQ4gFA/fxAoo/NTqOoP5IAFFV6WPctNXc Ffew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787503621; x=1788108421; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=/ZF6HUGQYWvBUACVOKONbBRQQpsYWeEt/fKmrPzcNd4=; b=i/T6tr2r6JtGido9xkCYlkxscxB7qwavOc5SFUqkBTT5TpK7Y1FNyDN9gj5qfxmKA0 9xbhcnDRw112YPBrLH9jpNWvKgURS4EeEemW4eBb/COc8EdLtOz6CyVl79fCzNlol0Ez RUgKgSLiiSL4lGSAW8oHZm1XTOeIdEMiGVxq/iu+tjb3Eg/jxexBo2F54hhsDItTilzB iAHLip3tGXm9rhF2udxnRS+ek8epMFOo+wcJjVY5ODfB4ZeTgRSAMMzdSJOETdfKb5tv a3Uuz1+qnSdnlbnwrKhwRUPGe2sNI4m8XefQaI4Lpa2IrwbBRakzOvLxqVgM6wugtrLP +Tew== X-Gm-Message-State: AFuF++nRcPivfqZ3RDPU7gqIkgrYLX9LfTADv4rIoJg9zXN7uq81NbUY K1bJ58WLZfag5FSSL1kOxzHIj9Jgp1zOMwcm4B2ye4lp2oE6JmZjD1t3jZNt6SKKkA== X-Gm-Gg: AR+sD11Vwj5W7QgEcvQc/esBfgEn0ap4lKWkk2La8TAqIOWfV0+bgkO/MEdANd6NPDR dCfeYOrZoV2bdmK2UZ7mXdHZSxAQ9ZDJDlgJZcieJAha4GYeNbQXL160/WMJfCpfV3CGpBcnJi6 cbqtJ1idSTitOJPnSOh8JREb3TAWay/XAZBH2w0zufiVJ8mUWgwLF6i81ImtPDExWsgsVhRiRgX WMxScbMlgY0V2EoW+9ZCTvb0pew6oxCI1hLzaGxkOPCoUWCkAh2B6q8qp+aEhTZjsmTyh88petz 5Bq44WKaiNqaI7Y2A8En6K/fyDQjJm9j++TBcu3ssvqMy+MeTG2x/hQCN5eIn1DXpA1HjUc/fNe 2U92XByds7QlysAQwdFrmHg+QccxlwDm7KTpMupaZCQ9ztMwxwfmvRVDZmZMZ9cxXFwOUrMkpEW CK3aENfyJV9IdUsdP4IyUuE6fSJzE02/mo4Hw4Rx0D3e01Ol+illaDIrPBOqqFZiPRpLkNZXMaT JFj+0qqRCVzOlZJaco2wSWX7w== X-Received: by 2002:a05:6000:3104:b0:47f:8554:a341 with SMTP id ffacd0b85a97d-482b784c4bbmr35989706f8f.13.1787503620630; Sun, 23 Aug 2026 09:47:00 -0700 (PDT) Received: from google.com (78.207.190.35.bc.googleusercontent.com. [35.190.207.78]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-482c9bfd2bbsm5538099f8f.18.2026.08.23.09.46.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Aug 2026 09:46:58 -0700 (PDT) Date: Sun, 23 Aug 2026 16:46:55 +0000 From: Adrian =?utf-8?Q?Barna=C5=9B?= To: Ard Biesheuvel Cc: linux-kernel@vger.kernel.org, Ard Biesheuvel , Catalin Marinas , Will Deacon , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Andrew Morton , Mike Rapoport , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen , Aaron Tomlin , Ryan Roberts , Kevin Brodsky , linux-arm-kernel@lists.infradead.org, linux-trace-kernel@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org Subject: Re: [RFC PATCH 6/9] arm64: Enable the execmem ROX cache for module text Message-ID: References: <20260822135323.795946-11-ardb+git@google.com> <20260822135323.795946-17-ardb+git@google.com> 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: <20260822135323.795946-17-ardb+git@google.com> On Sat, Aug 22, 2026 at 03:53:28PM +0200, Ard Biesheuvel wrote: >From: Ard Biesheuvel > >Wire up the existing support for the execmem ROX cache on arm64, so that >it will be used for module .text and .init.text regions. This will be >relied upon by a subsequent patch in order to allocate those regions >from a single chunk of memory. > Until Mike lands his changes [1] on set_direct_map, enabling ROX_CACHE on ARM64 would cause a permission fault when the same part of the direct map is used again (the RO flag is not properly stripped off after an execmem cache clean). [1]: https://lore.kernel.org/all/20260823-execmem-set-vm-perms-v0-2-v2-0-b013a37d84b3@kernel.org/ Best regards, Adrian