<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/arch/mips/include, branch v4.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-02-11T10:38:22Z</updated>
<entry>
<title>mips: Differentiate between 32 and 64 bit ELF header</title>
<updated>2016-02-11T10:38:22Z</updated>
<author>
<name>Daniel Wagner</name>
<email>daniel.wagner@bmw-carit.de</email>
</author>
<published>2016-02-10T09:21:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f4d3d504198d464e406171cfa554a59bd4773d79'/>
<id>urn:sha1:f4d3d504198d464e406171cfa554a59bd4773d79</id>
<content type='text'>
Depending on the configuration either the 32 or 64 bit version of
elf_check_arch() is defined. parse_crash_elf{32|64}_headers() does
some basic verification of the ELF header via
vmcore_elf{32|64}_check_arch() which happen to map to elf_check_arch().
Since the implementation 32 and 64 bit version of elf_check_arch()
differ, we use the wrong type:

   In file included from include/linux/elf.h:4:0,
                    from fs/proc/vmcore.c:13:
   fs/proc/vmcore.c: In function 'parse_crash_elf64_headers':
&gt;&gt; arch/mips/include/asm/elf.h:228:23: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     struct elfhdr *__h = (hdr);     \
                          ^
   include/linux/crash_dump.h:41:37: note: in expansion of macro 'elf_check_arch'
    #define vmcore_elf64_check_arch(x) (elf_check_arch(x) || vmcore_elf_check_arch_cross(x))
                                        ^
   fs/proc/vmcore.c:1015:4: note: in expansion of macro 'vmcore_elf64_check_arch'
      !vmcore_elf64_check_arch(&amp;ehdr) ||
       ^

Therefore, we rather define vmcore_elf{32|64}_check_arch() as a
basic machine check and use it also in binfm_elf?32.c as well.

Signed-off-by: Daniel Wagner &lt;daniel.wagner@bmw-carit.de&gt;
Suggested-by: Maciej W. Rozycki &lt;macro@imgtec.com&gt;
Reviewed-by: Maciej W. Rozycki &lt;macro@imgtec.com&gt;
Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/12529/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: Octeon: Update OCTEON_FEATURE_PCIE for Octeon III</title>
<updated>2016-02-10T14:08:53Z</updated>
<author>
<name>Zubair Lutfullah Kakakhel</name>
<email>Zubair.Kakakhel@imgtec.com</email>
</author>
<published>2016-02-10T13:56:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b96d6a80c95815fd01e99a239cd515fc05e5f867'/>
<id>urn:sha1:b96d6a80c95815fd01e99a239cd515fc05e5f867</id>
<content type='text'>
Currently the driver tries to probe the pci driver and oops.

Add CN7XXX to case so that driver probes the pcie driver.

Signed-off-by: Zubair Lutfullah Kakakhel &lt;Zubair.Kakakhel@imgtec.com&gt;
Cc: david.daney@cavium.com
Cc: matt.redfearn@imgtec.com
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/12530/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: Wire up copy_file_range syscall.</title>
<updated>2016-02-05T16:15:42Z</updated>
<author>
<name>Ralf Baechle</name>
<email>ralf@linux-mips.org</email>
</author>
<published>2016-02-05T16:15:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e6c058f9b2700a720d3fad0f6caad1d030c533ee'/>
<id>urn:sha1:e6c058f9b2700a720d3fad0f6caad1d030c533ee</id>
<content type='text'>
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: Fix 64k page support for 32 bit kernels.</title>
<updated>2016-02-04T00:24:40Z</updated>
<author>
<name>Ralf Baechle</name>
<email>ralf@linux-mips.org</email>
</author>
<published>2016-02-04T00:24:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d7de413475f443957a0c1d256e405d19b3a2cb22'/>
<id>urn:sha1:d7de413475f443957a0c1d256e405d19b3a2cb22</id>
<content type='text'>
TASK_SIZE was defined as 0x7fff8000UL which for 64k pages is not a
multiple of the page size.  Somewhere further down the math fails
such that executing an ELF binary fails.

Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Tested-by: Joshua Henderson &lt;joshua.henderson@microchip.com&gt;
</content>
</entry>
<entry>
<title>MIPS: Fix FPU disable with preemption</title>
<updated>2016-02-01T22:36:38Z</updated>
<author>
<name>James Hogan</name>
<email>james.hogan@imgtec.com</email>
</author>
<published>2016-02-01T13:50:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=00fe56dca6a845d5f10ef0398eef26e559e8f98c'/>
<id>urn:sha1:00fe56dca6a845d5f10ef0398eef26e559e8f98c</id>
<content type='text'>
The FPU should not be left enabled after a task context switch. This
isn't usually a problem as the FPU enable bit is updated before
returning to userland, however it can potentially mask kernel bugs, and
in fact KVM assumes it won't happen and won't clear the FPU enable bit
before returning to the guest, which allows the guest to use stale FPU
context.

Interrupts and exceptions save and restore most bits of the CP0 Status
register which contains the FPU enable bit (CU1). When the kernel needs
to enable or disable the FPU (for example due to attempted FPU use by
userland, or the scheduler being invoked) both the actual Status
register and the saved value in the userland context are updated.

However this doesn't work correctly with full kernel preemption enabled,
since the FPU enable bit can be cleared from within an interrupt when
the scheduler is invoked, and only the userland context is updated, not
the interrupt context.

For example:
1) Enter kernel with FPU already enabled, TIF_USEDFPU=1, Status.CU1=1
   saved.
2) Take a timer interrupt while in kernel mode, Status.CU1=1 saved.
3) Timer interrupt invokes scheduler to preempt the task, which clears
   TIF_USEDFPU, disables the FPU in Status register (Status.CU1=0), and
   the value stored in user context from step (1), but not the interrupt
   context from step (2).
4) When the process is scheduled back in again Status.CU1=0.
5) The interrupt context from step (2) is restored, which sets
   Status.CU1=1. So from user context point of view, preemption has
   re-enabled FPU!
6) If the scheduler is invoked again (via preemption or voluntarily)
   before returning to userland, TIF_USEDFPU=0 so the FPU is not
   disabled before the task context switch.
7) The next task resumes from the context switch with FPU enabled!

The restoring of the Status register on return from interrupt/exception
is already selective about which bits to restore, leaving the interrupt
mask bits alone so enabling/disabling of CPU interrupt lines can
persist. Extend this to also leave both the CU1 bit (FPU enable) and the
FR bit (which specifies the FPU mode and gets changed with CU1). This
prevents a stale Status value being restored in step (5) above and
persisting through subsequent context switches.

Also switch to the use of definitions from asm/mipsregs.h while we're at
it.

Since this change also affects the restoration of Status register on the
path back to userland, it increases the sensitivity of the kernel to the
problem of the FPU being left enabled, allowing it to propagate to
userland, therefore a warning is also added to lose_fpu_inatomic() to
point out any future reoccurances before they do any damage.

Signed-off-by: James Hogan &lt;james.hogan@imgtec.com&gt;
Reviewed-by: Paul Burton &lt;paul.burton@imgtec.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/12303/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: Fix buffer overflow in syscall_get_arguments()</title>
<updated>2016-02-01T22:27:08Z</updated>
<author>
<name>James Hogan</name>
<email>james.hogan@imgtec.com</email>
</author>
<published>2016-01-25T20:32:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f4dce1ffd2e30fa31756876ef502ce6d2324be35'/>
<id>urn:sha1:f4dce1ffd2e30fa31756876ef502ce6d2324be35</id>
<content type='text'>
Since commit 4c21b8fd8f14 ("MIPS: seccomp: Handle indirect system calls
(o32)"), syscall_get_arguments() attempts to handle o32 indirect syscall
arguments by incrementing both the start argument number and the number
of arguments to fetch. However only the start argument number needs to
be incremented. The number of arguments does not change, they're just
shifted up by one, and in fact the output array is provided by the
caller and is likely only n entries long, so reading more arguments
overflows the output buffer.

In the case of seccomp, this results in it fetching 7 arguments starting
at the 2nd one, which overflows the unsigned long args[6] in
populate_seccomp_data(). This clobbers the $s0 register from
syscall_trace_enter() which __seccomp_phase1_filter() saved onto the
stack, into which syscall_trace_enter() had placed its syscall number
argument. This caused Chromium to crash.

Credit goes to Milko for tracking it down as far as $s0 being clobbered.

Fixes: 4c21b8fd8f14 ("MIPS: seccomp: Handle indirect system calls (o32)")
Reported-by: Milko Leporis &lt;milko.leporis@imgtec.com&gt;
Signed-off-by: James Hogan &lt;james.hogan@imgtec.com&gt;
Cc: linux-mips@linux-mips.org
Cc: &lt;stable@vger.kernel.org&gt; # 3.15-
Patchwork: https://patchwork.linux-mips.org/patch/12213/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>Revert "MIPS: bcm63xx: nvram: Remove unused bcm63xx_nvram_get_psi_size() function"</title>
<updated>2016-01-27T19:51:50Z</updated>
<author>
<name>Ralf Baechle</name>
<email>ralf@linux-mips.org</email>
</author>
<published>2016-01-27T19:50:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b0a119fd990420d84baf8bc802bd2caf85edb464'/>
<id>urn:sha1:b0a119fd990420d84baf8bc802bd2caf85edb464</id>
<content type='text'>
This reverts commit 5bdb102b3f9785cb88467bc7c75fa0f5cacc8dc5.

Brian Norris &lt;computersforpeace@gmail.com&gt; is reporting:

Ralf,

Please revert this and send it to Linus (or else, I can send it myself).
This is causing build failures, because I didn't take the rest of
Simon's series yet.

drivers/mtd/bcm63xxpart.c: In function 'bcm63xx_parse_cfe_partitions':
drivers/mtd/bcm63xxpart.c:93:2: error: implicit declaration of function
'bcm63xx_nvram_get_psi_size' [-Werror=implicit-function-declaration]

Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
References: https://www.linux-mips.org/cgi-bin/mesg.cgi?a=linux-mips&amp;i=20160126191607.GA111152%40google.com
</content>
</entry>
<entry>
<title>Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus</title>
<updated>2016-01-24T20:50:56Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-01-24T20:50:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e2464688b59c6ae9928f385dabf5355e30cff298'/>
<id>urn:sha1:e2464688b59c6ae9928f385dabf5355e30cff298</id>
<content type='text'>
Pull MIPS updates from Ralf Baechle:
 "This is the main pull request for MIPS for 4.5 plus some 4.4 fixes.

  The executive summary:

   - ATH79 platform improvments, use DT bindings for the ATH79 USB PHY.
   - Avoid useless rebuilds for zboot.
   - jz4780: Add NEMC, BCH and NAND device tree nodes
   - Initial support for the MicroChip's DT platform.  As all the device
     drivers are missing this is still of limited use.
   - Some Loongson3 cleanups.
   - The unavoidable whitespace polishing.
   - Reduce clock skew when synchronizing the CPU cycle counters on CPU
     startup.
   - Add MIPS R6 fixes.
   - Lots of cleanups across arch/mips as fallout from KVM.
   - Lots of minor fixes and changes for IEEE 754-2008 support to the
     FPU emulator / fp-assist software.
   - Minor Ralink, BCM47xx and bcm963xx platform support improvments.
   - Support SMP on BCM63168"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (84 commits)
  MIPS: zboot: Add support for serial debug using the PROM
  MIPS: zboot: Avoid useless rebuilds
  MIPS: BMIPS: Enable ARCH_WANT_OPTIONAL_GPIOLIB
  MIPS: bcm63xx: nvram: Remove unused bcm63xx_nvram_get_psi_size() function
  MIPS: bcm963xx: Update bcm_tag field image_sequence
  MIPS: bcm963xx: Move extended flash address to bcm_tag header file
  MIPS: bcm963xx: Move Broadcom BCM963xx image tag data structure
  MIPS: bcm63xx: nvram: Use nvram structure definition from header file
  MIPS: bcm963xx: Add Broadcom BCM963xx board nvram data structure
  MAINTAINERS: Add KVM for MIPS entry
  MIPS: KVM: Add missing newline to kvm_err()
  MIPS: Move KVM specific opcodes into asm/inst.h
  MIPS: KVM: Use cacheops.h definitions
  MIPS: Break down cacheops.h definitions
  MIPS: Use EXCCODE_ constants with set_except_vector()
  MIPS: Update trap codes
  MIPS: Move Cause.ExcCode trap codes to mipsregs.h
  MIPS: KVM: Make kvm_mips_{init,exit}() static
  MIPS: KVM: Refactor added offsetof()s
  MIPS: KVM: Convert EXPORT_SYMBOL to _GPL
  ...
</content>
</entry>
<entry>
<title>Merge branch '4.4-fixes' into mips-for-linux-next</title>
<updated>2016-01-24T03:14:40Z</updated>
<author>
<name>Ralf Baechle</name>
<email>ralf@linux-mips.org</email>
</author>
<published>2016-01-24T03:14:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=07d17f09691e549fac0101333eebe0161a472b50'/>
<id>urn:sha1:07d17f09691e549fac0101333eebe0161a472b50</id>
<content type='text'>
</content>
</entry>
<entry>
<title>MIPS: bcm63xx: nvram: Remove unused bcm63xx_nvram_get_psi_size() function</title>
<updated>2016-01-24T02:49:27Z</updated>
<author>
<name>Simon Arlott</name>
<email>simon@fire.lp0.eu</email>
</author>
<published>2015-12-13T22:50:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5bdb102b3f9785cb88467bc7c75fa0f5cacc8dc5'/>
<id>urn:sha1:5bdb102b3f9785cb88467bc7c75fa0f5cacc8dc5</id>
<content type='text'>
Remove bcm63xx_nvram_get_psi_size() as it now has no users.

Signed-off-by: Simon Arlott &lt;simon@fire.lp0.eu&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: Kevin Cernekee &lt;cernekee@gmail.com&gt;
Cc: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Cc: Jonas Gorski &lt;jogo@openwrt.org&gt;
Cc: Linux Kernel Mailing List &lt;linux-kernel@vger.kernel.org&gt;
Cc: MIPS Mailing List &lt;linux-mips@linux-mips.org&gt;
Cc: MTD Maling List &lt;linux-mtd@lists.infradead.org&gt;
Patchwork: https://patchwork.linux-mips.org/patch/11836/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
</feed>
