Re: [RFC v2] - formatting checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 04, 2019 at 12:57:29PM +0100, Ben Dooks wrote:
> I've updated the series with the last round of review comments.
> I think this is close to mergable now.

Thanks.

> Notes:
> [1] we could do with some sort of -Wformat-printk for kernel printk ext
> [2] sscanf and friends should be added at somepoint
> [3] but these shouldn't be stopping an initial merge

I agree.
 
> for [1], should we consider a __attribute__(linux-printk) as well as 
> the formatting patch?

Another attribute to specifiy the the __attribute__((format(printf,m,a)))
is not only checking pure printf format but also the kernel's extensions?
The yes, maybe but it may be implicit.

> the formatting patch? it seems that today's kernel has a lot of extras
> or should we look at some form of attribute allowing extensions to be
> added, like __attribute__(format-extension(%pF,struct mac_address *)

Yes, something like that will be needed and the mere presence of it
would imply the __attribute__(linux-printk). But I don't think the
attribute syntax is really appropriate (even if it would be very
flexible). I was thinking about something like a few global
	#pragma sparse_printf_format "%pF" struct mac_address *
but:
1) pragmas are ugly/people dislike pragmas
2) there may be (more) problems with the type declaration

-- Luc



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux