Re: latest printf code

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

 



On Tue, Nov 05, 2019 at 06:39:25PM +0000, Ben Dooks wrote:
> 
> I was wondering if we could do something like export the
> check_assignment_types and maybe also add check_pointer_asn() in
> evaluate.c? The code in check_assignment_types is quite long and
> I am not sure I really want to try and recreate it.

Sure, it's out of the question to recreate it. But better to create
a wrapper for it (and later to adapt it to more specific needs)
than export it.
I'm not sure what you mean exactly by check_pointer_asn() but I've
no principles against doing this.

> I'm still not quite sure over the rules over what is and isn't allowed
> to printf, it may be that we need to be able to get the sizes of the
> types and verify those, which is very architecture specific.

Well, I would say that the main rules are:
* be useful
* be essentially compatible with gcc and current kernel practice.
Or said differently, what's is important it's not what is allowed
or not but what devs needs to be warned about.

The sizes are not what need to be checked, only the types matter.
And yes, I think that checking these types is much desired but this
can be done in a later step. For the architcture specific aspect,
there is no need to worry much about it because sparse, by necessity,
have already the correct types/sizes (for most archs and certainly
the most important ones).

> I would like to see this merged soon, as it looks like I will be doing
> an amount of travelling for work, which can be time consuming and tiring.

I understand and I'll be glad to merge it once the last batch of changes
here are done. The reason I prefer that you move the code in a separate
is not technical but so that you can be properly credited for it (when
using git blame and such).

Best regards,
-- 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