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, 27 Sep 2007 13:56:16 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	ebiederm@...ssion.com
Cc:	netdev@...r.kernel.org, containers@...ts.osdl.org
Subject: Re: [PATCH 1/4] net: Dynamically allocate the per cpu counters for
 the loopback device.

From: ebiederm@...ssion.com (Eric W. Biederman)
Date: Thu, 27 Sep 2007 14:44:37 -0600

> David Miller <davem@...emloft.net> writes:
> 
> > From: ebiederm@...ssion.com (Eric W. Biederman)
> > Date: Thu, 27 Sep 2007 01:48:00 -0600
> >
> >> I'm not doing get_cpu/put_cpu so does the comment make sense
> >> in relationship to per_cpu_ptr?
> >
> > It is possible.  But someone would need to go check for
> > sure.
> 
> Verified.
> 
> hard_start_xmit is called inside of a
> rcu_read_lock_bh(),rcu_read_unlock_bh() pair.  Which means
> the code will only run on one cpu.
> 
> Therefore we do not need get_cpu/put_cpu.
> 
> In addition per_cpu_ptr is valid.  As it is just a lookup
> into a NR_CPUS sized array by smp_processor_id() to return
> the address of the specific cpu.
> 
> The only difference between per_cpu_ptr and __get_cpu_var()
> are the implementation details between statically allocated
> and dynamically allocated per cpu state.
> 
> So the comment is still valid, and still interesting it just
> should say per_cpu_ptr instead of __get_cpu_var.
> 
> Signed-off-by: "Eric W. Biederman" <ebiederm@...ssion.com>

I've already removed the comment, so you'll have to give
me a patch that adds it back with the new content :-)
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ