Re: [PATCH -next v20 20/26] riscv: Add prctl controls for userspace vector management

From: Andy Chiu
Date: Tue May 30 2023 - 10:15:07 EST

On Thu, May 25, 2023 at 12:16 AM Rémi Denis-Courmont <remi@xxxxxxxxxx> wrote:
> Le keskiviikkona 24. toukokuuta 2023, 12.25.30 EEST Andy Chiu a écrit :
> > How about adding the following 2 patches to deal with the problem.
> > However, I am concerned if this makes ELF_HWCAP too complicated. e.g.
> > Future extensions may as well want to do something here after we create
> > an entry here.
> Fine with me but I feel that we are missing the bigger picture here, as to
> what the usage pattern/guideline for the prctl() on userspace side should be?

Yes, I agree the use of this prctl is only meaningful for the init
system, or some ansenstor processes that make policy decisions. And
with ELF_HWCAP reflecting per-process's availability of V, which is
decided by either the prctl/sysctl, programs/libraries do not really
need to call this prctl unless they are doing aforementioned stuffs.

I am going to document these when rolling out the next revision.

> Maybe it was already discussed, and I just missed it, but I couldn't find it in
> the documentation.

We had discussed the potential theoretical abi breakage[1], and came
out with a need of a prctl/sysctl interface for distro's early
userspace programs.

> --
> Rémi Denis-Courmont