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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 16 Oct 2013 19:11:53 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Christoph Lameter <cl@...ux.com>, Tejun Heo <tj@...nel.org>,
	akpm@...uxfoundation.org, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 6/6] percpu: Add preemption checks to __this_cpu ops

On Wed, Oct 16, 2013 at 12:52:38PM -0400, Steven Rostedt wrote:
> On Wed, 16 Oct 2013 18:25:37 +0200
> Peter Zijlstra <peterz@...radead.org> wrote:
>  
> > But yes, the way its set-up an arch could indeed provide __this_cup_$op
> > itself -- without providing the _$n variants; in which case the
> > raw_cpu_$op provided by you is broken.
> > 
> > Can't we have a 'simple' coccinelle script rename the entire __this_cpu*
> > implementation over to raw_cpu* and then provide generic __this_cpu* ->
> > raw_cpu maps?
> > 
> 
> Perhaps we should match the way spinlocks are.
> 
> 
> this_cpu*() be the normal use.
> 
> raw_this_cpu() could perhaps not do the checks?
> 
> arch_this_cpu() be the architecture specific version of this_cpu*

In that case we'd need to do something like:

 this_cpu_$op   -> this_cpu_$op_irq (disables irqs itself)
 __this_cpu_$op -> this_cpu_$op     (with check)
 		-> raw_cpu_$op      (without the check)

I don't think the arch bits feature heavily for percpu; normally an arch
provides __this_cpu_$op_$n; raw_cpu_$op_$n in my latest proposal.


Anyway; I don't think the spinlock pattern matches too good and I don't
mind the proposed:

  this_cpu_$op    (disables IRQs itself)
  __this_cpu_$op  (with preemption check)
  raw_cpu_$op	  (without preemption check)


--
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