From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Dichtel Subject: Re: [PATCH] audit: fix size of netlink messages Date: Mon, 10 Jun 2013 10:50:30 +0200 Message-ID: <51B59356.4080204@6wind.com> References: <1370618731-29326-1-git-send-email-nicolas.dichtel@6wind.com> <1370619781.3184.25.camel@localhost> <51B20922.7070909@6wind.com> <20130609132934.GA10805@casper.infradead.org> Reply-To: nicolas.dichtel@6wind.com Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mx1.redhat.com (ext-mx11.extmail.prod.ext.phx2.redhat.com [10.5.110.16]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r5A8oZ4f027910 for ; Mon, 10 Jun 2013 04:50:36 -0400 Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5A8oXXk001274 for ; Mon, 10 Jun 2013 04:50:34 -0400 Received: by mail-wg0-f43.google.com with SMTP id x12so4699194wgg.22 for ; Mon, 10 Jun 2013 01:50:33 -0700 (PDT) In-Reply-To: <20130609132934.GA10805@casper.infradead.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: Thomas Graf Cc: linux-audit@redhat.com, viro@zeniv.linux.org.uk List-Id: linux-audit@redhat.com Le 09/06/2013 15:29, Thomas Graf a =E9crit : > On 06/07/13 at 06:24pm, Nicolas Dichtel wrote: >> Put Thomas in CC. >> >> Le 07/06/2013 17:43, Eric Paris a =E9crit : >>> 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.