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]
Date:	Wed, 02 Oct 2013 15:15:48 +1000
From:	Ryan Mallon <rmallon@...il.com>
To:	Mathieu Rhéaume <mathieu@...ingrhemes.com>
CC:	gregkh@...uxfoundation.org, arve@...roid.com,
	dan.carpenter@...cle.com, mirsal@...sal.fr,
	serban.constantinescu@....com, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org, Joe Perches <joe@...ches.com>
Subject: Re: [PATCH] Staging : android: binder.c: Prefer seq_puts to seq_printf

On 02/10/13 11:57, Mathieu Rhéaume wrote:
> This patch changes seq_printf for seq_puts in binder.c.
> It fixes the warnings emitted by checkpatch.pl.
> 
> Signed-off-by: Mathieu Rhéaume <mathieu@...ingrhemes.com>
> ---
>  drivers/staging/android/binder.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
> index 09edebb..f3d4a1f 100644
> --- a/drivers/staging/android/binder.c
> +++ b/drivers/staging/android/binder.c
> @@ -3272,7 +3272,7 @@ binder_defer_work(struct binder_proc *proc, enum binder_deferred_state defer)
>  static void print_binder_transaction(struct seq_file *m, const char *prefix,
>  				     struct binder_transaction *t)
>  {
> -	seq_printf(m,
> +	seq_puts(m,
>  		   "%s %d: %p from %d:%d to %d:%d code %x flags %x pri %ld r%d",
>  		   prefix, t->debug_id, t,
>  		   t->from ? t->from->proc->pid : 0,

Umm, this won't compile. seq_puts() is defined as:

  int seq_puts(struct seq_file *m, const char *s);

checkpatch.pl does indeed complain about uses of seq_printf() in
drivers/staging/android/binder.c which are passing formatted strings. At
a quick glance it looks like checkpatch.pl is only checking for the
format string on the same line as seq_printf(), so this files ugly
coding style confuses the check. Joe?

Anyway, please don't blindly change things in the kernel without at
least compile testing them.

~Ryan

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ