Re: [musl] Re: [libc-coord] Re: [musl] Re: regression in man pages for interfaces using loff_t

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

 



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

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[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