stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luis Henriques <luis.henriques@canonical.com>
To: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org, kernel-team@lists.ubuntu.com,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Anton Blanchard <anton@samba.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: [PATCH 087/100] powerpc: Restore registers on error exit from csum_partial_copy_generic()
Date: Mon, 14 Oct 2013 11:16:48 +0100	[thread overview]
Message-ID: <87k3hgrwbz.fsf@canonical.com> (raw)
In-Reply-To: <1381488130-30235-88-git-send-email-luis.henriques@canonical.com> (Luis Henriques's message of "Fri, 11 Oct 2013 11:41:57 +0100")

Luis Henriques <luis.henriques@canonical.com> writes:

> 3.5.7.23 -stable review patch.  If anyone has any objections, please let me know.
>
> ------------------
>
> From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
>
> commit 8f21bd0090052e740944f9397e2be5ac7957ded7 upstream.

I'm dropping this patch as it is causing some build failures on
powerpc configs.

Cheers,
-- 
Luis


>
> The csum_partial_copy_generic() function saves the PowerPC
>non-volatile
> r14, r15, and r16 registers for the main checksum-and-copy loop.
> Unfortunately, it fails to restore them upon error exit from this loop,
> which results in silent corruption of these registers in the presumably
> rare event of an access exception within that loop.
>
> This commit therefore restores these register on error exit from the loop.
>
> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Signed-off-by: Anton Blanchard <anton@samba.org>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
> ---
>  arch/powerpc/lib/checksum_64.S | 54 +++++++++++++++++++++++++++++++-----------
>  1 file changed, 40 insertions(+), 14 deletions(-)
>
> diff --git a/arch/powerpc/lib/checksum_64.S b/arch/powerpc/lib/checksum_64.S
> index afa2eba..d0e8390 100644
> --- a/arch/powerpc/lib/checksum_64.S
> +++ b/arch/powerpc/lib/checksum_64.S
> @@ -229,19 +229,35 @@ _GLOBAL(csum_partial)
>  	blr
>  
>  
> -	.macro source
> +	.macro srcnr
>  100:
>  	.section __ex_table,"a"
>  	.align 3
> -	.llong 100b,.Lsrc_error
> +	.llong 100b,.Lsrc_error_nr
>  	.previous
>  	.endm
>  
> -	.macro dest
> +	.macro source
> +150:
> +	.section __ex_table,"a"
> +	.align 3
> +	.llong 150b,.Lsrc_error
> +	.previous
> +	.endm
> +
> +	.macro dstnr
>  200:
>  	.section __ex_table,"a"
>  	.align 3
> -	.llong 200b,.Ldest_error
> +	.llong 200b,.Ldest_error_nr
> +	.previous
> +	.endm
> +
> +	.macro dest
> +250:
> +	.section __ex_table,"a"
> +	.align 3
> +	.llong 250b,.Ldest_error
>  	.previous
>  	.endm
>  
> @@ -277,11 +293,11 @@ _GLOBAL(csum_partial_copy_generic)
>  	mtctr	r6
>  
>  1:
> -source;	lhz	r6,0(r3)		/* align to doubleword */
> +srcnr;	lhz	r6,0(r3)		/* align to doubleword */
>  	subi	r5,r5,2
>  	addi	r3,r3,2
>  	adde	r0,r0,r6
> -dest;	sth	r6,0(r4)
> +dstnr;	sth	r6,0(r4)
>  	addi	r4,r4,2
>  	bdnz	1b
>  
> @@ -395,10 +411,10 @@ dest;	std	r16,56(r4)
>  
>  	mtctr	r6
>  3:
> -source;	ld	r6,0(r3)
> +srcnr;	ld	r6,0(r3)
>  	addi	r3,r3,8
>  	adde	r0,r0,r6
> -dest;	std	r6,0(r4)
> +dstnr;	std	r6,0(r4)
>  	addi	r4,r4,8
>  	bdnz	3b
>  
> @@ -408,10 +424,10 @@ dest;	std	r6,0(r4)
>  	srdi.	r6,r5,2
>  	beq	.Lcopy_tail_halfword
>  
> -source;	lwz	r6,0(r3)
> +srcnr;	lwz	r6,0(r3)
>  	addi	r3,r3,4
>  	adde	r0,r0,r6
> -dest;	stw	r6,0(r4)
> +dstnr;	stw	r6,0(r4)
>  	addi	r4,r4,4
>  	subi	r5,r5,4
>  
> @@ -419,10 +435,10 @@ dest;	stw	r6,0(r4)
>  	srdi.	r6,r5,1
>  	beq	.Lcopy_tail_byte
>  
> -source;	lhz	r6,0(r3)
> +srcnr;	lhz	r6,0(r3)
>  	addi	r3,r3,2
>  	adde	r0,r0,r6
> -dest;	sth	r6,0(r4)
> +dstnr;	sth	r6,0(r4)
>  	addi	r4,r4,2
>  	subi	r5,r5,2
>  
> @@ -430,10 +446,10 @@ dest;	sth	r6,0(r4)
>  	andi.	r6,r5,1
>  	beq	.Lcopy_finish
>  
> -source;	lbz	r6,0(r3)
> +srcnr;	lbz	r6,0(r3)
>  	sldi	r9,r6,8			/* Pad the byte out to 16 bits */
>  	adde	r0,r0,r9
> -dest;	stb	r6,0(r4)
> +dstnr;	stb	r6,0(r4)
>  
>  .Lcopy_finish:
>  	addze	r0,r0			/* add in final carry */
> @@ -443,6 +459,11 @@ dest;	stb	r6,0(r4)
>  	blr
>  
>  .Lsrc_error:
> +	ld	r14,STK_REG(R14)(r1)
> +	ld	r15,STK_REG(R15)(r1)
> +	ld	r16,STK_REG(R16)(r1)
> +	addi	r1,r1,STACKFRAMESIZE
> +.Lsrc_error_nr:
>  	cmpdi	0,r7,0
>  	beqlr
>  	li	r6,-EFAULT
> @@ -450,6 +471,11 @@ dest;	stb	r6,0(r4)
>  	blr
>  
>  .Ldest_error:
> +	ld	r14,STK_REG(R14)(r1)
> +	ld	r15,STK_REG(R15)(r1)
> +	ld	r16,STK_REG(R16)(r1)
> +	addi	r1,r1,STACKFRAMESIZE
> +.Ldest_error_nr:
>  	cmpdi	0,r8,0
>  	beqlr
>  	li	r6,-EFAULT

      parent reply	other threads:[~2013-10-14 10:16 UTC|newest]

Thread overview: 101+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-11 10:40 [ 3.5.y.z extended stable ] Linux 3.5.7.23 stable review Luis Henriques
2013-10-11 10:40 ` [PATCH 001/100] drm/radeon/atom: workaround vbios bug in transmitter table on rs880 (v2) Luis Henriques
2013-10-11 10:40 ` [PATCH 002/100] drm/ast: fix the ast open key function Luis Henriques
2013-10-11 10:40 ` [PATCH 003/100] sched/fair: Fix small race where child->se.parent,cfs_rq might point to invalid ones Luis Henriques
2013-10-11 10:40 ` [PATCH 004/100] HID: provide a helper for validating hid reports Luis Henriques
2013-10-11 10:40 ` [PATCH 005/100] HID: zeroplus: validate output report details Luis Henriques
2013-10-11 10:40 ` [PATCH 006/100] HID: LG: validate HID " Luis Henriques
2013-10-11 10:40 ` [PATCH 007/100] HID: add usage_index in struct hid_usage Luis Henriques
2013-10-11 10:40 ` [PATCH 008/100] HID: validate feature and input report details Luis Henriques
2013-10-11 10:40 ` [PATCH 009/100] HID: logitech-dj: validate output " Luis Henriques
2013-10-11 10:40 ` [PATCH 010/100] HID: multitouch: validate indexes details Luis Henriques
2013-10-11 10:40 ` [PATCH 011/100] drm/radeon: fix panel scaling with eDP and LVDS bridges Luis Henriques
2013-10-11 10:40 ` [PATCH 012/100] net: usb: cdc_ether: Use wwan interface for Telit modules Luis Henriques
2013-10-11 10:40 ` [PATCH 013/100] usb: gadget: fix a bug and a WARN_ON in dummy-hcd Luis Henriques
2013-10-11 10:40 ` [PATCH 014/100] drm/ttm: fix the tt_populated check in ttm_tt_destroy() Luis Henriques
2013-10-11 10:40 ` [PATCH 015/100] sfc: Fix efx_rx_buf_offset() for recycled pages Luis Henriques
2013-10-11 10:40 ` [PATCH 016/100] perf: Clarify perf_cpu_context::active_pmu usage by renaming it to ::unique_pmu Luis Henriques
2013-10-11 10:40 ` [PATCH 017/100] perf: Fix perf_cgroup_switch for sw-events Luis Henriques
2013-10-11 10:40 ` [PATCH 018/100] cfq: explicitly use 64bit divide operation for 64bit arguments Luis Henriques
2013-10-11 10:40 ` [PATCH 019/100] perf tools: Handle JITed code in shared memory Luis Henriques
2013-10-11 10:40 ` [PATCH 020/100] isofs: Refuse RW mount of the filesystem instead of making it RO Luis Henriques
2013-10-11 10:40 ` [PATCH 021/100] HID: Fix Speedlink VAD Cezanne support for some devices Luis Henriques
2013-10-11 10:40 ` [PATCH 022/100] HID: usbhid: quirk for N-Trig DuoSense Touch Screen Luis Henriques
2013-10-11 10:40 ` [PATCH 023/100] Revert "sctp: fix call to SCTP_CMD_PROCESS_SACK in sctp_cmd_interpreter()" Luis Henriques
2013-10-11 10:40 ` [PATCH 024/100] workqueue: cond_resched() after processing each work item Luis Henriques
2013-10-11 10:40 ` [PATCH 025/100] cgroup: fail if monitored file and event_control are in different cgroup Luis Henriques
2013-10-11 10:40 ` [PATCH 026/100] tg3: Don't turn off led on 5719 serdes port 0 Luis Henriques
2013-10-11 10:40 ` [PATCH 027/100] tg3: Expand led off fix to include 5720 Luis Henriques
2013-10-11 10:40 ` [PATCH 028/100] cciss: fix info leak in cciss_ioctl32_passthru() Luis Henriques
2013-10-11 10:40 ` [PATCH 029/100] cpqarray: fix info leak in ida_locked_ioctl() Luis Henriques
2013-10-11 10:41 ` [PATCH 030/100] mm, memcg: give exiting processes access to memory reserves Luis Henriques
2013-10-11 10:41 ` [PATCH 031/100] video: mxsfb: Add missing break Luis Henriques
2013-10-11 10:41 ` [PATCH 032/100] xhci: Fix race between ep halt and URB cancellation Luis Henriques
2013-10-11 10:41 ` [PATCH 033/100] serial: pch_uart: fix tty-kref leak in rx-error path Luis Henriques
2013-10-11 10:41 ` [PATCH 034/100] serial: pch_uart: fix tty-kref leak in dma-rx path Luis Henriques
2013-10-11 10:41 ` [PATCH 035/100] x86, efi: Don't map Boot Services on i386 Luis Henriques
2013-10-11 10:41 ` [PATCH 036/100] ALSA: compress: Fix compress device unregister Luis Henriques
2013-10-11 10:41 ` [PATCH 037/100] dm snapshot: workaround for a false positive lockdep warning Luis Henriques
2013-10-11 10:41 ` [PATCH 038/100] dm-snapshot: fix performance degradation due to small hash size Luis Henriques
2013-10-11 10:41 ` [PATCH 039/100] x86/reboot: Add quirk to make Dell C6100 use reboot=pci automatically Luis Henriques
2013-10-11 10:41 ` [PATCH 040/100] drm/radeon: disable tests/benchmarks if accel is disabled Luis Henriques
2013-10-11 10:41 ` [PATCH 041/100] xhci: Fix oops happening after address device timeout Luis Henriques
2013-10-11 10:41 ` [PATCH 042/100] xhci: Ensure a command structure points to the correct trb on the command ring Luis Henriques
2013-10-11 10:41 ` [PATCH 043/100] drm/i915/dp: increase i2c-over-aux retry interval on AUX DEFER Luis Henriques
2013-10-11 10:41 ` [PATCH 044/100] staging: vt6656: [BUG] main_usb.c oops on device_close move flag earlier Luis Henriques
2013-10-11 10:41 ` [PATCH 045/100] USB: fix PM config symbol in uhci-hcd, ehci-hcd, and xhci-hcd Luis Henriques
2013-10-11 10:41 ` [PATCH 046/100] usb/core/devio.c: Don't reject control message to endpoint with wrong direction bit Luis Henriques
2013-10-11 10:41 ` [PATCH 047/100] hwmon: (applesmc) Check key count before proceeding Luis Henriques
2013-10-11 10:41 ` [PATCH 048/100] USB: Fix breakage in ffs_fs_mount() Luis Henriques
2013-10-11 10:41 ` [PATCH 049/100] usb: dwc3: pci: add support for BayTrail Luis Henriques
2013-10-11 10:41 ` [PATCH 050/100] caif: Add missing braces to multiline if in cfctrl_linkup_request Luis Henriques
2013-10-11 10:41 ` [PATCH 051/100] net: sctp: fix smatch warning in sctp_send_asconf_del_ip Luis Henriques
2013-10-11 10:41 ` [PATCH 052/100] net: sctp: fix ipv6 ipsec encryption bug in sctp_v6_xmit Luis Henriques
2013-10-11 10:41 ` [PATCH 053/100] resubmit bridge: fix message_age_timer calculation Luis Henriques
2013-10-11 10:41 ` [PATCH 054/100] bridge: Clamp forward_delay when enabling STP Luis Henriques
2013-10-11 10:41 ` [PATCH 055/100] ip: use ip_hdr() in __ip_make_skb() to retrieve IP header Luis Henriques
2013-10-11 10:41 ` [PATCH 056/100] ip: generate unique IP identificator if local fragmentation is allowed Luis Henriques
2013-10-11 10:41 ` [PATCH 057/100] netpoll: fix NULL pointer dereference in netpoll_cleanup Luis Henriques
2013-10-11 10:41 ` [PATCH 058/100] ipv6: udp packets following an UFO enqueued packet need also be handled by UFO Luis Henriques
2013-10-11 10:41 ` [PATCH 059/100] via-rhine: fix VLAN priority field (PCP, IEEE 802.1p) Luis Henriques
2013-10-11 10:41 ` [PATCH 060/100] net: flow_dissector: fix thoff for IPPROTO_AH Luis Henriques
2013-10-11 10:41 ` [PATCH 061/100] bonding: Fix broken promiscuity reference counting issue Luis Henriques
2013-10-11 10:41 ` [PATCH 062/100] ipv4 igmp: use in_dev_put in timer handlers instead of __in_dev_put Luis Henriques
2013-10-11 10:41 ` [PATCH 063/100] ipv6 mcast: use in6_dev_put in timer handlers instead of __in6_dev_put Luis Henriques
2013-10-11 10:41 ` [PATCH 064/100] dm9601: fix IFF_ALLMULTI handling Luis Henriques
2013-10-11 10:41 ` [PATCH 065/100] ll_temac: Reset dma descriptors indexes on ndo_open Luis Henriques
2013-10-11 10:41 ` [PATCH 066/100] gianfar: Change default HW Tx queue scheduling mode Luis Henriques
2013-10-11 10:41 ` [PATCH 067/100] fanotify: dont merge permission events Luis Henriques
2013-10-11 10:41 ` [PATCH 068/100] sparc32: Fix exit flag passed from traced sys_sigreturn Luis Henriques
2013-10-11 10:41 ` [PATCH 069/100] sparc64: Fix not SRA'ed %o5 in 32-bit traced syscall Luis Henriques
2013-10-11 10:41 ` [PATCH 070/100] esp_scsi: Fix tag state corruption when autosensing Luis Henriques
2013-10-11 10:41 ` [PATCH 071/100] sparc64: Fix ITLB handler of null page Luis Henriques
2013-10-11 10:41 ` [PATCH 072/100] sparc64: Remove RWSEM export leftovers Luis Henriques
2013-10-11 10:41 ` [PATCH 073/100] sparc64: Fix off by one in trampoline TLB mapping installation loop Luis Henriques
2013-10-11 10:41 ` [PATCH 074/100] ASoC: max98095: a couple array underflows Luis Henriques
2013-10-11 10:41 ` [PATCH 075/100] ASoC: 88pm860x: array overflow in snd_soc_put_volsw_2r_st() Luis Henriques
2013-10-11 10:41 ` [PATCH 076/100] Bluetooth: Add a new PID/VID 0cf3/e005 for AR3012 Luis Henriques
2013-10-11 10:41 ` [PATCH 077/100] Bluetooth: Fix security level for peripheral role Luis Henriques
2013-10-11 10:41 ` [PATCH 078/100] Bluetooth: Fix encryption key size " Luis Henriques
2013-10-11 10:41 ` [PATCH 079/100] Bluetooth: Add support for BCM20702A0 [0b05, 17cb] Luis Henriques
2013-10-11 10:41 ` [PATCH 080/100] rtlwifi: Align private space in rtl_priv struct Luis Henriques
2013-10-11 10:41 ` [PATCH 081/100] p54usb: add USB ID for Corega WLUSB2GTST USB adapter Luis Henriques
2013-10-11 10:41 ` [PATCH 082/100] mwifiex: fix hang issue for USB chipsets Luis Henriques
2013-10-11 10:41 ` [PATCH 083/100] mwifiex: fix NULL pointer dereference in usb suspend handler Luis Henriques
2013-10-11 10:41 ` [PATCH 084/100] USB: serial: option: Ignore card reader interface on Huawei E1750 Luis Henriques
2013-10-11 10:41 ` [PATCH 085/100] ib_srpt: Destroy cm_id before destroying QP Luis Henriques
2013-10-11 10:41 ` [PATCH 088/100] powerpc/sysfs: Disable writing to PURR in guest mode Luis Henriques
2013-10-11 10:42 ` [PATCH 090/100] powerpc/vio: Fix modalias_show return values Luis Henriques
2013-10-11 10:42 ` [PATCH 091/100] ib_srpt: always set response for task management Luis Henriques
2013-10-11 10:42 ` [PATCH 092/100] xen/hvc: allow xenboot console to be used again Luis Henriques
2013-10-11 10:53   ` David Vrabel
2013-10-11 11:04     ` Luis Henriques
2013-10-11 10:42 ` [PATCH 093/100] Smack: Fix the bug smackcipso can't set CIPSO correctly Luis Henriques
2013-10-11 10:42 ` [PATCH 094/100] staging: comedi: ni_65xx: (bug fix) confine insn_bits to one subdevice Luis Henriques
2013-10-11 10:42 ` [PATCH 095/100] mwifiex: fix memory corruption when unsetting multicast list Luis Henriques
2013-10-11 10:42 ` [PATCH 096/100] ext4: avoid hang when mounting non-journal filesystems with orphan list Luis Henriques
2013-10-11 10:42 ` [PATCH 097/100] dmaengine: imx-dma: fix slow path issue in prep_dma_cyclic Luis Henriques
2013-10-11 10:42 ` [PATCH 098/100] dmaengine: imx-dma: fix lockdep issue between irqhandler and tasklet Luis Henriques
2013-10-11 10:42 ` [PATCH 099/100] dma: fix comments Luis Henriques
2013-10-11 10:42 ` [PATCH 100/100] dmaengine: imx-dma: fix callback path in tasklet Luis Henriques
     [not found] ` <1381488130-30235-88-git-send-email-luis.henriques@canonical.com>
2013-10-14 10:16   ` Luis Henriques [this message]

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=87k3hgrwbz.fsf@canonical.com \
    --to=luis.henriques@canonical.com \
    --cc=anton@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=kernel-team@lists.ubuntu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=stable@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).