public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Stefan Liebler <stli@linux.ibm.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: Question: Is there a plan when to require a higher Linux kernel version than 3.2?
Date: Wed, 21 Sep 2022 16:50:08 +0000	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2209211640120.57900@digraph.polyomino.org.uk> (raw)
In-Reply-To: <b632a3ac-13ee-3cc1-7f88-90a663754d31@linux.ibm.com>

On Tue, 20 Sep 2022, Stefan Liebler via Libc-alpha wrote:

> Is there a plan when to require a higher Linux kernel version and which
> version will then be used as minimum?

I think there were two key things being waited for:

* Removing the startup check for too-old kernel to avoid causing 
unnecessary failures for programs that don't actually end up using newer 
kernel features.  Done in commit b46d250656794e63a2946c481fda29271342dd1a.

* The oldest kernel version supported on 
https://www.kernel.org/category/releases.html (currently 4.9) being new 
enough for the change to allow significant cleanups in glibc.  I think 
that is now the case for many of the socket syscalls across all 
architectures, so that much of the socketcall support could be removed 
from glibc.

A lot of care would be needed about removing socketcall support, because 
of variations between architectures in exactly what socket syscalls are 
available in what versions.  See, for example, the comment in 
sparc/kernel-features.h:

/* These syscalls were added for 32-bit in 4.4 (but present for 64-bit
   in all supported kernel versions); the architecture-independent
   kernel-features.h assumes some of them to be present by default.
   getpeername and getsockname syscalls were also added for 32-bit in
   4.4, but only for 32-bit kernels, not in the compat syscall table
   for 64-bit kernels.  */

getpeername and getsockname were only added to the compat syscall table 
for SPARC in 4.20 (Linux commit 1f2b5b8e2df4591fbca430aff9c5a072dcc0f408).  
So even with a 4.9 minimum kernel, you can't yet assume those syscalls are 
available everywhere.

A similar analysis would need to be done for every syscall being used in 
place of socketcall, to make sure it's genuinely available on all 
supported glibc architectures, including in compat syscall tables, in the 
new minimum kernel version, before the support for using socketcall for 
that operation can safely be removed from glibc.

-- 
Joseph S. Myers
joseph@codesourcery.com

  parent reply	other threads:[~2022-09-21 16:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-20  9:11 Stefan Liebler
2022-09-20  9:40 ` Xi Ruoyao
2022-09-20  9:56   ` Stefan Liebler
2022-09-21 16:50 ` Joseph Myers [this message]
2022-09-21 23:07   ` Michael Hudson-Doyle
2022-09-22 16:59     ` Joseph Myers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.22.394.2209211640120.57900@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=stli@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).