[PATCH -next v21 20/27] riscv: hwcap: change ELF_HWCAP to a function

Conor Dooley conor at kernel.org
Mon Jun 12 08:30:54 PDT 2023


On Mon, Jun 12, 2023 at 05:36:32PM +0300, Rémi Denis-Courmont wrote:
> Le maanantaina 5. kesäkuuta 2023, 19.24.53 EEST Conor Dooley a écrit :
> > On Mon, Jun 05, 2023 at 11:07:17AM +0000, Andy Chiu wrote:
> > > Using a function is flexible to represent ELF_HWCAP. So the kernel may
> > > encode hwcap reflecting supported hardware features just at the moment of
> > > the start of each program.
> > > 
> > > This will be helpful when we introduce prctl/sysctl interface to control
> > > per-process availability of Vector extension in following patches.
> > > Programs started with V disabled should see V masked off in theirs
> > > ELF_HWCAP.
> > 
> > For the uninformed, like myself, this needs to be a function, rather
> > than open coding the masking of the V bit at the one user of ELF_HWCAP
> > this series adds, because the binfmt stuff needs to get the value in
> > create_elf_fdpic_tables() & co?
> 
> No, this is to deal with existing userspace that expects vectors to "just 
> work" when the V bit is set (e.g. FFmpeg 6.0).

Is that not what create_elf_fdpic_tables() & its ilk do? Inform
userspace of whether the V bit is set?

Cheers,
Conor.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20230612/d8918448/attachment.sig>


More information about the linux-riscv mailing list