android_kernel_sony_sdm845/arch/mips
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Maciej W. Rozycki ef1b8fbed6 MIPS: prctl: Disallow FRE without FR with PR_SET_FP_MODE requests
commit 28e4213dd331e944e7fca1954a946829162ed9d4 upstream.

Having PR_FP_MODE_FRE (i.e. Config5.FRE) set without PR_FP_MODE_FR (i.e.
Status.FR) is not supported as the lone purpose of Config5.FRE is to
emulate Status.FR=0 handling on FPU hardware that has Status.FR=1
hardwired[1][2].  Also we do not handle this case elsewhere, and assume
throughout our code that TIF_HYBRID_FPREGS and TIF_32BIT_FPREGS cannot
be set both at once for a task, leading to inconsistent behaviour if
this does happen.

Return unsuccessfully then from prctl(2) PR_SET_FP_MODE calls requesting
PR_FP_MODE_FRE to be set with PR_FP_MODE_FR clear.  This corresponds to
modes allowed by `mips_set_personality_fp'.

References:

[1] "MIPS Architecture For Programmers, Vol. III: MIPS32 / microMIPS32
    Privileged Resource Architecture", Imagination Technologies,
    Document Number: MD00090, Revision 6.02, July 10, 2015, Table 9.69
    "Config5 Register Field Descriptions", p. 262

[2] "MIPS Architecture For Programmers, Volume III: MIPS64 / microMIPS64
    Privileged Resource Architecture", Imagination Technologies,
    Document Number: MD00091, Revision 6.03, December 22, 2015, Table
    9.72 "Config5 Register Field Descriptions", p. 288

Fixes: 9791554b45 ("MIPS,prctl: add PR_[GS]ET_FP_MODE prctl options for MIPS")
Signed-off-by: Maciej W. Rozycki <macro@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: <stable@vger.kernel.org> # 4.0+
Patchwork: https://patchwork.linux-mips.org/patch/19327/
Signed-off-by: James Hogan <jhogan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-06 16:44:38 +02:00
..
alchemy MIPS: Sanitise coherentio semantics 2016-10-06 18:01:28 +02:00
ar7 MIPS: AR7: ensure the port type's FCR value is used 2018-01-23 19:57:10 +01:00
ath25 MIPS: ath25: Check for kzalloc allocation failure 2018-03-18 11:18:49 +01:00
ath79 mips: ath79: clock:- Unmap region obtained by of_iomap 2017-10-08 10:26:07 +02:00
bcm47xx MIPS: BCM47XX: Fix LED inversion for WRT54GSv1 2017-11-30 08:39:03 +00:00
bcm63xx MIPS: BCM63xx: Let clk_disable() return immediately if clk is NULL 2016-10-04 16:13:57 +02:00
bmips MIPS: BMIPS: Support APPENDED_DTB 2016-10-06 17:31:02 +02:00
boot MIPS: dts: remove bogus bcm96358nb4ser.dtb from dtb-y entry 2017-11-30 08:39:03 +00:00
cavium-octeon MIPS: Octeon: Fix logging messages with spurious periods after newlines 2018-05-30 07:50:50 +02:00
cobalt MIPS: Cobalt: Fix typo 2016-08-03 08:16:30 +02:00
configs MIPS: Update lemote2f_defconfig for CPU_FREQ_STAT change 2017-03-18 19:14:27 +08:00
dec MIPS: DEC: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression 2017-08-16 13:43:24 -07:00
emma
fw MIPS: Fix misspellings in comments. 2016-04-03 12:32:09 +02:00
generic MIPS: generic: Fix KASLR for generic kernel. 2016-11-04 00:32:06 +01:00
include MIPS: ath79: Fix AR724X_PLL_REG_PCIE_CONFIG offset 2018-05-30 07:50:45 +02:00
jazz MIPS: Jazz: Migrate to new 'set-state' interface 2015-09-03 12:07:50 +02:00
jz4740 tree-wide: replace config_enabled() with IS_ENABLED() 2016-08-04 08:50:07 -04:00
kernel MIPS: prctl: Disallow FRE without FR with PR_SET_FP_MODE requests 2018-06-06 16:44:38 +02:00
kvm KVM: Fix spelling mistake: "cop_unsuable" -> "cop_unusable" 2018-05-30 07:50:16 +02:00
lantiq MIPS: Lantiq: Fix another request_mem_region() return code check 2017-10-08 10:26:07 +02:00
lasat mips: separate extable.h, switch module.h to it 2016-10-05 18:36:18 -04:00
lib MIPS: memset.S: Fix clobber of v1 in last_fixup 2018-04-24 09:34:17 +02:00
loongson32 MIPS: Add RTC support for Loongson1C board 2016-10-04 16:13:57 +02:00
loongson64 mips/loongson/smp: Convert to hotplug state machine 2016-09-19 21:44:32 +02:00
math-emu MIPS: math-emu: Fix final emulation phase for certain instructions 2017-12-25 14:23:46 +01:00
mm MIPS: c-r4k: Fix data corruption related to cache coherence 2018-05-30 07:50:15 +02:00
mti-malta MIPS: Print CM error reports upon bus errors 2016-10-06 18:02:18 +02:00
net MIPS: BPF: Fix multiple problems in JIT skb access helpers. 2018-03-22 09:17:50 +01:00
netlogic MIPS: Netlogic: Exclude netlogic,xlp-pic code from XLR builds 2017-11-21 09:23:28 +01:00
oprofile MIPS/Loongson-3: Convert oprofile to hotplug state machine 2016-07-15 10:40:29 +02:00
paravirt MIPS: SMP: Don't increment irq_count multiple times for call function IPIs 2015-08-03 09:25:12 +02:00
pci MIPS: pci: Remove KERN_WARN instance inside the mt7620 driver 2017-11-30 08:39:02 +00:00
pic32 MIPS: pic32mzda: Fix linker error for pic32_get_pbclk() 2017-03-12 06:41:39 +01:00
pistachio Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-08-06 09:13:11 -04:00
pmcs-msp71xx MIPS: MSP71xx: Use __flush_cache_all instead of flush_cache_all. 2016-05-13 14:01:38 +02:00
pnx833x MIPS: Squash lines for simple wrapper functions 2016-10-04 16:13:57 +02:00
power
ralink MIPS: ralink: Remove ralink_halt() 2018-03-28 18:39:18 +02:00
rb532 MIPS: rb532: use gpiochip data pointer 2016-02-19 09:51:44 +01:00
sgi-ip22 MIPS: ip22: Fix ip28 build for modern gcc 2017-03-18 19:14:27 +08:00
sgi-ip27 MIPS: Spelling fix lets -> let's 2016-05-28 12:35:09 +02:00
sgi-ip32
sibyte MIPS: Sibyte: Fix Kconfig dependencies of SIBYTE_BUS_WATCHER 2016-05-09 12:00:03 +02:00
sni char/genrtc: remove asm-generic/rtc.h from mips 2016-06-04 00:23:36 +02:00
txx9 MIPS: TXx9: use IS_BUILTIN() for CONFIG_LEDS_CLASS 2018-05-30 07:50:25 +02:00
vdso MIPS: VDSO: Drop duplicated -I*/-E* aflags 2016-10-11 15:07:30 +02:00
vr41xx MIPS: VR41xx: Fix typo 2016-05-28 12:35:09 +02:00
xilfpga mips: Remove unnecessary of_platform_populate with default match table 2016-06-23 15:00:29 -05:00
Kbuild MIPS: Initial implementation of a VDSO 2015-11-11 08:36:36 +01:00
Kbuild.platforms MIPS: generic: Convert SEAD-3 to a generic board 2016-10-06 18:04:20 +02:00
Kconfig MIPS: Generic: Fix big endian CPUs on generic machine 2018-04-29 11:31:56 +02:00
Kconfig.debug MIPS: Remove compact branch policy Kconfig entries 2016-09-13 14:14:50 +02:00
Makefile MIPS: Fix build of compressed image 2016-11-04 00:37:15 +01:00