All of lore.kernel.org
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: David Laight <david.laight.linux@gmail.com>
Cc: "Thomas Weißschuh" <linux@weissschuh.net>,
	"Daniel Palmer" <daniel@thingy.jp>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/7] tools/nolibc: also handle _llseek system call
Date: Sun, 19 Apr 2026 17:22:37 +0200	[thread overview]
Message-ID: <aeTzPS7lOWJ0gY91@1wt.eu> (raw)
In-Reply-To: <20260418170340.775bdfa7@pumpkin>

On Sat, Apr 18, 2026 at 05:03:40PM +0100, David Laight wrote:
> On Sat, 18 Apr 2026 13:56:46 +0200
> Thomas Weißschuh <linux@weissschuh.net> wrote:
> 
> > Apr 18, 2026 13:23:43 David Laight <david.laight.linux@gmail.com>:
> > 
> > > On Sat, 18 Apr 2026 12:19:56 +0200
> > > Thomas Weißschuh <linux@weissschuh.net> wrote:
> > >  
> > >> On some architectures the llseek system call contains a leading
> > >> underscore. Also check for that one and prefer it over the lseek system
> > >> call as it is necessary for 64-bit offset handling.
> > >>  
> > > ...  
> > >> +#if defined(__NR_llseek)
> > >> +   nr_llseek = __NR_llseek;
> > >> +#else
> > >> +   nr_llseek = __NR__llseek;
> > >> +#endif  
> > >
> > > Is that test the right way around?
> > > The commit messages says prefer _llseek, but that seems to prefer llseek.  
> > 
> > Yes. lseek is the ifdef case below.
> > Here we have _llseek and llseek.
> > lseek always exists, but may no handle 64 bit offsets.
> > Only one of llseek and _llseek exists
> > for one given architecture.
> 
> Ok, the fact that you said 'prefer' made me think that both might
> sometimes exist.

While I'm totally fine with the patch, I agree with David that the commit
message is misleading, as what the code does is to check for llseek and
fall back to _llseek when it is not defined, and not prefer the second
over the former.

The commit message should rather say something like:

  On some architectures the llseek system call contains a leading
  underscore. Fall back to it when llseek is not available and use it
  for the lseek system call as it is necessary for 64-bit offset handling.

But overall it's an ack from me.

Acked-by: Willy Tarreau <w@1wt.eu>

Thanks!
Willy

  reply	other threads:[~2026-04-19 15:22 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-18 10:19 [PATCH 0/7] tools/nolibc: large file support Thomas Weißschuh
2026-04-18 10:19 ` [PATCH 1/7] tools/nolibc: also handle _llseek system call Thomas Weißschuh
2026-04-18 11:23   ` David Laight
2026-04-18 11:56     ` Thomas Weißschuh
2026-04-18 16:03       ` David Laight
2026-04-19 15:22         ` Willy Tarreau [this message]
2026-04-19 15:38           ` Thomas Weißschuh
2026-04-19 16:10             ` Willy Tarreau
2026-04-18 10:19 ` [PATCH 2/7] tools/nolibc: add __nolibc_arg_to_reg() Thomas Weißschuh
2026-04-18 10:19 ` [PATCH 3/7] tools/nolibc: cast pointers returned from system calls through integers Thomas Weißschuh
2026-04-18 10:19 ` [PATCH 4/7] tools/nolibc: handle 64-bit system call arguments on x32 Thomas Weißschuh
2026-04-18 10:20 ` [PATCH 5/7] tools/nolibc: handle 64-bit system call arguments on MIPS N32 Thomas Weißschuh
2026-04-18 11:14   ` David Laight
2026-04-18 11:54     ` Thomas Weißschuh
2026-04-18 16:32       ` David Laight
2026-04-19 15:30       ` Willy Tarreau
2026-04-19 21:35         ` David Laight
2026-04-20 15:58           ` Thomas Weißschuh
2026-04-18 10:20 ` [PATCH 6/7] tools/nolibc: open files with O_LARGEFILE Thomas Weißschuh
2026-04-18 10:20 ` [PATCH 7/7] selftests/nolibc: test large file support Thomas Weißschuh
2026-04-18 14:01 ` [PATCH 0/7] tools/nolibc: " Daniel Palmer
2026-04-19 15:31 ` Willy Tarreau

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=aeTzPS7lOWJ0gY91@1wt.eu \
    --to=w@1wt.eu \
    --cc=daniel@thingy.jp \
    --cc=david.laight.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.