All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amit Daniel Kachhap <amit.kachhap@arm.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Russell King <linux@armlinux.org.uk>,
	patches@armlinux.org.uk, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 7/8] ARM: Add hwcap for Speculation Barrier(SB)
Date: Thu, 17 Nov 2022 15:49:59 +0530	[thread overview]
Message-ID: <c927658e-83e8-d2f7-e919-5e86b2e6de1a@arm.com> (raw)
In-Reply-To: <CACRpkdbGXZeh2VSp2SX0dVapwbP4JPrQPLHuwbU9MX=-iBbEAQ@mail.gmail.com>



On 11/16/22 19:36, Linus Walleij wrote:
> On Wed, Oct 26, 2022 at 7:53 AM Amit Daniel Kachhap
> <amit.kachhap@arm.com> wrote:
> 
>> Speculation Barrier(FEAT_SB) is a feature present in AArch32 state for
>> Armv8 and is represented by ISAR6.SB identification register.
>>
>> This feature denotes the presence of SB instruction and hence adding a
>> hwcap will enable the userspace to check it before trying to use this
>> instruction.
>>
>> This commit adds the ID feature bit detection, and uses elf_hwcap2
>> accordingly.
>>
>> Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
> 
> The patch is fine, the following is a question.
> 
> I see that the aarch64 kernel is using this instruction in the kernel
> for speculation barriers, and after this the aarch32 userspace can
> use it too.
> 
> Does it make sense to ask the question whether this could be
> compiled into and used by a aarch32 kernel, provided it is
> configured for a core known to support it? (This is assuming that
> the compiler also knows about it.)

I think you have a valid point to use sb in the kernel also. Besides the
compiler support, aarch32 kernel might need feature based dynamic
instruction patching framework like aarch64. So as you said it is too
much to do here.

Thanks,
Amit Daniel
> 
> I'm asking because speculation barriers is something we have a
> lot of due to the constant security problems so it might be something
> handy to have in the toolbox.
> 
> It might be just adding too much complexity... I know.
> 
> Yours,
> Linus Walleij

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

  reply	other threads:[~2022-11-17 10:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-26  5:49 [PATCH 0/8] ARM: Expose Armv8 AArch32 features via hwcap Amit Daniel Kachhap
2022-10-26  5:49 ` [PATCH 1/8] ARM: Define Armv8 registers in AArch32 state Amit Daniel Kachhap
2022-10-26  5:49 ` [PATCH 2/8] ARM: vfp: Add hwcap FPHP and ASIMDHP for FEAT_FP16 Amit Daniel Kachhap
2022-10-26  5:49 ` [PATCH 3/8] ARM: vfp: Add hwcap for FEAT_DotProd Amit Daniel Kachhap
2022-10-26  5:49 ` [PATCH 4/8] ARM: vfp: Add hwcap for FEAT_FHM Amit Daniel Kachhap
2022-10-26  5:49 ` [PATCH 5/8] ARM: vfp: Add hwcap for FEAT_AA32BF16 Amit Daniel Kachhap
2022-10-26  5:49 ` [PATCH 6/8] ARM: vfp: Add hwcap for FEAT_AA32I8MM Amit Daniel Kachhap
2022-10-26  5:50 ` [PATCH 7/8] ARM: Add hwcap for Speculation Barrier(SB) Amit Daniel Kachhap
2022-11-16 14:06   ` Linus Walleij
2022-11-17 10:19     ` Amit Daniel Kachhap [this message]
2022-11-17 11:14     ` Robin Murphy
2022-10-26  5:50 ` [PATCH 8/8] ARM: Add hwcap for Speculative Store Bypassing Safe Amit Daniel Kachhap
2022-11-16 13:51 ` [PATCH 0/8] ARM: Expose Armv8 AArch32 features via hwcap Linus Walleij
2022-11-17  6:19   ` Amit Kachhap
2022-11-21 19:04 ` Russell King (Oracle)
2022-11-22 12:24   ` Amit Daniel Kachhap

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=c927658e-83e8-d2f7-e919-5e86b2e6de1a@arm.com \
    --to=amit.kachhap@arm.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=patches@armlinux.org.uk \
    /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.