lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241019041329.GL29862@gate.crashing.org>
Date: Fri, 18 Oct 2024 23:13:29 -0500
From: Segher Boessenkool <segher@...nel.crashing.org>
To: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@...il.com>
Cc: mpe@...erman.id.au, npiggin@...il.com, christophe.leroy@...roup.eu,
        naveen@...nel.org, maddy@...ux.ibm.com, arnd@...db.de,
        chentao@...inos.cn, linuxppc-dev@...ts.ozlabs.org,
        linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH][next] powerpc/spufs: Replace snprintf() with the safer scnprintf() variant

Hi!

On Sat, Oct 19, 2024 at 12:50:43PM +1300, Paulo Miguel Almeida wrote:
> On Fri, Oct 18, 2024 at 10:38:43AM -0500, Segher Boessenkool wrote:
> > On Fri, Oct 18, 2024 at 09:28:19PM +1300, Paulo Miguel Almeida wrote:
> > > The C99 standard specifies that {v}snprintf() returns the length of the
> > > data that *would have been* written if there were enough space.
> > 
> > Not including the trailing zero byte, and it can also return negative if
> > there was an encoding error.  Yes.
> > 
> > Not that this matters at all for your patch, so why mention it?
> > 
> > 
> > Segher
> 
> Thanks for taking the time to review this patch.
> 
> Is the objection with the change in itself or just the commit message?

Mostly the commit message.  But because it is confusing, it makes the
patch itself uncertain as well.

The patch is probably fine fwiw, as far as I can see.  But the commit
message is not. And the commit message is by far the most important
part of any patch!

> If it's the later, I'm happy to tweak it to what you would like see.

It is not about what I want to see.  It is about what you want to say
to justify the patch!

In this case, just leave out all the irrelevant stuff, just say why you
think scnprintf is better than what you replace?

Everythihng you did say is about why what you are removing was good.
Not a great patch justification :-)


Segher

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ