From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF9732C11E9 for ; Sat, 7 Mar 2026 22:03:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772921033; cv=none; b=tpWQuqLcfK9ouVkbEZEw+xUYRLX9o3t943O5ZGCRI/wPqIudGpIFfh4jGdn8Dp/AK6BEtiXanG15NObH5WljqmppoQuk/4QlCW3N/lXca20i15ZCUeKcsXGyacMSzcJ3rceOi8VLyx8a3W9j2DKIhBFL2vPZR8a6TFhEZKGUIfk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772921033; c=relaxed/simple; bh=5ZxCI68mByQKGA7Z2hXC99q1/nxgtlc52n9oZE16kSs=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RgzeQGLlN7dLVcAb2jbQdjRXhlBQHwg43b1Pa+OPgKua7rYYM3T6P0wdkuLHJUnXatIiFkHony09L3GMzbhAJKVJObX3RoxMgwHROUJS5NmHi2PweSJX+WxZ/Rlop0UvSfgAl4Nnpgche46DNdpoH5fxzsnpzmW6gde2l64SPhg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=c/tRCw85; arc=none smtp.client-ip=209.85.221.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="c/tRCw85" Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-439cd6b0aedso2638291f8f.1 for ; Sat, 07 Mar 2026 14:03:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772921030; x=1773525830; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=F3DRt/argbGVQAtIH22WtYxtNUhuNS6F/u8WqvYrrLo=; b=c/tRCw85c1xclJvOL7N3BOVUxEM8re/Urs8zR4wcY3pKC7AstIM1mJ1GMqgFCe7NkI 1UyA1543e6EGGXGyepCwcxd6dSEWs+XO+Cadvrp9fTB5fj14K8Hn7tyJgP6pkNAmSGs2 MM4BgKf0OS4lDE7jD8dryMlP4OBgG91T5bAXhaw/0pF4hWg2uben82B3hUZ98sFs6X83 FTSxBNIG3f59ykV0MHJtaos4aiV0n00t4rXniJad14YbYiE2jZK8eEja/VhaLkn9Rhdz P6qEHEyJuveGq+Q9/8/RHy2EaCVWf9gr7xUroX9yNNQSxbwbemX3t4EbXx60ch83Cwu5 YhPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772921030; x=1773525830; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=F3DRt/argbGVQAtIH22WtYxtNUhuNS6F/u8WqvYrrLo=; b=psInnPGZE3IlTlPKOitXct+UkB4XQzleRKYC/+Wf3HjuifP691OoFgxb7gRaau9Iic fMLfA0wsFZZ1zuksom6/dLHNs/pJLPpOmIXkry86mMAmpc8wRmAvLNAPuU7IVixcZBTc UDm8gC4yAn+AwlFBqeaXm6A3gK2bw2GHPiWjFMC4rxIlosGJTeC7VtK9TGbVT05IghmY SX7zZCGNNVOl0Z44WL/98jQ6MD7mHy9atW6klL5b9JlUXBk0Ki5zl9rT0cdTFKSYhRru cvxdeDpT8j+0w23vK23y+VmZoin/zlvqNgsep7HQ0z+zxs1eKL9NZ03DK7crChvaGFqs GXkA== X-Forwarded-Encrypted: i=1; AJvYcCWIdV8DNc9DJxcAFUN2leJ3413v9wm1HZmWPHWw25w2aY+3MnXWRIRC7RdNkb8VTF5znLTof6c8yzFsgS0=@vger.kernel.org X-Gm-Message-State: AOJu0YzQ06QaW0zRvlVuN2CiHy3SdSCSo7tXp3aeT2Zi0gQb6GskefnT 4vlLS6jvstADcePWaYwzhQActQTCB5ot21jbQi3kQhuLNqN66GmZscnO X-Gm-Gg: ATEYQzwTdNMUF4cDQCfizj8/R7LrDLCAhI33NmJ0Gp4+1TCJlA86X/dzJ2BHcppjNTL V6SEcw0QpUhg610CPdBdc011fH3E7DraHCAyUOLvayizeTwfQ5oj2TrvsOrKBK6SlFIVSHflLR5 3xGHLlpAMqDVod6HFwH0C6glrUSx+Bl2Q3XfsuKTSjS1FjEZ3ctngIlIsgFOtLrAPljji+YduwO z0tWKqIT4VzAV2zEsDdsMSxa+C1FLenBkV24EHrIpC7q8w0sclNEes4BSi7IyUH23mvCcZyHVvy lK6M3rcQ9yOL4qnJFyDafC7PbLH4ryLUJUhTC1ViHVEbYqJ/Cmkh8KyEMJeyc0qQ6iFdCa1Dpqj ewbW5wLoXLZcaMyn6eMCjEArmnoVfQAanQu5xTbHXIygGoNQCjrrilNPfamJpLbyoPbf0L+ttbE tZXGkvTqwO9A0Hbkla5G+ttfi6as7lJ4t0y/r8+ScJGHbZ4vd/AF7ioxqCI7DWsKmm X-Received: by 2002:a05:6000:258a:b0:439:c279:32df with SMTP id ffacd0b85a97d-439da885be0mr11542075f8f.35.1772921029807; Sat, 07 Mar 2026 14:03:49 -0800 (PST) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-439dae45786sm15450162f8f.32.2026.03.07.14.03.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Mar 2026 14:03:49 -0800 (PST) Date: Sat, 7 Mar 2026 22:03:48 +0000 From: David Laight To: Thomas =?UTF-8?B?V2Vpw59zY2h1aA==?= Cc: Willy Tarreau , linux-kernel@vger.kernel.org, Cheng Li Subject: Re: [PATCH v4 next 00/23] Enhance printf() Message-ID: <20260307220348.0ec1bfca@pumpkin> In-Reply-To: References: <20260302101815.3043-1-david.laight.linux@gmail.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) 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=UTF-8 Content-Transfer-Encoding: quoted-printable On Sat, 7 Mar 2026 19:02:30 +0100 Thomas Wei=C3=9Fschuh wrote: > Hi David, >=20 > On 2026-03-02 10:17:52+0000, david.laight.linux@gmail.com wrote: > > From: David Laight =20 >=20 > (...) >=20 > I am happy with the patches of this series. >=20 > > David Laight (23): > > tools/nolibc: Add _NOLIBC_OPTIMIZER_HIDE_VAR() to compiler.h =20 >=20 > > tools/nolibc/printf: Move snprintf length check to callback > > selftests/nolibc: Return correct value when printf test fails > > selftests/nolibc: check vsnprintf() output buffer before the length > > selftests/nolibc: Use length of 'expected' string to check snprintf()= output > > selftests/nolibc: Check that snprintf() doesn't write beyond the buff= er end > > selftests/nolibc: Let EXPECT_VFPRINTF() tests be skipped =20 >=20 > > selftests/nolibc: Rename w to written in expect_vfprintf() =20 >=20 > Unfortunately b4 chokes on these patches because this patch is missing > the 'v4' tag in the subject prefix. I noticed that after sending them. I add it by hand (there might be an easier way) but it is easy to miss it when doing a final check/update of the patches. I then sent them without a final-final check. > Given that the one below needs some > changes anyways, I was lazy and applied the series only up until here. > (Patch 1 is also not applied, as there was no user yet for > _NOLIBC_OPTIMIZER_HIDE_VAR() ). >=20 > Could you rebase the series on nolibc-next, add the error handling > to strerror_r(), fix the wording nitpicks from Willy and resend the > patches? I can also try to fix this up locally, but that would be more > work on my side than it would be for you I reckon. > Let me know if this is an issue and I'll try to make it work. That shouldn't be too hard. Was a right PITA moving them from linus's tree because --3way doesn't work when the patches come from different git trees. I'll just create a new branch, use 'git am' to apply each patch then edit and amend. Then recover all the info after the --- line. I'm getting used to that sequence :-) David >=20 > Willy: >=20 > I interpreted your mail [0] as Acked-by for the whole series. >=20 > [0] https://lore.kernel.org/lkml/aawDlqLdpgsfGI4r@1wt.eu/ >=20 > > tools/nolibc: Implement strerror() in terms of strerror_r() > > tools/nolibc: Rename the 'errnum' parameter to strerror() > > tools/nolibc/printf: Output pad characters in 16 byte chunks > > tools/nolibc/printf: Simplify __nolibc_printf() > > tools/nolibc/printf: Use goto and reduce indentation > > tools/nolibc/printf: Use bit-masks to hold requested flag, length an= d conversion chars > > tools/nolibc/printf: Add support for length modifiers tzqL and format= s iX > > tools/nolibc/printf: Handle "%s" with the numeric formats > > tools/nolibc/printf: Prepend sign to converted number > > tools/nolibc/printf: Add support for conversion flags space and plus > > tools/nolibc/printf: Special case 0 and add support for %#x > > tools/nolibc/printf: Add support for left aligning fields > > tools/nolibc/printf: Add support for zero padding and field precision > > tools/nolibc/printf: Add support for octal output > > selftests/nolibc: Use printf variable field widths and precisions > >=20 > > tools/include/nolibc/compiler.h | 3 + > > tools/include/nolibc/stdio.h | 501 ++++++++++++++----- > > tools/testing/selftests/nolibc/nolibc-test.c | 157 +++--- > > 3 files changed, 469 insertions(+), 192 deletions(-) =20