All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, ardb@kernel.org,
	bertrand.marquis@arm.com, boris.ostrovsky@oracle.com,
	broonie@kernel.org, daniel.lezcano@linaro.org,
	james.morse@arm.com, jgross@suse.com, kristina.martsenko@arm.com,
	maz@kernel.org, oliver.upton@linux.dev, pcc@google.com,
	sstabellini@kernel.org, suzuki.poulose@arm.com,
	tglx@linutronix.de, vladimir.murzin@arm.com, will@kernel.org
Subject: Re: [PATCH v3 33/38] arm64: Avoid cpus_have_const_cap() for ARM64_WORKAROUND_1742098
Date: Fri, 13 Oct 2023 19:04:57 +0100	[thread overview]
Message-ID: <ZSmGyK3f2HURGVJq@arm.com> (raw)
In-Reply-To: <ZSkhf7cAXWrz8Mfg@FVFF77S0Q05N>

On Fri, Oct 13, 2023 at 11:53:53AM +0100, Mark Rutland wrote:
> On Tue, Oct 10, 2023 at 11:31:34AM +0100, Mark Rutland wrote:
> >  static void elf_hwcap_fixup(void)
> >  {
> > -#ifdef CONFIG_ARM64_ERRATUM_1742098
> > -	if (cpus_have_const_cap(ARM64_WORKAROUND_1742098))
> > +	if (cpus_have_cap(ARM64_WORKAROUND_1742098))
> >  		compat_elf_hwcap2 &= ~COMPAT_HWCAP2_AES;
> > -#endif /* ARM64_ERRATUM_1742098 */
> >  }
> 
> The kbuild test robot pointed out that this is broken for CONFIG_COMPAT=n,
> since compat_elf_hwcap2 is only defined when CONFIG_COMPAT=y. As
> CONFIG_ARM64_ERRATUM_1742098 depends on CONFIG_COMPAT, this worked prior to this patch.
> 
> I've changed that locally to:
> 
> | static void elf_hwcap_fixup(void)
> | {
> | #ifdef CONFIG_COMPAT
> | 	if (cpus_have_cap(ARM64_WORKAROUND_1742098))
> | 		compat_elf_hwcap2 &= ~COMPAT_HWCAP2_AES;
> | #endif /* CONFIG_COMPAT */
> | }
> 
> ... since the ifdeffery is protecting the use of 'compat_elf_hwcap2', and the
> cpucap is now elided by virtue of cpucap_is_possible().
> 
> Catalin, aside from the minor fixup above, are you happy to pick this for v6.7?
> 
> I can post a v4 with that change (and the commit message updated accordingly).

I can pick it up and fold the above in. Not sure what you want to update
the commit message to (just mention the need for #ifdef CONFIG_COMPAT?)

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-10-13 18:05 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-10 10:31 [PATCH v3 00/38] arm64: Remove cpus_have_const_cap() Mark Rutland
2023-10-10 10:31 ` [PATCH v3 01/38] clocksource/drivers/arm_arch_timer: Initialize evtstrm after finalizing cpucaps Mark Rutland
2023-10-10 10:31 ` [PATCH v3 02/38] arm64/arm: xen: enlighten: Fix KPTI checks Mark Rutland
2023-10-10 10:31 ` [PATCH v3 03/38] arm64: Factor out cpucap definitions Mark Rutland
2023-10-10 10:31 ` [PATCH v3 04/38] arm64: Add cpucap_is_possible() Mark Rutland
2023-10-10 10:31 ` [PATCH v3 05/38] arm64: Add cpus_have_final_boot_cap() Mark Rutland
2023-10-10 10:31 ` [PATCH v3 06/38] arm64: Rework setup_cpu_features() Mark Rutland
2023-10-10 10:31 ` [PATCH v3 07/38] arm64: Fixup user features at boot time Mark Rutland
2023-10-10 10:31 ` [PATCH v3 08/38] arm64: Split kpti_install_ng_mappings() Mark Rutland
2023-10-10 10:31 ` [PATCH v3 09/38] arm64: kvm: Use cpus_have_final_cap() explicitly Mark Rutland
2023-10-16 19:29   ` Oliver Upton
2023-10-10 10:31 ` [PATCH v3 10/38] arm64: Explicitly save/restore CPACR when probing SVE and SME Mark Rutland
2023-10-10 10:31 ` [PATCH v3 11/38] arm64: Use build-time assertions for cpucap ordering Mark Rutland
2023-10-10 10:31 ` [PATCH v3 12/38] arm64: Rename SVE/SME cpu_enable functions Mark Rutland
2023-10-10 10:31 ` [PATCH v3 13/38] arm64: Use a positive cpucap for FP/SIMD Mark Rutland
2023-10-10 10:31 ` [PATCH v3 14/38] arm64: Avoid cpus_have_const_cap() for ARM64_HAS_{ADDRESS,GENERIC}_AUTH Mark Rutland
2023-10-10 10:31 ` [PATCH v3 15/38] arm64: Avoid cpus_have_const_cap() for ARM64_HAS_ARMv8_4_TTL Mark Rutland
2023-10-10 10:31 ` [PATCH v3 16/38] arm64: Avoid cpus_have_const_cap() for ARM64_HAS_BTI Mark Rutland
2023-10-10 10:31 ` [PATCH v3 17/38] arm64: Avoid cpus_have_const_cap() for ARM64_HAS_CACHE_DIC Mark Rutland
2023-10-10 10:31 ` [PATCH v3 18/38] arm64: Avoid cpus_have_const_cap() for ARM64_HAS_CNP Mark Rutland
2023-10-10 10:31 ` [PATCH v3 19/38] arm64: Avoid cpus_have_const_cap() for ARM64_HAS_DIT Mark Rutland
2023-10-10 10:31 ` [PATCH v3 20/38] arm64: Avoid cpus_have_const_cap() for ARM64_HAS_GIC_PRIO_MASKING Mark Rutland
2023-10-10 10:31 ` [PATCH v3 21/38] arm64: Avoid cpus_have_const_cap() for ARM64_HAS_PAN Mark Rutland
2023-10-10 10:31 ` [PATCH v3 22/38] arm64: Avoid cpus_have_const_cap() for ARM64_HAS_EPAN Mark Rutland
2023-10-10 10:31 ` [PATCH v3 23/38] arm64: Avoid cpus_have_const_cap() for ARM64_HAS_RNG Mark Rutland
2023-10-10 10:31 ` [PATCH v3 24/38] arm64: Avoid cpus_have_const_cap() for ARM64_HAS_WFXT Mark Rutland
2023-10-10 10:31 ` [PATCH v3 25/38] arm64: Avoid cpus_have_const_cap() for ARM64_HAS_TLB_RANGE Mark Rutland
2023-10-10 10:31 ` [PATCH v3 26/38] arm64: Avoid cpus_have_const_cap() for ARM64_MTE Mark Rutland
2023-10-10 10:31 ` [PATCH v3 27/38] arm64: Avoid cpus_have_const_cap() for ARM64_SSBS Mark Rutland
2023-10-10 10:31 ` [PATCH v3 28/38] arm64: Avoid cpus_have_const_cap() for ARM64_SPECTRE_V2 Mark Rutland
2023-10-10 10:31 ` [PATCH v3 29/38] arm64: Avoid cpus_have_const_cap() for ARM64_{SVE,SME,SME2,FA64} Mark Rutland
2023-10-10 10:31 ` [PATCH v3 30/38] arm64: Avoid cpus_have_const_cap() for ARM64_UNMAP_KERNEL_AT_EL0 Mark Rutland
2023-10-10 10:31 ` [PATCH v3 31/38] arm64: Avoid cpus_have_const_cap() for ARM64_WORKAROUND_843419 Mark Rutland
2023-10-10 10:31 ` [PATCH v3 32/38] arm64: Avoid cpus_have_const_cap() for ARM64_WORKAROUND_1542419 Mark Rutland
2023-10-10 10:31 ` [PATCH v3 33/38] arm64: Avoid cpus_have_const_cap() for ARM64_WORKAROUND_1742098 Mark Rutland
2023-10-13 10:53   ` Mark Rutland
2023-10-13 18:04     ` Catalin Marinas [this message]
2023-10-16 10:08       ` Mark Rutland
2023-10-10 10:31 ` [PATCH v3 34/38] arm64: Avoid cpus_have_const_cap() for ARM64_WORKAROUND_2645198 Mark Rutland
2023-10-10 10:31 ` [PATCH v3 35/38] arm64: Avoid cpus_have_const_cap() for ARM64_WORKAROUND_CAVIUM_23154 Mark Rutland
2023-10-10 10:31 ` [PATCH v3 36/38] arm64: Avoid cpus_have_const_cap() for ARM64_WORKAROUND_NVIDIA_CARMEL_CNP Mark Rutland
2023-10-10 10:31 ` [PATCH v3 37/38] arm64: Avoid cpus_have_const_cap() for ARM64_WORKAROUND_REPEAT_TLBI Mark Rutland
2023-10-10 10:31 ` [PATCH v3 38/38] arm64: Remove cpus_have_const_cap() Mark Rutland

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=ZSmGyK3f2HURGVJq@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=ardb@kernel.org \
    --cc=bertrand.marquis@arm.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=broonie@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=james.morse@arm.com \
    --cc=jgross@suse.com \
    --cc=kristina.martsenko@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=pcc@google.com \
    --cc=sstabellini@kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=tglx@linutronix.de \
    --cc=vladimir.murzin@arm.com \
    --cc=will@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.