On Tue, Oct 11, 2011 at 12:26 PM, Ben Pfaff <[email protected]> wrote:
> On Tue, Oct 11, 2011 at 11:08:26AM -0700, Jesse Gross wrote:
>> On Wed, Oct 5, 2011 at 11:27 AM, Ben Pfaff <[email protected]> wrote:
>> > ---
>> > ??lib/dpif-linux.c | ?? 10 +++++-----
>> > ??1 files changed, 5 insertions(+), 5 deletions(-)
>> >
>> > diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c
>> > index 4ddd464..79e84d6 100644
>> > --- a/lib/dpif-linux.c
>> > +++ b/lib/dpif-linux.c
>> > @@ -102,9 +102,9 @@ struct dpif_linux_flow {
>> >
>> > ?? ?? /* Attributes.
>> > ?? ?? ??*
>> > - ?? ?? * The 'stats' and 'used' members point to 64-bit data that might 
>> > only be
>> > - ?? ?? * aligned on 32-bit boundaries, so get_unaligned_u64() should be 
>> > used to
>> > - ?? ?? * access their values.
>> > + ?? ?? * The 'stats' member points to 64-bit data that might only be 
>> > aligned on
>> > + ?? ?? * 32-bit boundaries, so get_unaligned_u64() should be used to 
>> > access its
>> > + ?? ?? * values.
>>
>> This looks good.  However, when reviewing this I noticed that we seem
>> to access vport stats in an unsafe manner since they are also 64-bit
>> stats aligned on 32-bit boundaries.
>
> Oops.  Here's a fix.
>
> --8<--------------------------cut here-------------------------->8--
>
> From: Ben Pfaff <[email protected]>
> Date: Tue, 11 Oct 2011 12:24:41 -0700
> Subject: [PATCH] dpif-linux: Avoid unaligned accesses to vport stats sent by
>  the datapath.
>
> Reported-by: Jesse Gross <[email protected]>

Looks good, thanks.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to