linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Ard Biesheuvel" <ardb@kernel.org>,
	"Yang Shi" <yang@os.amperecomputing.com>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Will Deacon" <will@kernel.org>,
	"Ryan Roberts" <ryan.roberts@arm.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"David Hildenbrand" <david@redhat.com>,
	"Lorenzo Stoakes" <lorenzo.stoakes@oracle.com>,
	"Dev Jain" <dev.jain@arm.com>,
	scott@os.amperecomputing.com,
	"Christoph Lameter (Ampere)" <cl@gentwo.org>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH v8 4/5] arm64: mm: split linear mapping if BBML2 unsupported on secondary CPUs
Date: Mon, 02 Feb 2026 09:11:26 +0100	[thread overview]
Message-ID: <625eaac4-6972-4d4e-ac8d-52cc19e4fe33@app.fastmail.com> (raw)
In-Reply-To: <bf94fb74-d391-440c-a90e-1346312328c4@app.fastmail.com>

On Mon, Feb 2, 2026, at 08:43, Ard Biesheuvel wrote:
> On Mon, 2 Feb 2026, at 08:18, Arnd Bergmann wrote:
>> On Wed, Sep 17, 2025, at 21:02, Yang Shi wrote:
>> --- a/arch/arm64/mm/proc.S
>> +++ b/arch/arm64/mm/proc.S
>> @@ -439,7 +439,7 @@ SYM_FUNC_END(idmap_kpti_install_ng_mappings)
>>  #endif
>> 
>>         .pushsection ".idmap.text", "a"
>> -SYM_TYPED_FUNC_START(wait_linear_map_split_to_ptes)
>> +SYM_FUNC_START(wait_linear_map_split_to_ptes)
>>         /* Must be same registers as in idmap_kpti_install_ng_mappings */
>>         swapper_ttb     .req    x3
>>         flag_ptr        .req    x4
>>
>
> This is not the right fix: the indirect call from 
> linear_map_split_to_ptes() will be instrumented, and so it requires the 
> CFI annotation to precede the function entry point, which is what 
> SYM_TYPED_FUNC_START() is supposed to emit.
>
> The typeid symbol is injected by the compiler into every object file 
> that takes the address of the function in question, and so the fact 
> that it is missing seems to suggest that linear_map_split_to_ptes() has 
> been optimized away entirely. Could you double check 
> arch/arm64/mm/mmu.o if that is the case?

Ah, thanks for the explanation. This has indeed been optimized out
by a patch in my randconfig tree that makes CONFIG_SMP optional
for arm64. Without SMP, the calling code path is never used because
smp_processor_id() is fixed to 0.

I'll fix up that other patch then.

     Arnd


  reply	other threads:[~2026-02-02  8:11 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-17 19:02 [PATCH v8 0/5] arm64: support FEAT_BBM level 2 and large block mapping when rodata=full Yang Shi
2025-09-17 19:02 ` [PATCH v8 1/5] arm64: Enable permission change on arm64 kernel block mappings Yang Shi
2025-09-17 19:02 ` [PATCH v8 2/5] arm64: cpufeature: add AmpereOne to BBML2 allow list Yang Shi
2025-09-17 19:02 ` [PATCH v8 3/5] arm64: mm: support large block mapping when rodata=full Yang Shi
2025-11-01 16:14   ` Guenter Roeck
2025-11-02 10:31     ` Ryan Roberts
2025-11-02 12:11       ` Ryan Roberts
2025-11-02 15:13         ` Guenter Roeck
2025-11-02 17:46         ` Guenter Roeck
2025-11-02 17:49         ` Guenter Roeck
2025-11-02 17:52           ` Guenter Roeck
2025-11-03  0:47         ` Yang Shi
2025-11-03 10:07           ` Ryan Roberts
2025-11-03 16:21             ` Yang Shi
2025-11-03  5:53         ` Dev Jain
2025-09-17 19:02 ` [PATCH v8 4/5] arm64: mm: split linear mapping if BBML2 unsupported on secondary CPUs Yang Shi
2026-02-02  7:18   ` Arnd Bergmann
2026-02-02  7:43     ` Ard Biesheuvel
2026-02-02  8:11       ` Arnd Bergmann [this message]
2025-09-17 19:02 ` [PATCH v8 5/5] arm64: kprobes: call set_memory_rox() for kprobe page Yang Shi
2025-09-18 12:48   ` Catalin Marinas
2025-09-18 15:05     ` Yang Shi
2025-09-18 15:30       ` Ryan Roberts
2025-09-18 15:50         ` Yang Shi
2025-09-18 15:32       ` Catalin Marinas
2025-09-18 15:48         ` Yang Shi
2025-09-18 21:10 ` [PATCH v8 0/5] arm64: support FEAT_BBM level 2 and large block mapping when rodata=full Will Deacon
2025-09-19 10:08   ` Ryan Roberts
2025-09-19 11:27     ` Will Deacon
2025-09-19 11:49       ` Ryan Roberts
2025-09-19 11:56         ` Will Deacon
2025-09-19 12:00           ` Ryan Roberts
2025-09-19 18:44             ` Will Deacon
2025-09-23  7:15               ` Ryan Roberts
2025-09-19 14:55   ` Yang Shi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=625eaac4-6972-4d4e-ac8d-52cc19e4fe33@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=cl@gentwo.org \
    --cc=david@redhat.com \
    --cc=dev.jain@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=ryan.roberts@arm.com \
    --cc=scott@os.amperecomputing.com \
    --cc=will@kernel.org \
    --cc=yang@os.amperecomputing.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox