Fork of alistair23 Linux kernel for reMarkable from https://github.com/alistair23/linux
Go to file
Jeremy Linton 2bef9aed6f usb: usbfs: correct kernel->user page attribute mismatch
On some architectures (e.g. arm64) requests for
IO coherent memory may use non-cachable attributes if
the relevant device isn't cache coherent. If these
pages are then remapped into userspace as cacheable,
they may not be coherent with the non-cacheable mappings.

In particular this happens with libusb, when it attempts
to create zero-copy buffers for use by rtl-sdr
(https://github.com/osmocom/rtl-sdr/). On low end arm
devices with non-coherent USB ports, the application will
be unexpectedly killed, while continuing to work fine on
arm machines with coherent USB controllers.

This bug has been discovered/reported a few times over
the last few years. In the case of rtl-sdr a compile time
option to enable/disable zero copy was implemented to
work around it.

Rather than relaying on application specific workarounds,
dma_mmap_coherent() can be used instead of remap_pfn_range().
The page cache/etc attributes will then be correctly set in
userspace to match the kernel mapping.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200504201348.1183246-1-jeremy.linton@arm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-05 13:06:46 +02:00
arch s390 fixes for 5.7-rc3 2020-04-26 10:58:49 -07:00
block blk-iocost: Fix error on iocost_ioc_vrate_adj 2020-04-21 09:49:36 -06:00
certs .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-04-01 14:47:40 -07:00
Documentation USB fixes for 5.7-rc3 2020-04-26 11:22:01 -07:00
drivers usb: usbfs: correct kernel->user page attribute mismatch 2020-05-05 13:06:46 +02:00
fs Five cifs/smb3 fixes, 3 for DFS, one for stable 2020-04-26 11:44:17 -07:00
include Staging/IIO driver fixes for 5.7-rc3 2020-04-26 11:12:30 -07:00
init Kbuild updates for v5.7 (2nd) 2020-04-11 09:46:12 -07:00
ipc ipc/util.c: sysvipc_find_ipc() should increase position index 2020-04-10 15:36:22 -07:00
kernel Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2020-04-25 12:25:32 -07:00
lib lib/mpi: Fix building for powerpc with clang 2020-04-24 13:14:59 +10:00
LICENSES
mm mm: check that mm is still valid in madvise() 2020-04-24 13:28:03 -07:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-04-24 19:17:30 -07:00
samples vmalloc: fix remap_vmalloc_range() bounds checks 2020-04-21 11:11:56 -07:00
scripts Kbuild fixes for v5.7 2020-04-24 10:39:32 -07:00
security selinux/stable-5.7 PR 20200416 2020-04-16 10:45:47 -07:00
sound sound fixes for 5.7-rc3 2020-04-24 10:27:43 -07:00
tools Two fixes: fix an off-by-one bug, and fix 32-bit builds on 64-bit systems. 2020-04-25 11:52:02 -07:00
usr kbuild: fix comment about missing include guard detection 2020-04-11 12:09:48 +09:00
virt KVM: Pass kvm_init()'s opaque param to additional arch funcs 2020-03-31 10:48:03 -04:00
.clang-format clang-format: Update with the latest for_each macro list 2020-04-18 13:49:33 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
.mailmap mailmap: Add Sedat Dilek (replacement for expired email address) 2020-04-11 09:28:34 -07:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: Hand MIPS over to Thomas 2020-02-24 22:43:18 -08:00
Kbuild kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
Kconfig
MAINTAINERS Staging/IIO driver fixes for 5.7-rc3 2020-04-26 11:12:30 -07:00
Makefile Linux 5.7-rc3 2020-04-26 13:51:02 -07:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.