Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ca26b14b-341b-5b7e-bddb-e87ff3df2b22@gmail.com>
Date: Sat, 1 Jul 2023 20:45:22 +0200
From: Alejandro Colomar <alx.manpages@...il.com>
To: Rich Felker <dalias@...c.org>
Cc: libc-coord@...ts.openwall.com, linux-man@...r.kernel.org,
 musl@...ts.openwall.com, libc-alpha@...rceware.org,
 Paul Eggert <eggert@...ucla.edu>
Subject: Re: [musl] Re: Re: [musl] Re: regression in man pages
 for interfaces using loff_t

On 7/1/23 16:32, Rich Felker wrote:
> This is why the only safe and reasonable thing to do, without an
> extensive consensus process working to understand and assess the
> impact of a change, is NOT TO MAKE CHANGES TO EXISTING INTERFACE
> SPECIFICATIONS. It's really unsettling that this was done unilaterally
> in such an important source of documentation as linux-man. Unless
> glibc folks come up with a way to get on board with changing it to
> off_t like you want, I do not want to get into another round of making
> changes to "improve" something that was wrong about how the interface
> was specified before. I just want to revert the breakage and establish
> that this kind of breakage should not happen.

Hi Rich,

Sorry for the trouble caused.  But let me clarify something.

What is the spec, and how did we deviate from it?  Are we (linux-man)
the spec?  Is it the kernel?  Is it glibc?  Probably, we are all.
We need to clarify that before accusing anyone of deviating from the
spec.

When there's disagreement between some of those 3 sources, what to do?

Here's what glibc's info page says (and I doubt I influenced into
modifying that):

  -- Function: ssize_t copy_file_range (int INPUTFD, off64_t *INPUTPOS,
           int OUTPUTFD, off64_t *OUTPUTPOS, ssize_t LENGTH, unsigned int
           FLAGS)

Here's what the kernel says:

$ grepc -tfsp copy_file_range
./include/linux/syscalls.h:986:
asmlinkage long sys_copy_file_range(int fd_in, loff_t __user *off_in,
				    int fd_out, loff_t __user *off_out,
				    size_t len, unsigned int flags);


Very often, the user-space wrapper disagrees with the types used by
the kernel, and in the manual pages we prioritize the wrappers.  In
many cases, I found that the manual pages were wrong (they stated a
type that was different from the glibc one), and fixed them for good.
In this case it seems the fix was wrong, and nobody noticed for a few
years.  Well, sorry for making this mistake.  I think overall, in the
last years I have fixed more stuff than I have broken.

In this case, I'm ready to fix this when you all agree.  Don't worry
too much about it.  I'm on vacation, so I'll come back to this thread in
a few days.

To me, reverting back to loff_t is fine if you all agree.  Also, it's
been an interesting thread about why we should avoid loff_t and
off64_t for new APIs.  I'll probably document some of those details.

Cheers,
Alex


-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5


Download attachment "OpenPGP_signature" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.