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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 17 Oct 2016 09:25:54 -0700
From:   Vineet Gupta <Vineet.Gupta1@...opsys.com>
To:     SF Markus Elfring <elfring@...rs.sourceforge.net>,
        "linux-snps-arc@...ts.infradead.org" 
        <linux-snps-arc@...ts.infradead.org>,
        Alexey Brodkin <Alexey.Brodkin@...opsys.com>,
        Andrea Gelmini <andrea.gelmini@...ma.net>,
        Kefeng Wang <wangkefeng.wang@...wei.com>,
        "Noam Camus" <noamc@...hip.com>,
        Vineet Gupta <Vineet.Gupta1@...opsys.com>
CC:     LKML <linux-kernel@...r.kernel.org>,
        "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH] ARC-setup: Use seq_putc() in show_cpuinfo()

On 10/15/2016 12:56 PM, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Sat, 15 Oct 2016 21:31:16 +0200
>
> A single character (line break) should be put into a sequence.
> Thus use the corresponding function "seq_putc".

Perhaps reword the changelog to say that seqc_putc is more efficient than
seqc_printf to output a single char.
I mean _printf is not wrong but not as efficient ?

>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---
>  arch/arc/kernel/setup.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c
> index 3df7f9c..e3f5432 100644
> --- a/arch/arc/kernel/setup.c
> +++ b/arch/arc/kernel/setup.c
> @@ -494,8 +494,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
>  
>  	free_page((unsigned long)str);
>  done:
> -	seq_printf(m, "\n");
> -
> +	seq_putc(m, '\n');
>  	return 0;
>  }
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ