1. 22 1月, 2016 1 次提交
  2. 16 1月, 2016 2 次提交
  3. 12 1月, 2016 1 次提交
    • T
      ARM: dts: Fix omap5 PMIC control lines for RTC writes · af756bbc
      Tony Lindgren 提交于
      The palmas PMIC has two control lines that need to be muxed properly
      for things to work. The sys_nirq pin is used for interrupts, and msecure
      pin is used for enabling writes to some PMIC registers.
      
      Without these pins configured properly things can fail in mysterious
      ways. For example, we can't update the RTC registers on palmas PMIC
      unless the msecure pin is configured. And this is probably the reason
      why we had RTC missing from the omap5 dts file.
      
      According to "OMAP5430 ES2.0 Data Manual [Public] VErsion A (Rev. F)"
      swps052f.pdf, mux mode 1 is for sys_drm_msecure so in theory there's
      should be no need to configure it as a GPIO pin.
      
      However, it seems there are some reliability issues using the msecure
      mux mode. And the TI trees configure the msecure pin as GPIO out high
      instead.
      
      As the PMIC only cares that the msecure line is high to allow access
      to the RTC registers, let's use a GPIO hog as suggested by Nishanth
      Menon <nm@ti.com>. Also the use of the internal pull was considered
      but supposedly that may not be capable of keeping the line high in
      a noisy environment.
      
      If we ever see high security omap5 products in the mainline tree,
      those need to skip the msecure pin muxing and ignore setting the GPIO
      hog. Chances are the related pin mux registers are locked in that case
      and the msecure pin is managed by whatever software may be running in
      the ARM TrustZone.
      
      Who knows what the original intention of the msecure pin was. Maybe
      it was supposed to prevent the system time to be set back for some
      game demo modes to time out? Anyways, it seems that later PMICs like
      tps659037 have recycled this pin for "powerhold" and devices like
      beagle-x15 do not need changes to the msecure pin configuration.
      
      To avoid further confusion with TWL variant PMICs, beagle-x15 does
      not have a back-up battery for RTC palmas. Instead the mcp79410 RTC
      is used with rtc-ds1307 driver. There is a "powerhold" jumper j5
      holes near the palmas PMIC, and shorting it seems to power up
      beagle-x15 automatically. It is unknown if it also has other side
      effects to the beagle-x15 power up sequence.
      
      Cc: stable@vger.kernel.org # v4.4
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      af756bbc
  4. 07 1月, 2016 6 次提交
    • R
      dts: vt8500: Add SDHC node to DTS file for WM8650 · 0f090bf1
      Roman Volkov 提交于
      Since WM8650 has the same 'WMT' SDHC controller as WM8505, and the driver
      is already in the kernel, this node enables the controller support for
      WM8650
      Signed-off-by: NRoman Volkov <rvolkov@v1ros.org>
      Reviewed-by: NAlexey Charkov <alchark@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      0f090bf1
    • T
      ARM: Fix broken USB support in multi_v7_defconfig for sunxi devices · 5b1a6181
      Timo Sigurdsson 提交于
      Commit 69fb4dca ("power: Add an axp20x-usb-power driver") introduced a
      new driver for the USB power supply used on various Allwinner based SBCs.
      However, the driver was not added to multi_v7_defconfig which breaks USB
      support for some boards (e.g. LeMaker BananaPi) as the kernel will now
      turn off the USB power supply during boot by default if the driver isn't
      present. (This was not the case in linux 4.3 or lower where the USB power
      was always left on.)
      
      Hence, add the driver to multi_v7_defconfig in order to keep USB support
      working on those boards that require it.
      Signed-off-by: NTimo Sigurdsson <public_timo.s@silentcreek.de>
      Tested-by: NTimo Sigurdsson <public_timo.s@silentcreek.de>
      Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      5b1a6181
    • P
      kvm: x86: only channel 0 of the i8254 is linked to the HPET · e5e57e7a
      Paolo Bonzini 提交于
      While setting the KVM PIT counters in 'kvm_pit_load_count', if
      'hpet_legacy_start' is set, the function disables the timer on
      channel[0], instead of the respective index 'channel'. This is
      because channels 1-3 are not linked to the HPET.  Fix the caller
      to only activate the special HPET processing for channel 0.
      Reported-by: NP J P <pjp@fedoraproject.org>
      Fixes: 0185604cSigned-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      e5e57e7a
    • L
      ARM: versatile: fix MMC/SD interrupt assignment · 20f12758
      Linus Walleij 提交于
      Commit 0976c946
      "arm/versatile: Fix versatile irq specifications"
      has an off-by-one error on the Versatile AB that has
      been regressing the Versatile AB hardware for some time.
      
      However it seems like the interrupt assignments have
      never been correct and I have now adjusted them according
      to the specification. The masks for the valid interrupts
      made it impossible to assign the right SIC interrupt
      for the MMCI, so I went in and fixed these to correspond
      to the specifications, and added references if anyone
      wants to double-check.
      
      Due to the Versatile PB including the Versatile AB
      as a base DTS file, we need to override and correct
      some values to correspond to the actual changes in the
      hardware.
      
      For the Versatile PB I don't think the IRQ line
      assignment for MMCI has ever been correct for either of
      the two MMCI blocks. It would be nice if someone with the
      physical PB board could test this.
      
      Patch tested on the Versatile AB, QEMU for Versatile AB
      and QEMU for Versatile PB.
      
      Cc: Rob Herring <robh@kernel.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: stable@vger.kernel.org
      Fixes: 0976c946 ("arm/versatile: Fix versatile irq specifications")
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      20f12758
    • L
      ARM: nomadik: set latencies to 8 cycles · a461a3ec
      Linus Walleij 提交于
      The Nomadik has sporadic crashes because of these latencies, setting
      them to max makes the platform work nicely, so use this values for
      now.
      
      These latencies were set to 2 since the Nomadik platform was merged,
      but I suspect they never took effect until the right size and
      associativity for the cache was specified in the device tree and
      that is why the crash comes now.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      a461a3ec
    • T
      ARM: OMAP2+: Fix onenand rate detection to avoid filesystem corruption · e7b11dc7
      Tony Lindgren 提交于
      Commit 63aa945b ("memory: omap-gpmc: Add Kconfig option for debug")
      unified the GPMC debug for the SoCs with GPMC. The commit also left out
      the option for HWMOD_INIT_NO_RESET as we now require proper timings for
      GPMC to be able to remap GPMC devices out of address 0.
      
      Unfortunately on Nokia N900, onenand now only partially works with the
      device tree provided timings. It works enough to get detected but the
      clock rate supported by the onenand chip gets misdetected. This in turn
      causes the GPMC timings to be miscalculated and this leads into file
      system corruption on N900.
      
      Looks like onenand needs CS_CONFIG1 bit 27 WRITETYPE set for for sync
      write. This is needed also for async timings when we write to onenand
      with omap2_onenand_set_async_mode(). Without sync write bit set, the
      async read for the onenand ONENAND_REG_VERSION_ID will return 0xfff.
      
      Let's exit with an error if onenand rate is not detected. And let's
      remove the extra call to omap2_onenand_set_async_mode() as we only need
      to do this once at the end of omap2_onenand_setup_async().
      
      Fixes: 63aa945b ("memory: omap-gpmc: Add Kconfig option for debug")
      Cc: stable@vger.kernel.org # v4.2+
      Reported-by: NIvaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
      Tested-by: NIvaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
      Tested-by: NAaro Koskinen <aaro.koskinen@iki.fi>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      e7b11dc7
  5. 06 1月, 2016 2 次提交
  6. 05 1月, 2016 1 次提交
    • C
      tile: provide CONFIG_PAGE_SIZE_64KB etc for tilepro · c1b27ab5
      Chris Metcalf 提交于
      This allows the build system to know that it can't attempt to
      configure the Lustre virtual block device, for example, when tilepro
      is using 64KB pages (as it does by default).  The tilegx build
      already provided those symbols.
      
      Previously we required that the tilepro hypervisor be rebuilt with
      a different hardcoded page size in its headers, and then Linux be
      rebuilt using the updated hypervisor header.  Now we allow each of
      the hypervisor and Linux to be built independently.  We still check
      at boot time to ensure that the page size provided by the hypervisor
      matches what Linux expects.
      Signed-off-by: NChris Metcalf <cmetcalf@ezchip.com>
      Cc: stable@vger.kernel.org [3.19+]
      c1b27ab5
  7. 01 1月, 2016 3 次提交
  8. 31 12月, 2015 1 次提交
  9. 30 12月, 2015 5 次提交
  10. 28 12月, 2015 1 次提交
  11. 25 12月, 2015 5 次提交
    • R
      sparc64: fix FP corruption in user copy functions · a7c5724b
      Rob Gardner 提交于
      Short story: Exception handlers used by some copy_to_user() and
      copy_from_user() functions do not diligently clean up floating point
      register usage, and this can result in a user process seeing invalid
      values in floating point registers. This sometimes makes the process
      fail.
      
      Long story: Several cpu-specific (NG4, NG2, U1, U3) memcpy functions
      use floating point registers and VIS alignaddr/faligndata to
      accelerate data copying when source and dest addresses don't align
      well. Linux uses a lazy scheme for saving floating point registers; It
      is not done upon entering the kernel since it's a very expensive
      operation. Rather, it is done only when needed. If the kernel ends up
      not using FP regs during the course of some trap or system call, then
      it can return to user space without saving or restoring them.
      
      The various memcpy functions begin their FP code with VISEntry (or a
      variation thereof), which saves the FP regs. They conclude their FP
      code with VISExit (or a variation) which essentially marks the FP regs
      "clean", ie, they contain no unsaved values. fprs.FPRS_FEF is turned
      off so that a lazy restore will be triggered when/if the user process
      accesses floating point regs again.
      
      The bug is that the user copy variants of memcpy, copy_from_user() and
      copy_to_user(), employ an exception handling mechanism to detect faults
      when accessing user space addresses, and when this handler is invoked,
      an immediate return from the function is forced, and VISExit is not
      executed, thus leaving the fprs register in an indeterminate state,
      but often with fprs.FPRS_FEF set and one or more dirty bits. This
      results in a return to user space with invalid values in the FP regs,
      and since fprs.FPRS_FEF is on, no lazy restore occurs.
      
      This bug affects copy_to_user() and copy_from_user() for NG4, NG2,
      U3, and U1. All are fixed by using a new exception handler for those
      loads and stores that are done during the time between VISEnter and
      VISExit.
      
      n.b. In NG4memcpy, the problematic code can be triggered by a copy
      size greater than 128 bytes and an unaligned source address.  This bug
      is known to be the cause of random user process memory corruptions
      while perf is running with the callgraph option (ie, perf record -g).
      This occurs because perf uses copy_from_user() to read user stacks,
      and may fault when it follows a stack frame pointer off to an
      invalid page. Validation checks on the stack address just obscure
      the underlying problem.
      Signed-off-by: NRob Gardner <rob.gardner@oracle.com>
      Signed-off-by: NDave Aldridge <david.j.aldridge@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a7c5724b
    • R
      sparc64: Perf should save/restore fault info · 83352694
      Rob Gardner 提交于
      There have been several reports of random processes being killed with
      a bus error or segfault during userspace stack walking in perf.  One
      of the root causes of this problem is an asynchronous modification to
      thread_info fault_address and fault_code, which stems from a perf
      counter interrupt arriving during kernel processing of a "benign"
      fault, such as a TSB miss. Since perf_callchain_user() invokes
      copy_from_user() to read user stacks, a fault is not only possible,
      but probable. Validity checks on the stack address merely cover up the
      problem and reduce its frequency.
      
      The solution here is to save and restore fault_address and fault_code
      in perf_callchain_user() so that the benign fault handler is not
      disturbed by a perf interrupt.
      Signed-off-by: NRob Gardner <rob.gardner@oracle.com>
      Signed-off-by: NDave Aldridge <david.j.aldridge@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      83352694
    • R
      sparc64: Ensure perf can access user stacks · 3f74306a
      Rob Gardner 提交于
      When an interrupt (such as a perf counter interrupt) is delivered
      while executing in user space, the trap entry code puts ASI_AIUS in
      %asi so that copy_from_user() and copy_to_user() will access the
      correct memory. But if a perf counter interrupt is delivered while the
      cpu is already executing in kernel space, then the trap entry code
      will put ASI_P in %asi, and this will prevent copy_from_user() from
      reading any useful stack data in either of the perf_callchain_user_X
      functions, and thus no user callgraph data will be collected for this
      sample period. An additional problem is that a fault is guaranteed
      to occur, and though it will be silently covered up, it wastes time
      and could perturb state.
      
      In perf_callchain_user(), we ensure that %asi contains ASI_AIUS
      because we know for a fact that the subsequent calls to
      copy_from_user() are intended to read the user's stack.
      
      [ Use get_fs()/set_fs() -DaveM ]
      Signed-off-by: NRob Gardner <rob.gardner@oracle.com>
      Signed-off-by: NDave Aldridge <david.j.aldridge@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3f74306a
    • R
      sparc64: Don't set %pil in rtrap_nmi too early · 1ca04a4c
      Rob Gardner 提交于
      Commit 28a1f533 delays setting %pil to avoid potential
      hardirq stack overflow in the common rtrap_irq path.
      Setting %pil also needs to be delayed in the rtrap_nmi
      path for the same reason.
      Signed-off-by: NRob Gardner <rob.gardner@oracle.com>
      Signed-off-by: NDave Aldridge <david.j.aldridge@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1ca04a4c
    • K
      sparc64: Add ADI capability to cpu capabilities · 82924e54
      Khalid Aziz 提交于
      Add ADI (Application Data Integrity) capability to cpu capabilities list.
      ADI capability allows virtual addresses to be encoded with a tag in
      bits 63-60. This tag serves as an access control key for the regions
      of virtual address with ADI enabled and a key set on them. Hypervisor
      encodes this capability as "adp" in "hwcap-list" property in machine
      description.
      Signed-off-by: NKhalid Aziz <khalid.aziz@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      82924e54
  12. 24 12月, 2015 1 次提交
  13. 23 12月, 2015 2 次提交
    • J
      ARM: tegra: Fix suspend hang on Tegra124 Chromebooks · 80373d37
      Jon Hunter 提交于
      Enabling CPUFreq support for Tegra124 Chromebooks is causing the Tegra124
      to hang when resuming from suspend.
      
      When CPUFreq is enabled, the CPU clock is changed from the PLLX clock to
      the DFLL clock during kernel boot. When resuming from suspend the CPU
      clock is temporarily changed back to the PLLX clock before switching back
      to the DFLL. If the DFLL is operating at a much lower frequency than the
      PLLX when we enter suspend, and so the CPU voltage rail is at a voltage
      too low for the CPUs to operate at the PLLX frequency, then the device
      will hang.
      
      Please note that the PLLX is used in the resume sequence to switch the CPU
      clock from the very slow 32K clock to a faster clock during early resume
      to speed up the resume sequence before the DFLL is resumed.
      
      Ideally, we should fix this by setting the suspend frequency so that it
      matches the PLLX frequency, however, that would be a bigger change. For
      now simply disable CPUFreq support for Tegra124 Chromebooks to avoid the
      hang when resuming from suspend.
      
      Fixes: 9a0baee9 ("ARM: tegra: Enable CPUFreq support for Tegra124
      		      Chromebooks")
      Signed-off-by: NJon Hunter <jonathanh@nvidia.com>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      80373d37
    • M
      um: Fix pointer cast · de379379
      Mickaël Salaün 提交于
      Fix a pointer cast typo introduced in v4.4-rc5 especially visible for
      the i386 subarchitecture where it results in a kernel crash.
      
      [ Also removed pointless cast as per Al Viro - Linus ]
      
      Fixes: 8090bfd2 ("um: Fix fpstate handling")
      Signed-off-by: NMickaël Salaün <mic@digikod.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Acked-by: NRichard Weinberger <richard@nod.at>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      de379379
  14. 22 12月, 2015 9 次提交
    • A
      KVM: x86: Reload pit counters for all channels when restoring state · 0185604c
      Andrew Honig 提交于
      Currently if userspace restores the pit counters with a count of 0
      on channels 1 or 2 and the guest attempts to read the count on those
      channels, then KVM will perform a mod of 0 and crash.  This will ensure
      that 0 values are converted to 65536 as per the spec.
      
      This is CVE-2015-7513.
      Signed-off-by: NAndy Honig <ahonig@google.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0185604c
    • P
      KVM: MTRR: treat memory as writeback if MTRR is disabled in guest CPUID · e24dea2a
      Paolo Bonzini 提交于
      Virtual machines can be run with CPUID such that there are no MTRRs.
      In that case, the firmware will never enable MTRRs and it is obviously
      undesirable to run the guest entirely with UC memory.  Check out guest
      CPUID, and use WB memory if MTRR do not exist.
      
      Cc: qemu-stable@nongnu.org
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=107561Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      e24dea2a
    • P
      KVM: MTRR: observe maxphyaddr from guest CPUID, not host · fa7c4ebd
      Paolo Bonzini 提交于
      Conversion of MTRRs to ranges used the maxphyaddr from the boot CPU.
      This is wrong, because var_mtrr_range's mask variable then is discontiguous
      (like FF00FFFF000, where the first run of 0s corresponds to the bits
      between host and guest maxphyaddr).  Instead always set up the masks
      to be full 64-bit values---we know that the reserved bits at the top
      are zero, and we can restore them when reading the MSR.  This way
      var_mtrr_range gets a mask that just works.
      
      Fixes: a13842dc
      Cc: qemu-stable@nongnu.org
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=107561Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      fa7c4ebd
    • A
      KVM: MTRR: fix fixed MTRR segment look up · a7f2d786
      Alexis Dambricourt 提交于
      This fixes the slow-down of VM running with pci-passthrough, since some MTRR
      range changed from MTRR_TYPE_WRBACK to MTRR_TYPE_UNCACHABLE.  Memory in the
      0K-640K range was incorrectly treated as uncacheable.
      
      Fixes: f7bfb57b
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=107561
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NAlexis Dambricourt <alexis.dambricourt@gmail.com>
      [Use correct BZ for "Fixes" annotation.  - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      a7f2d786
    • R
      MIPS: Fix build error due to unused variables. · ec7b9720
      Ralf Baechle 提交于
      c861519f ("MIPS: Fix delay loops which may
      be removed by GCC.") which made it upstream was an outdated version of the
      patch and is lacking some the removal of two variables that became unused
      thus resulting in further warnings and build breakage.  The commit
      from ae878615d7cee5d7346946cf1ae1b60e427013c2 was correct however.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      ec7b9720
    • Q
      MIPS: VDSO: Fix build error · 2a037f31
      Qais Yousef 提交于
      Commit ebb5e78c ("MIPS: Initial implementation of a VDSO") introduced a
      build error.
      
      For MIPS VDSO to be compiled it requires binutils version 2.25 or above but
      the check in the Makefile had inverted logic causing it to be compiled in if
      binutils is below 2.25.
      
      This fixes the following compilation error:
      
      CC      arch/mips/vdso/gettimeofday.o
      /tmp/ccsExcUd.s: Assembler messages:
      /tmp/ccsExcUd.s:62: Error: can't resolve `_start' {*UND* section} - `L0' {.text section}
      /tmp/ccsExcUd.s:467: Error: can't resolve `_start' {*UND* section} - `L0' {.text section}
      make[2]: *** [arch/mips/vdso/gettimeofday.o] Error 1
      make[1]: *** [arch/mips/vdso] Error 2
      make: *** [arch/mips] Error 2
      
      [ralf@linux-mips: Fixed Sergei's complaint on the formatting of the
      cited commit and generally reformatted the log message.]
      Signed-off-by: NQais Yousef <qais.yousef@imgtec.com>
      Cc: alex@alex-smith.me.uk
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11745/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      2a037f31
    • P
      MIPS: CPS: drop .set mips64r2 directives · f3575e23
      Paul Burton 提交于
      Commit 977e043d ("MIPS: kernel: cps-vec: Replace mips32r2 ISA level
      with mips64r2") leads to .set mips64r2 directives being present in 32
      bit (ie. CONFIG_32BIT=y) kernels. This is incorrect & leads to MIPS64
      instructions being emitted by the assembler when expanding
      pseudo-instructions. For example the "move" instruction can legitimately
      be expanded to a "daddu". This causes problems when the kernel is run on
      a MIPS32 CPU, as CONFIG_32BIT kernels of course often are...
      
      Fix this by dropping the .set <ISA> directives entirely now that Kconfig
      should be ensuring that kernels including this code are built with a
      suitable -march= compiler flag.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: <stable@vger.kernel.org> # 3.16+
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/10869/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      f3575e23
    • J
      MIPS: uaccess: Take EVA into account in [__]clear_user · d6a428fb
      James Hogan 提交于
      __clear_user() (and clear_user() which uses it), always access the user
      mode address space, which results in EVA store instructions when EVA is
      enabled even if the current user address limit is KERNEL_DS.
      
      Fix this by adding a new symbol __bzero_kernel for the normal kernel
      address space bzero in EVA mode, and call that from __clear_user() if
      eva_kernel_access().
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Leonid Yegoshin <leonid.yegoshin@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/10844/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      d6a428fb
    • J
      MIPS: uaccess: Take EVA into account in __copy_from_user() · 6f06a2c4
      James Hogan 提交于
      When EVA is in use, __copy_from_user() was unconditionally using the EVA
      instructions to read the user address space, however this can also be
      used for kernel access. If the address isn't a valid user address it
      will cause an address error or TLB exception, and if it is then user
      memory may be read instead of kernel memory.
      
      For example in the following stack trace from Linux v3.10 (changes since
      then will prevent this particular one still happening) kernel_sendmsg()
      set the user address limit to KERNEL_DS, and tcp_sendmsg() goes on to
      use __copy_from_user() with a kernel address in KSeg0.
      
      [<8002d434>] __copy_fromuser_common+0x10c/0x254
      [<805710e0>] tcp_sendmsg+0x5f4/0xf00
      [<804e8e3c>] sock_sendmsg+0x78/0xa0
      [<804e8f28>] kernel_sendmsg+0x24/0x38
      [<804ee0f8>] sock_no_sendpage+0x70/0x7c
      [<8017c820>] pipe_to_sendpage+0x80/0x98
      [<8017c6b0>] splice_from_pipe_feed+0xa8/0x198
      [<8017cc54>] __splice_from_pipe+0x4c/0x8c
      [<8017e844>] splice_from_pipe+0x58/0x78
      [<8017e884>] generic_splice_sendpage+0x20/0x2c
      [<8017d690>] do_splice_from+0xb4/0x110
      [<8017d710>] direct_splice_actor+0x24/0x30
      [<8017d394>] splice_direct_to_actor+0xd8/0x208
      [<8017d51c>] do_splice_direct+0x58/0x7c
      [<8014eaf4>] do_sendfile+0x1dc/0x39c
      [<8014f82c>] SyS_sendfile+0x90/0xf8
      
      Add the eva_kernel_access() check in __copy_from_user() like the one in
      copy_from_user().
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Leonid Yegoshin <leonid.yegoshin@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/10843/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      6f06a2c4