[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D0F6EB756@AcuExch.aculab.com>
Date: Fri, 28 Mar 2014 10:54:13 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Hannes Frederic Sowa' <hannes@...essinduktion.org>,
David Miller <davem@...emloft.net>
CC: "joe@...ches.com" <joe@...ches.com>,
"wangyufen@...wei.com" <wangyufen@...wei.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH net-next v2 3/3] ipv6: fix checkpatch errors of "foo*"
and "foo * bar"
From: Hannes Frederic Sowa
> > > Perhaps all the __inline__ uses could be changed to inline too.
> >
> > Or rather, deleted completely, this is a *.c file after all.
Personally I wouldn't do a blanket removal of 'inline' from .c files.
But I will agree that some large functions have been inappropriately
marked 'inline'.
The complier doesn't always make the right guess.
> Smart-arsing:
>
> Removing inline keyword makes the function visible to tracing if
> it didn't get inlined. I think this is a nice side-effect because debug
> kernels are often compiled with less aggressive inlining options
> (readable asm kconfig option).
I want to debug the same binary that will run in production.
Dodgy code can be affected by all sorts of compiler options.
The best one was a problem with the shell deleting the last
character of a $(...) substitution.
The code ran off the beginning of an on-stack buffer when trimming
trailing '\n' and 'found' a '\n' byte lurking in the unwritten
stack (this was well down the stack, and had been written much,
much earlier).
The error was only ever likely on big-endian systems (the msb of
a word is less likely to be '\n'.
David
Powered by blists - more mailing lists