<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/mips/math-emu, branch linux-4.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-01-09T16:38:47Z</updated>
<entry>
<title>MIPS: math-emu: Write-protect delay slot emulation pages</title>
<updated>2019-01-09T16:38:47Z</updated>
<author>
<name>Paul Burton</name>
</author>
<published>2018-12-20T17:45:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=62452b3511952ba8dfea771b5bf344491acee466'/>
<id>urn:sha1:62452b3511952ba8dfea771b5bf344491acee466</id>
<content type='text'>
commit adcc81f148d733b7e8e641300c5590a2cdc13bf3 upstream.

Mapping the delay slot emulation page as both writeable &amp; executable
presents a security risk, in that if an exploit can write to &amp; jump into
the page then it can be used as an easy way to execute arbitrary code.

Prevent this by mapping the page read-only for userland, and using
access_process_vm() with the FOLL_FORCE flag to write to it from
mips_dsemul().

This will likely be less efficient due to copy_to_user_page() performing
cache maintenance on a whole page, rather than a single line as in the
previous use of flush_cache_sigtramp(). However this delay slot
emulation code ought not to be running in any performance critical paths
anyway so this isn't really a problem, and we can probably do better in
copy_to_user_page() anyway in future.

A major advantage of this approach is that the fix is small &amp; simple to
backport to stable kernels.

Reported-by: Andy Lutomirski &lt;luto@kernel.org&gt;
Signed-off-by: Paul Burton &lt;paul.burton@mips.com&gt;
Fixes: 432c6bacbd0c ("MIPS: Use per-mm page to execute branch delay slot instructions")
Cc: stable@vger.kernel.org # v4.8+
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Rich Felker &lt;dalias@libc.org&gt;
Cc: David Daney &lt;david.daney@cavium.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>MIPS: math-emu: Mark fall throughs in switch statements with a comment</title>
<updated>2017-12-12T16:20:20Z</updated>
<author>
<name>Aleksandar Markovic</name>
</author>
<published>2017-11-02T11:14:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2a14b21acd056499cb150014e93d805a5ade2ce1'/>
<id>urn:sha1:2a14b21acd056499cb150014e93d805a5ade2ce1</id>
<content type='text'>
Mark intentional fall throughs in switch statements with a consistent
comment.

In most of the cases, a new comment line containing text "fall through"
is inserted. In some of the cases, existing comment contained a variation
of the text "fall through" (for example, "FALL THROUGH" or "drop through").
In such cases, the existing comment is modified to contain "fall through".
Lastly, in two cases, code segments were described in comments as "fall
througs", but were in reality "breaks out" of switch statement. In such
cases, existing comments are accordingly modified.

Apart from making code easier to follow and debug, this change enables
some static code analysers to interpret newly inserted comments as their
annotations (and, therefore, not issue warnings of type "fall through in
switch statement", which is desireable, since marked fallthroughs are
intentional).

Signed-off-by: Aleksandar Markovic &lt;aleksandar.markovic@mips.com&gt;
Cc: Douglas Leung &lt;douglas.leung@mips.com&gt;
Cc: Goran Ferenc &lt;goran.ferenc@mips.com&gt;
Cc: James Hogan &lt;james.hogan@mips.com&gt;
Cc: Maciej W. Rozycki &lt;macro@mips.com&gt;
Cc: Manuel Lauss &lt;manuel.lauss@gmail.com&gt;
Cc: Miodrag Dinic &lt;miodrag.dinic@mips.com&gt;
Cc: Paul Burton &lt;paul.burton@mips.com&gt;
Cc: Petar Jovanovic &lt;petar.jovanovic@mips.com&gt;
Cc: Raghu Gandham &lt;raghu.gandham@mips.com&gt;
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/17588/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: math-emu: Avoid multiple assignment</title>
<updated>2017-12-12T16:20:20Z</updated>
<author>
<name>Aleksandar Markovic</name>
</author>
<published>2017-11-02T11:14:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=61100500a15aed732f363cf19c5206bcd30f4754'/>
<id>urn:sha1:61100500a15aed732f363cf19c5206bcd30f4754</id>
<content type='text'>
Replace several instances of multiple assignment with individual
assignments.

Signed-off-by: Aleksandar Markovic &lt;aleksandar.markovic@mips.com&gt;
Cc: Douglas Leung &lt;douglas.leung@mips.com&gt;
Cc: Goran Ferenc &lt;goran.ferenc@mips.com&gt;
Cc: James Hogan &lt;james.hogan@mips.com&gt;
Cc: Maciej W. Rozycki &lt;macro@mips.com&gt;
Cc: Manuel Lauss &lt;manuel.lauss@gmail.com&gt;
Cc: Miodrag Dinic &lt;miodrag.dinic@mips.com&gt;
Cc: Paul Burton &lt;paul.burton@mips.com&gt;
Cc: Petar Jovanovic &lt;petar.jovanovic@mips.com&gt;
Cc: Raghu Gandham &lt;raghu.gandham@mips.com&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/17587/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: math-emu: Avoid an assignment within if statement condition</title>
<updated>2017-12-12T16:20:20Z</updated>
<author>
<name>Aleksandar Markovic</name>
</author>
<published>2017-11-02T11:14:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8904d5b1a31febe0ced1f56aa347e761668af571'/>
<id>urn:sha1:8904d5b1a31febe0ced1f56aa347e761668af571</id>
<content type='text'>
Move invocation of fpu_emu() to be out of if statement condition.

This makes code easier to follow and debug, and fixes a checkpatch
warning.

Signed-off-by: Aleksandar Markovic &lt;aleksandar.markovic@mips.com&gt;
Cc: Douglas Leung &lt;douglas.leung@mips.com&gt;
Cc: Goran Ferenc &lt;goran.ferenc@mips.com&gt;
Cc: James Hogan &lt;james.hogan@mips.com&gt;
Cc: Maciej W. Rozycki &lt;macro@mips.com&gt;
Cc: Miodrag Dinic &lt;miodrag.dinic@mips.com&gt;
Cc: Paul Burton &lt;paul.burton@mips.com&gt;
Cc: Petar Jovanovic &lt;petar.jovanovic@mips.com&gt;
Cc: Raghu Gandham &lt;raghu.gandham@mips.com&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/17586/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: math-emu: Declare function srl128() as static</title>
<updated>2017-12-12T16:20:19Z</updated>
<author>
<name>Aleksandar Markovic</name>
</author>
<published>2017-11-02T11:14:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=95306f0469580ba94e909d63ee1e2a67c5dc5cba'/>
<id>urn:sha1:95306f0469580ba94e909d63ee1e2a67c5dc5cba</id>
<content type='text'>
Declare function srl128() as static, since it it used just locally
to the source file.

This also removes a sparse warning for corresponding file.

Signed-off-by: Aleksandar Markovic &lt;aleksandar.markovic@mips.com&gt;
Cc: Douglas Leung &lt;douglas.leung@mips.com&gt;
Cc: Goran Ferenc &lt;goran.ferenc@mips.com&gt;
Cc: James Hogan &lt;james.hogan@mips.com&gt;
Cc: Miodrag Dinic &lt;miodrag.dinic@mips.com&gt;
Cc: Paul Burton &lt;paul.burton@mips.com&gt;
Cc: Petar Jovanovic &lt;petar.jovanovic@mips.com&gt;
Cc: Raghu Gandham &lt;raghu.gandham@mips.com&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/17585/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: math-emu: Avoid definition duplication for macro DPXMULT()</title>
<updated>2017-12-12T16:20:19Z</updated>
<author>
<name>Aleksandar Markovic</name>
</author>
<published>2017-11-02T11:14:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=999eae9bf61d379b22f460b31f76b4a03f40bb22'/>
<id>urn:sha1:999eae9bf61d379b22f460b31f76b4a03f40bb22</id>
<content type='text'>
Avoid duplicate definition of macro DPXMULT(). Move its definition
to a header.

Signed-off-by: Aleksandar Markovic &lt;aleksandar.markovic@mips.com&gt;
Cc: Douglas Leung &lt;douglas.leung@mips.com&gt;
Cc: Goran Ferenc &lt;goran.ferenc@mips.com&gt;
Cc: James Hogan &lt;james.hogan@mips.com&gt;
Cc: Miodrag Dinic &lt;miodrag.dinic@mips.com&gt;
Cc: Paul Burton &lt;paul.burton@mips.com&gt;
Cc: Petar Jovanovic &lt;petar.jovanovic@mips.com&gt;
Cc: Raghu Gandham &lt;raghu.gandham@mips.com&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/17584/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: math-emu: Remove an unnecessary header inclusion</title>
<updated>2017-12-12T16:20:19Z</updated>
<author>
<name>Aleksandar Markovic</name>
</author>
<published>2017-11-02T11:14:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ddae82d09a7ea7e374edfe29ca5600ecc7941316'/>
<id>urn:sha1:ddae82d09a7ea7e374edfe29ca5600ecc7941316</id>
<content type='text'>
Remove an unnecessary header inclusion of "ieee754dp.h".

Signed-off-by: Aleksandar Markovic &lt;aleksandar.markovic@mips.com&gt;
Cc: Douglas Leung &lt;douglas.leung@mips.com&gt;
Cc: Goran Ferenc &lt;goran.ferenc@mips.com&gt;
Cc: James Hogan &lt;james.hogan@mips.com&gt;
Cc: Miodrag Dinic &lt;miodrag.dinic@mips.com&gt;
Cc: Paul Burton &lt;paul.burton@mips.com&gt;
Cc: Petar Jovanovic &lt;petar.jovanovic@mips.com&gt;
Cc: Raghu Gandham &lt;raghu.gandham@mips.com&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/17583/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'mips_4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips</title>
<updated>2017-11-15T19:36:08Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2017-11-15T19:36:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=892204e06cb9e89fbc4b299a678f9ca358e97cac'/>
<id>urn:sha1:892204e06cb9e89fbc4b299a678f9ca358e97cac</id>
<content type='text'>
Pull MIPS updates from James Hogan:
 "These are the main MIPS changes for 4.15.

  Fixes:
   - ralink: Fix MT7620 PCI build issues (4.5)
   - Disable cmpxchg64() and HAVE_VIRT_CPU_ACCOUNTING_GEN for 32-bit SMP
     (4.1)
   - Fix MIPS64 FP save/restore on 32-bit kernels (4.0)
   - ptrace: Pick up ptrace/seccomp changed syscall numbers (3.19)
   - ralink: Fix MT7628 pinmux (3.19)
   - BCM47XX: Fix LED inversion on WRT54GSv1 (3.17)
   - Fix n32 core dumping as o32 since regset support (3.13)
   - ralink: Drop obsolete USB_ARCH_HAS_HCD select

  Build system:
   - Default to "generic" (multiplatform) system type instead of IP22
   - Use generic little endian MIPS32 r2 configuration as default
     defconfig instead of ip22_defconfig

  FPU emulation:
   - Fix exception generation for certain R6 FPU instructions

  SMP:
   - Allow __cpu_number_map to be larger than NR_CPUS for sparse CPU id
     spaces

  Miscellaneous:
   - Add iomem resource for kernel bss section for kexec/kdump
   - Atomics: Nudge writes on bit unlock
   - DT files: Standardise "ok" -&gt; "okay"

  Minor cleanups:
   - Define virt_to_pfn()
   - Make thread_saved_pc static
   - Simplify 32-bit sign extension in __read_64bit_c0_split()
   - DMA: Use vma_pages() helper
   - FPU emulation: Replace unsigned with unsigned int
   - MM: Removed unused lastpfn
   - Alchemy: Make clk_ops const
   - Lasat: Use setup_timer() helper
   - ralink: Use BIT() in MT7620 PCI driver

  Platform support:

  BMIPS:
  - Enable HARDIRQS_SW_RESEND

  Broadcom BCM63XX:
  - Add clkdev lookup support
  - Update clk driver, UART driver, DTs to handle named refclk from DTs
  - Split apart various clocks to more closely match hardware
  - Add ethernet clocks

  Cavium Octeon:
  - Remove usage of cvmx_wait() in favour of __delay()

  ImgTec Pistachio:
  - DT: Drop deprecated dwmmc num-slots property

  Ingenic JZ4780:
  - Add NFS root to Ci20 defconfig
  - Add watchdog to Ci20 DT &amp; defconfig, and allow building of watchdog
    driver with this SoC

  Generic (multiplatform):
  - Migrate xilfpga (MIPSfpga) platform to the generic platform

  Lantiq xway:
  - Fix ASC0/ASC1 clocks"

* tag 'mips_4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips: (46 commits)
  MIPS: Add iomem resource for kernel bss section.
  MIPS: cmpxchg64() and HAVE_VIRT_CPU_ACCOUNTING_GEN don't work for 32-bit SMP
  MIPS: BMIPS: Enable HARDIRQS_SW_RESEND
  MIPS: pci: Make use of the BIT() macro inside the mt7620 driver
  MIPS: pci: Remove KERN_WARN instance inside the mt7620 driver
  MIPS: pci: Remove duplicate define in mt7620 driver
  MIPS: ralink: Fix typo in mt7628 pinmux function
  MIPS: ralink: Fix MT7628 pinmux
  MIPS: Fix odd fp register warnings with MIPS64r2
  watchdog: jz4780: Allow selection of jz4740-wdt driver
  MIPS/ptrace: Update syscall nr on register changes
  MIPS/ptrace: Pick up ptrace/seccomp changed syscalls
  MIPS: Fix an n32 core file generation regset support regression
  MIPS: Fix MIPS64 FP save/restore on 32-bit kernels
  MIPS: page.h: Define virt_to_pfn()
  MIPS: Xilfpga: Switch to using generic defconfigs
  MIPS: generic: Add support for MIPSfpga
  MIPS: Set defconfig target to a generic system for 32r2el
  MIPS: Kconfig: Set default MIPS system type as generic
  MIPS: DTS: Remove num-slots from Pistachio SoC
  ...
</content>
</entry>
<entry>
<title>MIPS: math-emu: Use preferred flavor of unsigned integer declarations</title>
<updated>2017-11-07T18:33:16Z</updated>
<author>
<name>Aleksandar Markovic</name>
</author>
<published>2017-11-02T11:13:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a58f85b5d5bbe44ee9dc8eae03a4f21fa3e087cc'/>
<id>urn:sha1:a58f85b5d5bbe44ee9dc8eae03a4f21fa3e087cc</id>
<content type='text'>
Fix occurences of unsigned integer variable declarations that are
not preferred by standards of checkpatch scripts. This removes a
significant number of checkpatch warnings for files in math-emu
directory (several files become completely warning-free), and thus
makes easier to spot (now and in the future) other, perhaps more
significant, checkpatch errors and warnings.

Signed-off-by: Aleksandar Markovic &lt;aleksandar.markovic@mips.com&gt;
Reviewed-by: James Hogan &lt;jhogan@kernel.org&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: Douglas Leung &lt;douglas.leung@mips.com&gt;
Cc: Goran Ferenc &lt;goran.ferenc@mips.com&gt;
Cc: "Maciej W. Rozycki" &lt;macro@imgtec.com&gt;
Cc: Manuel Lauss &lt;manuel.lauss@gmail.com&gt;
Cc: Miodrag Dinic &lt;miodrag.dinic@mips.com&gt;
Cc: Paul Burton &lt;paul.burton@mips.com&gt;
Cc: Petar Jovanovic &lt;petar.jovanovic@mips.com&gt;
Cc: Raghu Gandham &lt;raghu.gandham@mips.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/17582/
Signed-off-by: James Hogan &lt;jhogan@kernel.org&gt;
</content>
</entry>
<entry>
<title>MIPS: math-emu: Fix final emulation phase for certain instructions</title>
<updated>2017-11-07T18:33:15Z</updated>
<author>
<name>Aleksandar Markovic</name>
</author>
<published>2017-11-02T11:13:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=409fcace9963c1e8d2cb0f7ac62e8b34d47ef979'/>
<id>urn:sha1:409fcace9963c1e8d2cb0f7ac62e8b34d47ef979</id>
<content type='text'>
Fix final phase of &lt;CLASS|MADDF|MSUBF|MAX|MIN|MAXA|MINA&gt;.&lt;D|S&gt;
emulation. Provide proper generation of SIGFPE signal and updating
debugfs FP exception stats in cases of any exception flags set in
preceding phases of emulation.

CLASS.&lt;D|S&gt; instruction may generate "Unimplemented Operation" FP
exception. &lt;MADDF|MSUBF&gt;.&lt;D|S&gt; instructions may generate "Inexact",
"Unimplemented Operation", "Invalid Operation", "Overflow", and
"Underflow" FP exceptions. &lt;MAX|MIN|MAXA|MINA&gt;.&lt;D|S&gt; instructions
can generate "Unimplemented Operation" and "Invalid Operation" FP
exceptions.

The proper final processing of the cases when any FP exception
flag is set is achieved by replacing "break" statement with "goto
copcsr" statement. With such solution, this patch brings the final
phase of emulation of the above instructions consistent with the
one corresponding to the previously implemented emulation of other
related FPU instructions (ADD, SUB, etc.).

Fixes: 38db37ba069f ("MIPS: math-emu: Add support for the MIPS R6 CLASS FPU instruction")
Fixes: e24c3bec3e8e ("MIPS: math-emu: Add support for the MIPS R6 MADDF FPU instruction")
Fixes: 83d43305a1df ("MIPS: math-emu: Add support for the MIPS R6 MSUBF FPU instruction")
Fixes: a79f5f9ba508 ("MIPS: math-emu: Add support for the MIPS R6 MAX{, A} FPU instruction")
Fixes: 4e9561b20e2f ("MIPS: math-emu: Add support for the MIPS R6 MIN{, A} FPU instruction")
Signed-off-by: Aleksandar Markovic &lt;aleksandar.markovic@mips.com&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: Douglas Leung &lt;douglas.leung@mips.com&gt;
Cc: Goran Ferenc &lt;goran.ferenc@mips.com&gt;
Cc: "Maciej W. Rozycki" &lt;macro@imgtec.com&gt;
Cc: Miodrag Dinic &lt;miodrag.dinic@mips.com&gt;
Cc: Paul Burton &lt;paul.burton@mips.com&gt;
Cc: Petar Jovanovic &lt;petar.jovanovic@mips.com&gt;
Cc: Raghu Gandham &lt;raghu.gandham@mips.com&gt;
Cc: linux-mips@linux-mips.org
Cc: &lt;stable@vger.kernel.org&gt; # 4.3+
Patchwork: https://patchwork.linux-mips.org/patch/17581/
Signed-off-by: James Hogan &lt;jhogan@kernel.org&gt;
</content>
</entry>
</feed>
