Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: "Luís Henriques" <luis.henriques@canonical.com>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	kernel-team@lists.ubuntu.com
Cc: Tony Breeds <tony@bakeyournoodle.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: [PATCH 3.5 61/62] powerpc/le: Ensure that the 'stop-self' RTAS token is handled correctly
Date: Thu, 6 Mar 2014 13:14:18 +0000	[thread overview]
Message-ID: <20140306131418.GB25111@hercules> (raw)
In-Reply-To: <1394030226-26652-62-git-send-email-luis.henriques@canonical.com>

On Wed, Mar 05, 2014 at 02:37:05PM +0000, Luis Henriques wrote:
> 3.5.7.32 -stable review patch.  If anyone has any objections, please let me know.
> 

As requested by Tony Breeds, I'm dropping this from the 3.5 kernel.  Looks
like its applicable only to kernels >= 3.10.

Cheers,
--
Lu�s

> ------------------
> 
> From: Tony Breeds <tony@bakeyournoodle.com>
> 
> commit 41dd03a94c7d408d2ef32530545097f7d1befe5c upstream.
> 
> Currently we're storing a host endian RTAS token in
> rtas_stop_self_args.token.  We then pass that directly to rtas.  This is
> fine on big endian however on little endian the token is not what we
> expect.
> 
> This will typically result in hitting:
> 	panic("Alas, I survived.\n");
> 
> To fix this we always use the stop-self token in host order and always
> convert it to be32 before passing this to rtas.
> 
> Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
> ---
>  arch/powerpc/platforms/pseries/hotplug-cpu.c | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
> index 64c97d8..e8f1b00 100644
> --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
> +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
> @@ -34,12 +34,7 @@
>  #include "offline_states.h"
>  
>  /* This version can't take the spinlock, because it never returns */
> -static struct rtas_args rtas_stop_self_args = {
> -	.token = RTAS_UNKNOWN_SERVICE,
> -	.nargs = 0,
> -	.nret = 1,
> -	.rets = &rtas_stop_self_args.args[0],
> -};
> +static int rtas_stop_self_token = RTAS_UNKNOWN_SERVICE;
>  
>  static DEFINE_PER_CPU(enum cpu_state_vals, preferred_offline_state) =
>  							CPU_STATE_OFFLINE;
> @@ -92,15 +87,20 @@ void set_default_offline_state(int cpu)
>  
>  static void rtas_stop_self(void)
>  {
> -	struct rtas_args *args = &rtas_stop_self_args;
> +	struct rtas_args args = {
> +		.token = cpu_to_be32(rtas_stop_self_token),
> +		.nargs = 0,
> +		.nret = 1,
> +		.rets = &args.args[0],
> +	};
>  
>  	local_irq_disable();
>  
> -	BUG_ON(args->token == RTAS_UNKNOWN_SERVICE);
> +	BUG_ON(rtas_stop_self_token == RTAS_UNKNOWN_SERVICE);
>  
>  	printk("cpu %u (hwid %u) Ready to die...\n",
>  	       smp_processor_id(), hard_smp_processor_id());
> -	enter_rtas(__pa(args));
> +	enter_rtas(__pa(&args));
>  
>  	panic("Alas, I survived.\n");
>  }
> @@ -383,10 +383,10 @@ static int __init pseries_cpu_hotplug_init(void)
>  		}
>  	}
>  
> -	rtas_stop_self_args.token = rtas_token("stop-self");
> +	rtas_stop_self_token = rtas_token("stop-self");
>  	qcss_tok = rtas_token("query-cpu-stopped-state");
>  
> -	if (rtas_stop_self_args.token == RTAS_UNKNOWN_SERVICE ||
> +	if (rtas_stop_self_token == RTAS_UNKNOWN_SERVICE ||
>  			qcss_tok == RTAS_UNKNOWN_SERVICE) {
>  		printk(KERN_INFO "CPU Hotplug not supported by firmware "
>  				"- disabling.\n");
> -- 
> 1.9.0
> 

  reply	other threads:[~2014-03-06 13:14 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05 14:36 [3.5.y.z extended stable] Linux 3.5.7.32 stable review Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 01/62] ata: enable quirk from jmicron JMB350 for JMB394 Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 02/62] sata_sil: apply MOD15WRITE quirk to TOSHIBA MK2561GSYN Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 03/62] ARM: 7953/1: mm: ensure TLB invalidation is complete before enabling MMU Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 04/62] x86: dma-mapping: fix GFP_ATOMIC macro usage Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 05/62] SUNRPC: Fix races in xs_nospace() Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 06/62] ext4: don't try to modify s_flags if the the file system is read-only Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 07/62] drm/i915/dp: increase native aux defer retry timeout Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 08/62] drm/i915/dp: add native aux defer retry limit Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 09/62] rtlwifi: rtl8192ce: Fix too long disable of IRQs Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 10/62] rtlwifi: Fix incorrect return from rtl_ps_enable_nic() Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 11/62] rtl8187: fix regression on MIPS without coherent DMA Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 12/62] PCI: Enable INTx if BIOS left them disabled Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 13/62] cifs: ensure that uncached writes handle unmapped areas correctly Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 14/62] ext4: fix online resize with a non-standard blocks per group setting Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 15/62] ext4: don't leave i_crtime.tv_sec uninitialized Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 16/62] ALSA: usb-audio: work around KEF X300A firmware bug Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 17/62] avr32: fix missing module.h causing build failure in mimc200/fram.c Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 18/62] avr32: Makefile: add '-D__linux__' flag for gcc-4.4.7 use Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 19/62] ARM: 7957/1: add DSB after icache flush in __flush_icache_all() Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 20/62] ahci: disable NCQ on Samsung pci-e SSDs on macbooks Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 21/62] USB: serial: option: blacklist interface 4 for Cinterion PHS8 and PXS8 Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 22/62] workqueue: ensure @task is valid across kthread_stop() Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 23/62] cgroup: update cgroup_enable_task_cg_lists() to grab siglock Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 24/62] hwmon: (max1668) Fix writing the minimum temperature Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 25/62] cpufreq: powernow-k8: Initialize per-cpu data-structures properly Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 26/62] ACPI / video: Filter the _BCL table for duplicate brightness values Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 27/62] perf tools: Remove extraneous newline when parsing hardware cache events Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 28/62] perf tools: Fix cache event name generation Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 29/62] net: fix 'ip rule' iif/oif device rename Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 30/62] tg3: Fix deadlock in tg3_change_mtu() Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 31/62] bonding: 802.3ad: make aggregator_identifier bond-private Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 32/62] usbnet: remove generic hard_header_len check Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 33/62] net: sctp: fix sctp_connectx abi for ia32 emulation/compat mode Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 34/62] net: add and use skb_gso_transport_seglen() Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 35/62] net: ip, ipv6: handle gso skbs in forwarding path Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 36/62] net: asix: handle packets crossing URB boundaries Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 37/62] net: asix: add missing flag to struct driver_info Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 38/62] fs/proc/proc_devtree.c: remove empty /proc/device-tree when no openfirmware exists Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 39/62] Input: elantech - improve clickpad detection Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 40/62] KVM: MMU: handle invalid root_hpa at __direct_map Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 41/62] KVM: VMX: fix use after free of vmx->loaded_vmcs Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 42/62] e100: Fix "disabling already-disabled device" warning Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 43/62] dma: ste_dma40: don't dereference free:d descriptor Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 44/62] ASoC: sta32x: Fix array access overflow Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 45/62] ASoC: wm8770: Fix wrong number of enum items Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 46/62] SELinux: bigendian problems with filename trans rules Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 47/62] quota: Fix race between dqput() and dquot_scan_active() Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 48/62] qla2xxx: Fix kernel panic on selective retransmission request Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 49/62] ASoC: wm8958-dsp: Fix firmware block loading Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 50/62] i7core_edac: Fix PCI device reference count Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 51/62] i7300_edac: Fix " Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 52/62] ipc,mqueue: remove limits for the amount of system-wide queues Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 53/62] dm mpath: fix stalls when handling invalid ioctls Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 54/62] ACPI / processor: Rework processor throttling with work_on_cpu() Luis Henriques
2014-03-05 14:36 ` [PATCH 3.5 55/62] USB: ftdi_sio: add Cressi Leonardo PID Luis Henriques
2014-03-05 14:37 ` [PATCH 3.5 56/62] usb: ehci: fix deadlock when threadirqs option is used Luis Henriques
2014-03-05 14:37 ` [PATCH 3.5 57/62] ASoC: sta32x: Fix wrong enum for limiter2 release rate Luis Henriques
2014-03-05 14:37 ` [PATCH 3.5 58/62] perf/x86: Fix event scheduling Luis Henriques
2014-03-05 14:37 ` [PATCH 3.5 59/62] perf: Fix hotplug splat Luis Henriques
2014-03-05 14:37 ` [PATCH 3.5 60/62] kvm: x86: fix emulator buffer overflow (CVE-2014-0049) Luis Henriques
2014-03-05 14:37 ` [PATCH 3.5 61/62] powerpc/le: Ensure that the 'stop-self' RTAS token is handled correctly Luis Henriques
2014-03-06 13:14   ` Luís Henriques [this message]
2014-03-05 14:37 ` [PATCH 3.5 62/62] powerpc/crashdump : Fix page frame number check in copy_oldmem_page Luis Henriques

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140306131418.GB25111@hercules \
    --to=luis.henriques@canonical.com \
    --cc=benh@kernel.crashing.org \
    --cc=kernel-team@lists.ubuntu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tony@bakeyournoodle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox