On Thu, Aug 28, 2008 at 9:38 PM, Vegard Nossum wrote:
Hm, and this is exactly the case for the "do_not_encrypt" field of skbuff:
#ifdef CONFIG_IPV6_NDISC_NODETYPE
__u8 ndisc_nodetype:2;
#endif
#if defined(CONFIG_MAC80211) || defined(CONFIG_MAC80211_MODULE)
__u8 do_not_encrypt:1;
#endif
So we have no way to know where or how big the filler should be. This is
why the simple patch above is not sufficient.
Alexey: I have a modified proposal with slightly different syntax for
DEFINE_BITFIELD. Can you say whether this is acceptable or not? Please
see this short mockup example:
<--- cut --->
#include
#include
#define DEFINE_BITFIELD(name, fields...) \
union { \
struct fields name; \
struct fields; \
};
#define KMEMCHECK_ANNOTATE_BITFIELD(bitfield) \
do { \
memset(&(bitfield), 0, sizeof(bitfield)); \
} while(0)
struct skbuff {
DEFINE_BITFIELD(flags1, {
uint8_t pkt_type:3,
fclone:2,
ipvs_property:1,
peeked:1,
nf_trace:1;
uint16_t protocol;
});
DEFINE_BITFIELD(flags2, {
#ifdef CONFIG_IPV6_NDISC_NODETYPE
uint8_t ndisc_nodetype:2;
#endif
#if defined(CONFIG_MAC80211) || defined(CONFIG_MAC80211_MODULE)
uint8_t do_not_encrypt:1;
#endif
});
};
void __alloc_skb(struct skbuff *skb)
{
KMEMCHECK_ANNOTATE_BITFIELD(skb->flags1);
KMEMCHECK_ANNOTATE_BITFIELD(skb->flags2);
}
<--- cut --->
Thanks,
Vegard
--
| Hiten Pandya | Re: up? (emacs docbook xml ide) |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Roland Dreier | Re: Integration of SCST in the mainstream Linux kernel |
| Florian Schmidt | blacklist kernel boot option |
git: | |
| Linus Torvalds | Re: iptables very slow after commit 784544739a25c30637397ace5489eeb6e15d7d49 |
| Arjan van de Ven | Re: [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
