lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 09 Nov 2017 08:42:40 +0900 (KST)
From:   David Miller <davem@...emloft.net>
To:     gerlitz.or@...il.com
Cc:     kurup.manish@...il.com, jhs@...atatu.com, xiyou.wangcong@...il.com,
        jiri@...nulli.us, jakub.kicinski@...ronome.com,
        pieter.jansenvanvuuren@...ronome.com, simon.horman@...ronome.com,
        john.hurley@...ronome.com, oss-drivers@...ronome.com,
        netdev@...r.kernel.org, aring@...atatu.com, mrv@...atatu.com,
        manish.kurup@...izon.com
Subject: Re: [PATCH net-next v10 1/3] act_vlan: Change stats update to use
 per-core stats

From: Or Gerlitz <gerlitz.or@...il.com>
Date: Thu, 9 Nov 2017 06:40:06 +0900

> On Thu, Nov 9, 2017 at 12:45 AM, Manish Kurup <kurup.manish@...il.com> wrote:
>> On Wed, Nov 8, 2017 at 9:20 AM, Or Gerlitz <gerlitz.or@...il.com> wrote:
>>> On Wed, Nov 8, 2017 at 9:03 PM, Manish Kurup <kurup.manish@...il.com> wrote:
> 
>>>> @@ -30,9 +30,10 @@ static int tcf_vlan(struct sk_buff *skb, const struct tc_action *a,
>>>>         int err;
>>>>         u16 tci;
>>>>
>>>> -       spin_lock(&v->tcf_lock);
>>>>         tcf_lastuse_update(&v->tcf_tm);
>>>> -       bstats_update(&v->tcf_bstats, skb);
>>>> +       bstats_cpu_update(this_cpu_ptr(v->common.cpu_bstats), skb);
>>>> +
>>>> +       spin_lock(&v->tcf_lock);
>>>>         action = v->tcf_action;
>>>
> 
>>> before your changes the spin lock also protected the lastuse update call but
>>> now it doesn't, why?
> 
>> Phase I of my changes, was to get rid of spin_locks, and convert the
>> stats to a per-cpu stats model to get better forwarding performance.
>> While doing this, I looked at a few 'model TC actions' within
>> net/sched (tcf_mirred for example). Neither of them protected the
>> tcf_lastuse_update(). I assumed that this was the case because this
>> was a 'display-only' field, and as long as it changed to a latest
>> timestamp based on packets received, it was OK.
> 
> this is really late in the review cycle so lets not stop for that but
> if for some  reason there's V11 - would be good to put a comment on
> that in the change log

I think the async update of this lastuse value should be fine.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ