Changes in 4.9.262 uapi: nfnetlink_cthelper.h: fix userspace compilation error ethernet: alx: fix order of calls on resume ath9k: fix transmitting to stations in dynamic SMPS mode net: Fix gro aggregation for udp encaps with zero csum net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0 can: skb: can_skb_set_owner(): fix ref counting if socket was closed before setting skb ownership can: flexcan: assert FRZ bit in flexcan_chip_freeze() can: flexcan: enable RX FIFO after FRZ/HALT valid netfilter: x_tables: gpf inside xt_find_revision() cifs: return proper error code in statfs(2) Revert "mm, slub: consider rest of partial list if acquire_slab() fails" net/mlx4_en: update moderation when config reset net: sched: avoid duplicates in classes dump net: lapbether: Remove netif_start_queue / netif_stop_queue net: davicom: Fix regulator not turned off on failed probe net: davicom: Fix regulator not turned off on driver removal media: usbtv: Fix deadlock on suspend udf: fix silent AED tagLocation corruption mmc: mxs-mmc: Fix a resource leak in an error handling path in 'mxs_mmc_probe()' mmc: mediatek: fix race condition between msdc_request_timeout and irq powerpc/perf: Record counter overflow always if SAMPLE_IP is unset PCI: xgene-msi: Fix race in installing chained irq handler s390/smp: __smp_rescan_cpus() - move cpumask away from stack scsi: libiscsi: Fix iscsi_prep_scsi_cmd_pdu() error handling ALSA: hda/hdmi: Cancel pending works before suspend ALSA: hda: Avoid spurious unsol event handling during S3/S4 ALSA: usb-audio: Fix "cannot get freq eq" errors on Dell AE515 sound bar s390/dasd: fix hanging DASD driver unbind mmc: core: Fix partition switch time for eMMC scripts/recordmcount.{c,pl}: support -ffunction-sections .text.* section names Goodix Fingerprint device is not a modem usb: gadget: f_uac2: always increase endpoint max_packet_size by one audio slot usb: renesas_usbhs: Clear PIPECFG for re-enabling pipe with other EPNUM xhci: Improve detection of device initiated wake signal. USB: serial: io_edgeport: fix memory leak in edge_startup USB: serial: ch341: add new Product ID USB: serial: cp210x: add ID for Acuity Brands nLight Air Adapter USB: serial: cp210x: add some more GE USB IDs usbip: fix stub_dev to check for stream socket usbip: fix vhci_hcd to check for stream socket usbip: fix vudc to check for stream socket usbip: fix stub_dev usbip_sockfd_store() races leading to gpf usbip: fix vhci_hcd attach_store() races leading to gpf staging: rtl8192u: fix ->ssid overflow in r8192_wx_set_scan() staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan() staging: rtl8712: unterminated string leads to read overflow staging: rtl8188eu: fix potential memory corruption in rtw_check_beacon_data() staging: ks7010: prevent buffer overflow in ks_wlan_set_scan() staging: rtl8712: Fix possible buffer overflow in r8712_sitesurvey_cmd staging: rtl8192e: Fix possible buffer overflow in _rtl92e_wx_set_scan staging: comedi: addi_apci_1032: Fix endian problem for COS sample staging: comedi: addi_apci_1500: Fix endian problem for command sample staging: comedi: adv_pci1710: Fix endian problem for AI command data staging: comedi: das6402: Fix endian problem for AI command data staging: comedi: das800: Fix endian problem for AI command data staging: comedi: dmm32at: Fix endian problem for AI command data staging: comedi: me4000: Fix endian problem for AI command data staging: comedi: pcl711: Fix endian problem for AI command data staging: comedi: pcl818: Fix endian problem for AI command data sh_eth: fix TRSCER mask for R7S72100 NFSv4.2: fix return value of _nfs4_get_security_label() block: rsxx: fix error return code of rsxx_pci_probe() configfs: fix a use-after-free in __configfs_open_file alpha: add $(src)/ rather than $(obj)/ to make source file path alpha: merge build rules of division routines alpha: make short build log available for division routines alpha: Package string routines together alpha: switch __copy_user() and __do_clean_user() to normal calling conventions powerpc/64s: Fix instruction encoding for lis in ppc_function_entry() binfmt_misc: fix possible deadlock in bm_register_write hwmon: (lm90) Fix max6658 sporadic wrong temperature reading KVM: arm64: Fix exclusive limit for IPA size iio: imu: adis16400: release allocated memory on failure iio: imu: adis16400: fix memory leak xen/events: reset affinity of 2-level event when tearing it down xen/events: don't unmask an event channel when an eoi is pending xen/events: avoid handling the same event on two cpus at the same time Linux 4.9.262 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ie9b6330a4a2f37c089401f67beadb5ede1f679ba
121 lines
2.0 KiB
ArmAsm
121 lines
2.0 KiB
ArmAsm
/*
|
|
* arch/alpha/lib/copy_user.S
|
|
*
|
|
* Copy to/from user space, handling exceptions as we go.. This
|
|
* isn't exactly pretty.
|
|
*
|
|
* This is essentially the same as "memcpy()", but with a few twists.
|
|
* Notably, we have to make sure that $0 is always up-to-date and
|
|
* contains the right "bytes left to copy" value (and that it is updated
|
|
* only _after_ a successful copy). There is also some rather minor
|
|
* exception setup stuff..
|
|
*/
|
|
|
|
#include <asm/export.h>
|
|
|
|
/* Allow an exception for an insn; exit if we get one. */
|
|
#define EXI(x,y...) \
|
|
99: x,##y; \
|
|
.section __ex_table,"a"; \
|
|
.long 99b - .; \
|
|
lda $31, $exitin-99b($31); \
|
|
.previous
|
|
|
|
#define EXO(x,y...) \
|
|
99: x,##y; \
|
|
.section __ex_table,"a"; \
|
|
.long 99b - .; \
|
|
lda $31, $exitout-99b($31); \
|
|
.previous
|
|
|
|
.set noat
|
|
.align 4
|
|
.globl __copy_user
|
|
.ent __copy_user
|
|
__copy_user:
|
|
.prologue 0
|
|
and $18,$18,$0
|
|
and $16,7,$3
|
|
beq $0,$35
|
|
beq $3,$36
|
|
subq $3,8,$3
|
|
.align 4
|
|
$37:
|
|
EXI( ldq_u $1,0($17) )
|
|
EXO( ldq_u $2,0($16) )
|
|
extbl $1,$17,$1
|
|
mskbl $2,$16,$2
|
|
insbl $1,$16,$1
|
|
addq $3,1,$3
|
|
bis $1,$2,$1
|
|
EXO( stq_u $1,0($16) )
|
|
subq $0,1,$0
|
|
addq $16,1,$16
|
|
addq $17,1,$17
|
|
beq $0,$41
|
|
bne $3,$37
|
|
$36:
|
|
and $17,7,$1
|
|
bic $0,7,$4
|
|
beq $1,$43
|
|
beq $4,$48
|
|
EXI( ldq_u $3,0($17) )
|
|
.align 4
|
|
$50:
|
|
EXI( ldq_u $2,8($17) )
|
|
subq $4,8,$4
|
|
extql $3,$17,$3
|
|
extqh $2,$17,$1
|
|
bis $3,$1,$1
|
|
EXO( stq $1,0($16) )
|
|
addq $17,8,$17
|
|
subq $0,8,$0
|
|
addq $16,8,$16
|
|
bis $2,$2,$3
|
|
bne $4,$50
|
|
$48:
|
|
beq $0,$41
|
|
.align 4
|
|
$57:
|
|
EXI( ldq_u $1,0($17) )
|
|
EXO( ldq_u $2,0($16) )
|
|
extbl $1,$17,$1
|
|
mskbl $2,$16,$2
|
|
insbl $1,$16,$1
|
|
bis $1,$2,$1
|
|
EXO( stq_u $1,0($16) )
|
|
subq $0,1,$0
|
|
addq $16,1,$16
|
|
addq $17,1,$17
|
|
bne $0,$57
|
|
br $31,$41
|
|
.align 4
|
|
$43:
|
|
beq $4,$65
|
|
.align 4
|
|
$66:
|
|
EXI( ldq $1,0($17) )
|
|
subq $4,8,$4
|
|
EXO( stq $1,0($16) )
|
|
addq $17,8,$17
|
|
subq $0,8,$0
|
|
addq $16,8,$16
|
|
bne $4,$66
|
|
$65:
|
|
beq $0,$41
|
|
EXI( ldq $2,0($17) )
|
|
EXO( ldq $1,0($16) )
|
|
mskql $2,$0,$2
|
|
mskqh $1,$0,$1
|
|
bis $2,$1,$2
|
|
EXO( stq $2,0($16) )
|
|
bis $31,$31,$0
|
|
$41:
|
|
$35:
|
|
$exitin:
|
|
$exitout:
|
|
ret $31,($26),1
|
|
|
|
.end __copy_user
|
|
EXPORT_SYMBOL(__copy_user)
|