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] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1710202148280.3886@tp.orcam.me.uk>
Date:   Fri, 20 Oct 2017 21:52:33 +0100
From:   "Maciej W. Rozycki" <macro@...s.com>
To:     Joe Perches <joe@...ches.com>
CC:     Aleksandar Markovic <aleksandar.markovic@...rk.com>,
        <linux-mips@...ux-mips.org>,
        Dragan Cecavac <dragan.cecavac@...s.com>,
        Aleksandar Markovic <aleksandar.markovic@...s.com>,
        Douglas Leung <douglas.leung@...s.com>,
        Goran Ferenc <goran.ferenc@...s.com>,
        James Hogan <james.hogan@...s.com>,
        James Hogan <jhogan@...nel.org>,
        <linux-kernel@...r.kernel.org>,
        "Maciej W. Rozycki" <macro@...ux-mips.org>,
        Miodrag Dinic <miodrag.dinic@...s.com>,
        Paul Burton <paul.burton@...tec.com>,
        Paul Burton <paul.burton@...s.com>,
        Petar Jovanovic <petar.jovanovic@...s.com>,
        Raghu Gandham <raghu.gandham@...s.com>,
        "Ralf Baechle" <ralf@...ux-mips.org>
Subject: Re: [PATCH] MIPS: kernel: proc: Remove spurious white space in
 cpuinfo

On Fri, 20 Oct 2017, Joe Perches wrote:

> > diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c
> > index bd9bf52..99f9aab 100644
> > --- a/arch/mips/kernel/proc.c
> > +++ b/arch/mips/kernel/proc.c
> > @@ -58,7 +58,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
> >  
> >  	seq_printf(m, "processor\t\t: %ld\n", n);
> >  	sprintf(fmt, "cpu model\t\t: %%s V%%d.%%d%s\n",
> > -		      cpu_data[n].options & MIPS_CPU_FPU ? "  FPU V%d.%d" : "");
> > +		      cpu_data[n].options & MIPS_CPU_FPU ? " FPU V%d.%d" : "");
> >  	seq_printf(m, fmt, __cpu_name[n],
> >  		      (version >> 4) & 0x0f, version & 0x0f,
> >  		      (fp_vers >> 4) & 0x0f, fp_vers & 0x0f);
> 
> That's somewhat unpleasant code as it formats a fmt string
> and the compiler can not verify fmt and args.
> 
> Perhaps something like the below is preferable:

 Hmm, what problem exactly are you trying to solve with code that has 
worked just fine for 16 years now?

  Maciej

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ