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

Conor Dooley
2023-06-12T15:31:07Z

[-- Attachment #1.1: Type: text/plain, Size: 1180 bytes --]

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.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]