Skip to contentSkip to conversation

sparse noise due to patch "net: fix kmemcheck annotations"

DISCUSSION Stefan Richter 2 participants 3 messages Nov 11, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Eric,

with above mentioned patch, committed as 14d18a81b5171d4433e41129619c75748b4f4d26, you changed

struct sk_buff {
	...
	__be16 protocol;
	...
}
to
	__be16 protocol:16;

This introduces the following warning from sparse:

include/linux/skbuff.h:357:41: error: invalid bitfield specifier for type restricted __be16.

So, one checker satisfied, another disturbed? Any idea how to get this sparse-clean again?

Signature · 3 lines
Stefan Richter
-=====-==--= =-== -=-==
http://arcgraph.de/sr/
#1 lore raw
Quoted 13 lines · Stefan Richter

Hi Eric,

with above mentioned patch, committed as 14d18a81b5171d4433e41129619c75748b4f4d26, you changed

struct sk_buff {
	...
	__be16 protocol;
	...
}
to
	__be16 protocol:16;
Quoted 7 lines

This introduces the following warning from sparse:

include/linux/skbuff.h:357:41: error: invalid bitfield specifier for type restricted __be16.

So, one checker satisfied, another disturbed? Any idea how to get this sparse-clean again?

No problem here... how do you get this error, and what is your sparse version ?

#2 lore raw
Quoted 3 lines · Eric Dumazet
Quoted 2 lines · Stefan Richter

include/linux/skbuff.h:357:41: error: invalid bitfield specifier for type restricted __be16.

...

Quoted 1 line

No problem here... how do you get this error, and what is your sparse version ?

It's sparse 0.4.2.
The note is only logged with 'make ... CF="-D__CHECK_ENDIAN__"'.

I guess sparse could be taught to ignore :_ suffixes if the suffix covers the whole width of the type... unless there is something that could be improved in kmemcheck.

Signature · 3 lines
Stefan Richter
-=====-==--= =-== -=-==
http://arcgraph.de/sr/