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: <2554479.4o3B19tG25@avalon>
Date:	Sat, 30 Nov 2013 00:44:53 +0100
From:	Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:	Joe Perches <joe@...ches.com>
Cc:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Rob Landley <rob@...dley.net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
	dmaengine@...r.kernel.org, Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH] lib/vsprintf.c: add %paD format specifier for dma_addr_t types

Hi Joe,

On Friday 29 November 2013 14:10:40 Joe Perches wrote:
> On Fri, 2013-11-29 at 14:56 +0200, Andy Shevchenko wrote:
> > On Thu, 2013-11-28 at 10:32 -0800, Joe Perches wrote:
> > > On Thu, 2013-11-28 at 13:28 +0200, user.email wrote:
> > > > From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> > > > 
> > > > Add the %paD format specifier for printing a dma_addr_t type, since
> > > > the
> > > > DMA address size on some platforms can vary based on build options,
> > > > regardless of the native integer type.
> > > 
> > > OK, but I prefer this one because upper case is
> > > sometimes used to specify upper case only output.
> > > ala %x %X and %pUl %pUL.
> > 
> > No objections.
> > 
> > > https://lkml.org/lkml/2013/9/12/483
> > 
> > Hmm... Still not in kernel. Do you know reason why it so?
> 
> It was just for discussion and I didn't sign or push it
> to anyone else.
> 
> What's slightly funny is how far back dma_addr_t printk
> discussions go.
> 
> http://lkml.indiana.edu/hypermail/linux/kernel/0202.1/1221.html
> 
> Anyway, if you think you're going to do a lot of
> transforms of printk("%x", dma_addr_t) with or without
> (unsigned long long) or (u64) casts, I'll submit a signed
> patch to Andrew.
> 
> Let me know.

Just FYI, I've recently submitted a couple of patches that cast dma_addr_t for 
printk purpose, which resulted in Andy proposing a printk format extension 
instead.

> In an aside for Julia Lawall (added to cc's), I tried to
> do a spatch grep for dma_addr_t (and phys_addr_t) types
> that were cast to (unsigned long) or (u64) but I was
> unsuccessful.  Is there something else I need to do?
> 
> $ cat dma_addr_t.cocci
> @@
> dma_addr_t foo;
> @@
> 
> * (unsigned long long)foo;
> 
> $ cat t.c
> #include <linux/types.h>
> #include <linux/printk.h>
> 
> int foo(dma_addr_t a)
> {
> 	printk("test: %llx\n", (unsigned long long)a);
> }
> 
> $ spatch --all-includes --local-includes  -I include/ --sp-file
> dma_addr_t.cocci t.c init_defs_builtins:
> /usr/local/share/coccinelle/standard.h
> HANDLING: t.c
> $
-- 
Regards,

Laurent Pinchart

--
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