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]
Message-ID: <20170927164650.GJ17526@worktop.programming.kicks-ass.net>
Date:   Wed, 27 Sep 2017 18:46:50 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Anna-Maria Gleixner <anna-maria@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...hat.com>,
        Christoph Hellwig <hch@....org>, keescook@...omium.org,
        John Stultz <john.stultz@...aro.org>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 17/25] hrtimer: Implementation of softirq hrtimer handling

On Wed, Sep 27, 2017 at 04:22:39PM +0200, Anna-Maria Gleixner wrote:
> I know and Thomas was unhappy about that as well, but we did not come
> up with a better solution.
> 
> The nasty alternative is:
> 
> static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base,
> 			  struct hrtimer_clock_base *base,
> -			  struct hrtimer *timer, ktime_t *now)
> +			  struct hrtimer *timer, ktime_t *now,
> +                   	  unsigned long flags)
> ...
> -	raw_spin_unlock(&cpu_base->lock);
> +	raw_spin_unlock_irqrestore(&cpu_base->lock, flags);
> 
> ...
> -	raw_spin_lock(&cpu_base->lock);
> +	raw_spin_lock_irq(&cpu_base->lock, flags);
> 
> and hand in flags from the callsites via local_save_flags().

Just push it up one more level and use raw_spin_lock_irqsave() in the
(soft)irq handlers and then pass the flags around.

Thta's what I did in that patch I just send.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ