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]
Message-ID: <51519F3B.6070201@tilera.com>
Date:	Tue, 26 Mar 2013 09:14:35 -0400
From:	Chris Metcalf <cmetcalf@...era.com>
To:	Henrik Austad <haustad@...co.com>
CC:	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tile: ns2cycles should use __raw_get_cpu_var

On 3/26/2013 3:16 AM, Henrik Austad wrote:
> ns2cycles use per_cpu variables, and will, eventually, find its way into
> smp_processord_id(). This is not safe in a preemptible kernel,
> preemption should ideally be disabled.
>
> BUG: using smp_processor_id() in preemptible [00000000] code:
> systemd-modules/367
> caller is ns2cycles+0x40/0xb8
>
> Starting stack dump of tid 367, pid 367 (systemd-modules) on cpu 2 at
> cycle 20969956421
>  frame 0: 0xfffffff70004b860 dump_stack+0x0/0x20 (sp 0xfffffe407993fa90)
>  frame 1: 0xfffffff7006abc28 debug_smp_processor_id+0x1a8/0x1e0 (sp
> 0xfffffe407993fa90)
>  frame 2: 0xfffffff7004d7b40 ns2cycles+0x40/0xb8 (sp 0xfffffe407993fab8)
>  frame 3: 0xfffffff7004dc578 __ndelay+0x38/0x80 (sp 0xfffffe407993fae0)
>
> However, in this case:
>
> - the frequency is the same accross all cores
> - we use the data read-only
> - we do not scale the frequency
>
> Which means that we can use the __raw_get_cpu_var instead.
>
> Signed-off-by: Henrik Austad <haustad@...co.com>
> ---
>  arch/tile/kernel/time.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)

Thanks - taken into the tile tree!

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ