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: <20160601214836.GA14666@mbp>
Date:	Wed, 1 Jun 2016 22:48:37 +0100
From:	Catalin Marinas <catalin.marinas@....com>
To:	"Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	Daniel Lezcano <daniel.lezcano@...aro.org>,
	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Andrey Ryabinin <aryabinin@...tuozzo.com>
Subject: Re: [PATCH] sched, cpuidle: Do not access cpuidle_devices when
 !CONFIG_CPU_IDLE

On Wed, Jun 01, 2016 at 10:20:03PM +0200, Rafael J. Wysocki wrote:
> On Wednesday, June 01, 2016 06:52:16 PM Catalin Marinas wrote:
> > The cpuidle_devices per-CPU variable is only defined when CPU_IDLE is
> > enabled. Commit c8cc7d4de7a4 ("sched/idle: Reorganize the idle loop")
> > removed the #ifdef CONFIG_CPU_IDLE around cpuidle_idle_call() with the
> > compiler optimising away __this_cpu_read(cpuidle_devices). However, with
> > CONFIG_UBSAN && !CONFIG_CPU_IDLE, this optimisation no longer happens
> > and the kernel fails to link since cpuidle_devices is not defined.
> > 
> > This patch introduces an accessor function for the current CPU cpuidle
> > device (returning NULL when !CONFIG_CPU_IDLE) and uses it in
> > cpuidle_idle_call().
> > 
> > Cc: Rafael J. Wysocki <rjw@...ysocki.net>
> > Cc: Daniel Lezcano <daniel.lezcano@...aro.org>
> > Cc: Ingo Molnar <mingo@...hat.com>
> > Cc: Peter Zijlstra <peterz@...radead.org>
> > Cc: Andrey Ryabinin <aryabinin@...tuozzo.com>
> > Signed-off-by: Catalin Marinas <catalin.marinas@....com>
> 
> OK
> 
> Is this needed in -stable?

Not sure how common this config combination is (I was just testing
different options and came across it). Even though it's not a fix for
UBSAN, we could add it up to 4.5 since that's when UBSAN was merged:

Cc: <stable@...r.kernel.org> # 4.5+

-- 
Catalin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ