From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta1.formilux.org (mta1.formilux.org [51.159.59.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C25940DFC6 for ; Sun, 19 Apr 2026 15:22:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=51.159.59.229 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776612169; cv=none; b=fxGFxTTt/RVB3OW964TYMuv1Ecm7pSwD6xYBp7BP+PMPWE1+M6iKni+hL+otfqJbw6t11/RHvvRsIEE7DbQXXuKW3Ayc7eREkG7E8XHEslW9BesIHT3l4T2hPpRRWfz8qH/EGynSjeqxImK3zSQvxv4t3Lpy1mUQQxdq74j2WFk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776612169; c=relaxed/simple; bh=a3EZYkaNFRy19lLUoku6ZF9iUU+HI4c04iVAKNNT2TY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eLqSeBs6NUvmqdF7MUdYbCWkUm4P9w6QobPUOKPTC5HpgUyq9IWdZSqwMvMdy1Da/qXrpUG2+MsqXZc8gS1IU+vIojw4Zxj8C/ztM2G77NGY1ip9CvwPOHdQx+NWToTymrBxmyYSfr0qRTDhXiuSggI1yF6POpxdc/hPh/A1/Sw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=1wt.eu; spf=pass smtp.mailfrom=1wt.eu; dkim=pass (1024-bit key) header.d=1wt.eu header.i=@1wt.eu header.b=MEOTPW8u; arc=none smtp.client-ip=51.159.59.229 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=1wt.eu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=1wt.eu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=1wt.eu header.i=@1wt.eu header.b="MEOTPW8u" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1wt.eu; s=mail; t=1776612158; bh=8maQvVhN6ZapC3Njfdfh1ENH8SbAYHgp2kMs/g3PucA=; h=From:Message-ID:From; b=MEOTPW8uxtWLcPZziSUfbJfwviA4//9j8QceCQE2Kl+Eg2/nGD6oG52JkrOVGW+ej f9jTaYAbQKBfsCcDNCpLHdEVppcrAAk3smhnvvosUvYUHgXLCQ0ssGnQsgFDivpVCk S/qIGvHIFm9a21Y/wMiq4NLhIFDQ+NiZG4lb+5tE= Received: from 1wt.eu (ded1.1wt.eu [163.172.96.212]) by mta1.formilux.org (Postfix) with ESMTP id 0ADC0C0708; Sun, 19 Apr 2026 17:22:38 +0200 (CEST) Date: Sun, 19 Apr 2026 17:22:37 +0200 From: Willy Tarreau To: David Laight Cc: Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Daniel Palmer , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/7] tools/nolibc: also handle _llseek system call Message-ID: References: <20260418-nolibc-largefile-v1-0-b91f0775bac3@weissschuh.net> <20260418-nolibc-largefile-v1-1-b91f0775bac3@weissschuh.net> <20260418122340.1dc07834@pumpkin> <6fe77be2-39be-4976-99d6-aced2bf3d955@weissschuh.net> <20260418170340.775bdfa7@pumpkin> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 wrote: > > > Apr 18, 2026 13:23:43 David Laight : > > > > > On Sat, 18 Apr 2026 12:19:56 +0200 > > > Thomas Weißschuh 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 Thanks! Willy