[PATCH] Loongarch: adapt for the re-introduction of fstat and newfstatat in 6.11

Xi Ruoyao xry111@xry111.site
Tue Aug 20 14:51:38 GMT 2024


On Tue, 2024-08-20 at 21:03 +0800, Miao Wang wrote:
> > > > +/* No support for fstat or newfstatat before 6.11.  */
> > > 
> > > 6.10.6, the change is backported so we can assume anything >= 6.10.6
> > > have these syscalls.  But we cannot make a reasonable assumption with
> > > other backports like 6.6.47.
> Actually such backport is questionable, since it changes the kernel feature.
> I believe that this breaks our assumption that kernel will have certain feature
> if version >= some number. So I think we can ignore the stable backports and
> only focus on the mainline releases.

Why?  You cannot find an integer in (10, 11), thus any kernel release >=
6.10.6 will have these two syscalls, unless you plan to revert it for
6.10.7 or something.  And I cannot see how a revert is possible because
the ship is sailed and a revert will be outrageously "breaking
userspace" now.  If you really want to prevent it, you should have done
that before 6.10.6 release like I'd attempted to do (but nobody listened
to me).

Note that random kernel snapshots are not supported (i.e. 6.11.0-rc1
isn't considered a supported "release" between 6.10.6 and 6.11.0).  And
random non-Linus forks of the kernel aren't supported by Glibc as well
(for example, IA64 was directly removed from Glibc when the Linus' tree
removed IA64 despite some guys have a working non-Linus fork), so the
problematic vendor kernels mentioned by Greg and Cyril aren't ever
considered.

I'm now writing something in areweloongyet.com for this.  If we went
with 6.11.0 how would I explain the reason in the article?  Just
"someone thinks the backport is questionable"?  Then I think the
reintroduce of these two syscalls is questionable in the first place, so
should we never use them in Glibc?  Or for some reason your opinion can
make a difference but mine cannot?

OTOH it's a fact that any kernel release >= 6.10.6 supports those two
syscalls, so we should live with the fact (instead of opinions) and it's
the best way to avoid controversies.

> > > 
> > > > +#if __LINUX_KERNEL_VERSION < 0x060b00
> > > 
> > > 0x060a06.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University


More information about the Libc-alpha mailing list