From nobody Sun Sep 22 16:52:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XBXHX6bQzz5XSxd for ; Sun, 22 Sep 2024 16:52:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XBXHX2PQvz4Cyx for ; Sun, 22 Sep 2024 16:52:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20230601.gappssmtp.com header.s=20230601 header.b=kDNTXSQ9; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::531) smtp.mailfrom=wlosh@bsdimp.com Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-7c6b4222fe3so2287861a12.3 for ; Sun, 22 Sep 2024 09:52:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1727023975; x=1727628775; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=hcsqh2nFNoOda0cJVXECDIsJRR5CYY0LKBVNEsndQVw=; b=kDNTXSQ9iWEYvQugv7LMakHLRTID1qLKb3AkHiZZOMB9eCJsH6ySu9YcQv30M2LPun r3RQwKT7IUXiSzqKqAFGOQ5WNHoHlalaXpVc9h+Z4mjWSOvtinUGE/B+lGVcugpmlQKL jeBrQdSX6sxd/fBG/7JGUQrou4xzAV9SQQPIqAldggTyvH7VyN1Dzabs9kyDcX4YhZ2N 6axRdU+WPlB3c+9Ut6FjqTsQecS8EuAJ5MU9OdZaHJbSRcuicWzlNsniN+TebgoMmruA C0+qQG8InJAt79sZKNdpOSkUu3A4OeHw2+hIEV/JttRBEt7zy+MG/tAjm6ujn9foVQcD jgnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727023975; x=1727628775; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hcsqh2nFNoOda0cJVXECDIsJRR5CYY0LKBVNEsndQVw=; b=fS5twzi4Mdh4SqWL3CGYz6GpNzAs4ABZGrk3n2ayy8eJgw8IBlTRRYI65q9WHpe5w0 FCsYC+i9jXbcn8vKAM7vHYT1lxcFV4vDPbO0Mtvl3depE452CE+lXuV9jHd+dsAfM/zI 8bVdndY1tVuRgJpAUQwXKnA8SOtYRU5ELZRQTd09HYkWDdOvkj2Hy6ida74wiF4sReav kJTfUiFnaV5oRnvBM7Uc76R1pBzeI+RGfKrj3K9jH3J9q9taPrAXvjYdfWTZnRiPpANj GcggGSHJv8BlShh3Lb/VtCxs5BPsFrBt1eE40D0DJTrnbcj6JyF2GP46iYvxDIjovr0J XChA== X-Forwarded-Encrypted: i=1; AJvYcCXr69nLCr84rezP41PdA2cIKaFQtrU/uI594LwVTjDTy6doYMRJWToS6VBOUO1VsGBJiVxsPcBU3SDJa3iqlHTCBmso@freebsd.org X-Gm-Message-State: AOJu0YyUWKAHjAJmM4Lt9ftlfo6EvFFKSBBcBZ2Zoe4hI8Evs2d1nOTR cg2YO9WRoK0B4o/baenwaQRzZhRwLgqJhKnoU3hzLI7GyADItVLvO33FmXgREdFRDuoxSJQdsZS JikNPq6unJPvLtI+ZpWuqRm5oQzOFHMpND2E3B3ophSdWumxtDYI= X-Google-Smtp-Source: AGHT+IGHhW9rO9xISbhOqPtrN9cC85mJDWa+5HJrjut/bontnE5MXn11jgCAGZa2MvbWPe0CN0U4DM1H1aCgHxBo1T8= X-Received: by 2002:a17:90b:1286:b0:2d3:c892:9607 with SMTP id 98e67ed59e1d1-2dd80c175c9mr10642007a91.12.1727023974633; Sun, 22 Sep 2024 09:52:54 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202409061835.486IZ9Fd010541@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Sun, 22 Sep 2024 17:52:43 +0100 Message-ID: Subject: Re: git: 07d90ee0a621 - main - kvprintf(): Fix '+' conversion handling To: Konstantin Belousov Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000086f8c80622b81a5b" X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20230601.gappssmtp.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; R_SPF_NA(0.00)[no SPF record]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_DN_SOME(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; MISSING_XM_UA(0.00)[]; ARC_NA(0.00)[]; DMARC_NA(0.00)[bsdimp.com]; FREEMAIL_TO(0.00)[gmail.com]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::531:from]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+] X-Rspamd-Queue-Id: 4XBXHX2PQvz4Cyx X-Spamd-Bar: -- --00000000000086f8c80622b81a5b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Sep 6, 2024 at 10:47=E2=80=AFPM Konstantin Belousov wrote: > On Fri, Sep 06, 2024 at 03:14:49PM -0600, Warner Losh wrote: > > On Fri, Sep 6, 2024 at 2:53=E2=80=AFPM Konstantin Belousov > > wrote: > > > > > On Fri, Sep 06, 2024 at 06:35:09PM +0000, Warner Losh wrote: > > > > The branch main has been updated by imp: > > > > > > > > URL: > > > > https://cgit.FreeBSD.org/src/commit/?id=3D07d90ee0a62110e5161bb0b8a3a0b1b= 9d2beabad > > > > > > > > commit 07d90ee0a62110e5161bb0b8a3a0b1b9d2beabad > > > > Author: Sebastian Huber > > > > AuthorDate: 2024-06-14 07:30:28 +0000 > > > > Commit: Warner Losh > > > > CommitDate: 2024-09-06 18:34:30 +0000 > > > > > > > > kvprintf(): Fix '+' conversion handling > > > > > > > > For example, printf("%+i", 1) prints "+1". However, kvprintf() > did > > > > print just "1" for this example. According to PRINTF(3): > > > > > > > > A sign must always be placed before a number produced by a > signed > > > > conversion. > > > > > > > > For "%+r" radix conversions, keep the "+" handling as it is, > since > > > this > > > > is a non-standard conversion. For "%+p" pointer conversions, > > > continue > > > > to ignore the sign modifier to be in line with libc. > > > > > > > > This change allows to support the ' conversion modifier in the > > > future. > > > > > > > > Reviewed by: imp > > > > Pull Request: https://github.com/freebsd/freebsd-src/pull/1310 > > > > --- > > > > sys/kern/subr_prf.c | 27 +++++++++++++-------------- > > > > 1 file changed, 13 insertions(+), 14 deletions(-) > > > Again, isn't rtld_printf needs the same change? > > > > > > > This time I don't think so. I'll double check though. I'd checked when > this > > came in. Thanks for the reminder. > It would be weird if not needed, rtld_printf.c was a copy of subr_prf.c. > Yes. It's required. I've updated and committed. Thanks again for the reminder. I must have been confused when I thought it wasn't needed, since it isn't even a close call looking at it just now. Warner --00000000000086f8c80622b81a5b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Sep 6, 2024 at 10:47=E2=80=AF= PM Konstantin Belousov <kostikbel= @gmail.com> wrote:
On Fri, Sep 06, 2024 at 03:14:49PM -0600, Warner Losh wrote:
> On Fri, Sep 6, 2024 at 2:53=E2=80=AFPM Konstantin Belousov <kostikbel@gmail.com&g= t;
> wrote:
>
> > On Fri, Sep 06, 2024 at 06:35:09PM +0000, Warner Losh wrote:
> > > The branch main has been updated by imp:
> > >
> > > URL:
> > https://= cgit.FreeBSD.org/src/commit/?id=3D07d90ee0a62110e5161bb0b8a3a0b1b9d2beabad<= /a>
> > >
> > > commit 07d90ee0a62110e5161bb0b8a3a0b1b9d2beabad
> > > Author:=C2=A0 =C2=A0 =C2=A0Sebastian Huber <
sebastian.huber@= embedded-brains.de>
> > > AuthorDate: 2024-06-14 07:30:28 +0000
> > > Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org&g= t;
> > > CommitDate: 2024-09-06 18:34:30 +0000
> > >
> > >=C2=A0 =C2=A0 =C2=A0kvprintf(): Fix '+' conversion ha= ndling
> > >
> > >=C2=A0 =C2=A0 =C2=A0For example, printf("%+i", 1) p= rints "+1".=C2=A0 However, kvprintf() did
> > >=C2=A0 =C2=A0 =C2=A0print just "1" for this example= .=C2=A0 According to PRINTF(3):
> > >
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0A sign must always be placed befor= e a number produced by a signed
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0conversion.
> > >
> > >=C2=A0 =C2=A0 =C2=A0For "%+r" radix conversions, ke= ep the "+" handling as it is, since
> > this
> > >=C2=A0 =C2=A0 =C2=A0is a non-standard conversion.=C2=A0 For &= quot;%+p" pointer conversions,
> > continue
> > >=C2=A0 =C2=A0 =C2=A0to ignore the sign modifier to be in line= with libc.
> > >
> > >=C2=A0 =C2=A0 =C2=A0This change allows to support the ' c= onversion modifier in the
> > future.
> > >
> > >=C2=A0 =C2=A0 =C2=A0Reviewed by: imp
> > >=C2=A0 =C2=A0 =C2=A0Pull Request: http= s://github.com/freebsd/freebsd-src/pull/1310
> > > ---
> > >=C2=A0 sys/kern/subr_prf.c | 27 +++++++++++++-------------- > > >=C2=A0 1 file changed, 13 insertions(+), 14 deletions(-)
> > Again, isn't rtld_printf needs the same change?
> >
>
> This time I don't think so. I'll double check though. I'd = checked when this
> came in. Thanks for the reminder.
It would be weird if not needed, rtld_printf.c was a copy of subr_prf.c.

Yes. It's required. I've updated = and committed. Thanks again for the reminder.
I must have been co= nfused when I thought it wasn't needed, since it isn't even
a close call looking at it just now.

Warner=C2= =A0
--00000000000086f8c80622b81a5b--