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-next>] [day] [month] [year] [list]
Message-ID: <20140605160500.GD31564@leverpostej>
Date:	Thu, 5 Jun 2014 17:05:00 +0100
From:	Mark Rutland <mark.rutland@....com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Krzysztof Kozlowski <k.kozlowski@...sung.com>,
	Kukjin Kim <kgene.kim@...sung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
	Tomasz Figa <t.figa@...sung.com>,
	Daniel Lezcano <daniel.lezcano@...aro.org>,
	"stable@...r.kernel.org" <stable@...r.kernel.org>,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	sudeep.holla@....com, linux@....linux.org.uk
Subject: Re: [PATCH 3.10 005/103] irqchip: Gic: Support forced affinity
 setting

Hi Greg,

On Thu, Jun 05, 2014 at 12:24:28AM +0100, Greg Kroah-Hartman wrote:
> 3.10-stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> From: Thomas Gleixner <tglx@...utronix.de>
> 
> commit ffde1de64012c406dfdda8690918248b472f24e4 upstream.
> 
> To support the affinity setting of per cpu timers in the early startup
> of a not yet online cpu, implement the force logic, which disables the
> cpu online check.
> 
> Tagged for stable to allow a simple fix of the affected SoC clock
> event drivers.

This patch alone has the possiblity of breaking CPU hotplug on arm and
arm64 (specifically it breaks hot unplugging CPU0 where interrupts may
be left targetting the offline CPU).

For arm64 [1] that's fixed by commit 601c942176d8 (arm64: use
cpu_online_mask when using forced irq_set_affinity).

Unfortunately there is not an equivalent fix for arm - Russell objected
to the approach [2,3,4], and that's not yet settled.

Mark.

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/254836.html
[2] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/254838.html
[3] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/259245.html
[4] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/259255.html

> 
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Tested-by: Krzysztof Kozlowski <k.kozlowski@...sung.com>
> Cc: Kyungmin Park <kyungmin.park@...sung.com>
> Cc: Marek Szyprowski <m.szyprowski@...sung.com>
> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
> Cc: Tomasz Figa <t.figa@...sung.com>,
> Cc: Daniel Lezcano <daniel.lezcano@...aro.org>,
> Cc: Kukjin Kim <kgene.kim@...sung.com>
> Cc: linux-arm-kernel@...ts.infradead.org,
> Link: http://lkml.kernel.org/r/20140416143315.916984416@linutronix.de
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> 
> ---
>  drivers/irqchip/irq-gic.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> --- a/drivers/irqchip/irq-gic.c
> +++ b/drivers/irqchip/irq-gic.c
> @@ -246,10 +246,14 @@ static int gic_set_affinity(struct irq_d
>  			    bool force)
>  {
>  	void __iomem *reg = gic_dist_base(d) + GIC_DIST_TARGET + (gic_irq(d) & ~3);
> -	unsigned int shift = (gic_irq(d) % 4) * 8;
> -	unsigned int cpu = cpumask_any_and(mask_val, cpu_online_mask);
> +	unsigned int cpu, shift = (gic_irq(d) % 4) * 8;
>  	u32 val, mask, bit;
>  
> +	if (!force)
> +		cpu = cpumask_any_and(mask_val, cpu_online_mask);
> +	else
> +		cpu = cpumask_first(mask_val);
> +
>  	if (cpu >= NR_GIC_CPU_IF || cpu >= nr_cpu_ids)
>  		return -EINVAL;
>  
> 
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 
--
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