Re: arch_prctl()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 22, 2024 at 12:27 PM Alejandro Colomar <alx@xxxxxxxxxx> wrote:
>
> Hi Elliott,
>
> On Thu, Aug 22, 2024 at 12:18:21PM GMT, enh wrote:
> > On Thu, Aug 22, 2024 at 10:05 AM H.J. Lu <hjl.tools@xxxxxxxxx> wrote:
> > > On Thu, Aug 22, 2024 at 5:21 AM Adhemerval Zanella Netto
> > > <adhemerval.zanella@xxxxxxxxxx> wrote:
> > > > Although we do use __transparent_union__ we have to still handle very old
> > > > compilers:
> > >
> > > We can hide the prototype for the older compilers.  Softwares need to
> > > deal with the missing prototype anyway.
> >
> > (avoiding source incompatibility via mismatching declarations is
> > perhaps a reason to just go with the kernel signature, since that's
> > what the folks i've seen `extern` this function themselves seem to
> > use...)
>
> I'd rather add a diagnostic for those who define it themselves now,
> than providing a sub-par prototype for eternity.  I guess the existing
> number of users is small, and it doesn't break binaries, just
> compilation.

yeah, afaict it's basically just "qemu-like things" and the occasional
debugging tool.

> Those will probably just need to add an ifdef for the glibc version that
> added the prototype, so it's an easy fix.

no, they'd just have to change their declaration to match whatever
glibc ships. (which is definitely more verbose if it's any kind of
union.)

i don't have a strong opinion, other than "i want to make sure that
bionic and glibc have the _same_ declaration so that it's at least
possible for folks to fix their source to 'just work' everywhere"...

> But I tend to value more eternity than added diagnostics, and others may
> disagree with that, so whatever you decide is probably good, and I'll
> document it.  :)

minimizing the need for changes on the man page is also a [minor]
argument for just going with the kernel declaration :-)

plus it's demonstrably "good enough" for existing callers. it's not
like the union would make the api any less error-prone?

> Have a lovely day!
> Alex
>
> --
> <https://www.alejandro-colomar.es/>





[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux