From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 74FE2359A81 for ; Tue, 23 Jun 2026 07:53:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782201195; cv=none; b=VOCT+haGyGr8JgkmoHkV9Eey0pVCFogFr2hSckeD+4AqqJQK8m7t8VctyHWIV3tZb5z40e9WVnKa+Rq+VtDZaj9S/TdsM4w7Ls/+Tv0Lm+JrnEWr136GoXcrhbtEJxWrb5VSj25+Ei9WcQ01nNnjlyi5znvF3kKgbfuLLnti+zE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782201195; c=relaxed/simple; bh=ZXtqENYReovGugKYFA3L15SB1Ff+bnxaF44dCm0yNoY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=FzlrTvqDbjkpgp5rbxacWZ4imNISn3HT8U0xMwfrx4tJ3Y3O+TuZcP8/z4BHnaoMhttV8dY946UlPx7JxEgtdf70XXGnGIQ6dUhgAKlAhnAI+q5ytauAQsRzRzdI9Y9prf/SpxI6Rr66T7pcaSJ3AhuKQSheae1uqHXna7JDoTE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=B3tH7NoA; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="B3tH7NoA" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2BA451691; Tue, 23 Jun 2026 00:53:08 -0700 (PDT) Received: from [10.57.81.124] (unknown [10.57.81.124]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 049113F836; Tue, 23 Jun 2026 00:53:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1782201192; bh=ZXtqENYReovGugKYFA3L15SB1Ff+bnxaF44dCm0yNoY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=B3tH7NoAsYZbSMGgKnGffFnbcRhtvj6lHOVksd+AR+LFK7Q6YbmO0GkuHIrWf2iee 5ePgkikuKLdV1g5u/nVKy0MeQbJzlVglm1cFaEPnK1FHW4sssWCjUYfhlyzcP6CEWi KTYVVZgmuoTErfedbhk/WVmPAxs+AwUP6xkdONOs= Message-ID: <7504f24b-dff7-4aaa-80c7-018b44ecb763@arm.com> Date: Tue, 23 Jun 2026 09:53:06 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] arm64: mm: Defer read-only remap of data/bss linear alias To: Ard Biesheuvel , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Catalin Marinas , Will Deacon , Fuad Tabba References: <20260619163940.3185308-2-ardb+git@google.com> <2deff570-0497-4438-94ba-a9691881a016@arm.com> <2d27eaa8-3324-48b3-97b0-aecf63639c18@app.fastmail.com> From: Kevin Brodsky Content-Language: en-GB In-Reply-To: <2d27eaa8-3324-48b3-97b0-aecf63639c18@app.fastmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 22/06/2026 18:42, Ard Biesheuvel wrote: >> It would also be good to explain why we can't do this in >> mark_linear_text_alias_ro() (presumably because this is too early). I do >> agree that honouring rodata=off is a good thing, though. >> > I didn't consider that tbh - I'll check whether that is a more suitable > location. But generally, I think doing it later rather than earlier is > fine because it reduces the likelihood of hidden issues such as the one > being addressed by this patch, and I don't think doing this very early > makes a meaningful difference in terms of robustness. That makes sense, probably not worth the hassle of checking if mark_linear_text_alias_ro() would work. >> BTW, if only kvm_arm_init() needs to read the data/bss via the linear >> map, maybe we can still unmap it later? >> > Yes, it is still my intent to bring back the patches that unmap this alias > entirely, including some additional tweaks for the fixmap PTE level table > that I dropped after an earlier revision. But that will be 7.3 material, > whereas this fixes a regression due to the changes that were pulled for 7.2. Sounds good. - Kevin