[PATCH] audit: fix size of netlink messages

Nicolas Dichtel nicolas.dichtel at 6wind.com
Mon Jun 10 08:50:30 UTC 2013


Le 09/06/2013 15:29, Thomas Graf a écrit :
> On 06/07/13 at 06:24pm, Nicolas Dichtel wrote:
>> Put Thomas in CC.
>>
>> Le 07/06/2013 17:43, Eric Paris a écrit :
>>> On Fri, 2013-06-07 at 17:25 +0200, Nicolas Dichtel wrote:
>>>
>>> NAK.
>>>
>>> I tried this once before and as I recal userspace actually expected the
>>> stoopidity of being unaligned and broke   :-(
>> On which userspace tools do you think?
>>
>> For example, in the libnl, the function which tries to get the next
>> netlink message expects this alignment:
>
> You should only align the end of the Netlink message if you
> append another Netlink message after it. There is no point
> in aligning it if no message follows in the same buffer.
>
> A receiver should never enforce alignment for the last message.
> Some do and this is causing a lot of pain. An example is the
> Open vSwitch implementation which stricly enforces alignment of
> nlmsg_len which makes attempts to implement zerocopy for the
> upcall more difficult than it should be.
>
Ok, thank you for the clarification.




More information about the Linux-audit mailing list