android_kernel_samsung_a7y1.../lib
Christophe Leroy 02cb2a813a lib/scatterlist: Fix mapping iterator when sg->offset is greater than PAGE_SIZE
commit aeb87246537a83c2aff482f3f34a2e0991e02cbc upstream.

All mapping iterator logic is based on the assumption that sg->offset
is always lower than PAGE_SIZE.

But there are situations where sg->offset is such that the SG item
is on the second page. In that case sg_copy_to_buffer() fails
properly copying the data into the buffer. One of the reason is
that the data will be outside the kmapped area used to access that
data.

This patch fixes the issue by adjusting the mapping iterator
offset and pgoffset fields such that offset is always lower than
PAGE_SIZE.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Fixes: 4225fc8555a9 ("lib/scatterlist: use page iterator in the mapping iterator")
Cc: stable@vger.kernel.org
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-06 20:04:15 +02:00
..
842 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fonts A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lz4 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lzo A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mpi lib/mpi: Fix karactx leak in mpi_powm 2020-04-06 19:21:06 +02:00
raid6 ARM: 8833/1: Ensure that NEON code always compiles with Clang 2020-04-06 14:51:24 +02:00
reed_solomon rslib: Fix handling of of caller provided syndrome 2020-04-06 19:55:29 +02:00
xz A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
zlib_deflate A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
zlib_inflate A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
zstd A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
argv_split.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
asn1_decoder.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
assoc_array.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
atomic64_test.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
atomic64.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
audit.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bcd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bch.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bitmap.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bitrev.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bsearch.c kprobes: Prohibit probing on bsearch() 2020-04-06 14:51:19 +02:00
btree.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bug.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
build_OID_registry A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bust_spinlocks.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
check_signature.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
checksum.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
clz_ctz.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
clz_tab.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cmdline.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
compat_audit.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cordic.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpu_rmap.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpu-notifier-error-inject.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpumask.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
crc-ccitt.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
crc-itu-t.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
crc-t10dif.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
crc7.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
crc8.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
crc16.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
crc32.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
crc32defs.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ctype.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
debug_info.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
debug_locks.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
debugobjects.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dec_and_lock.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
decompress_bunzip2.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
decompress_inflate.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
decompress_unlz4.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
decompress_unlzma.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
decompress_unlzo.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
decompress_unxz.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
decompress.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
devres.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
digsig.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
div64.c lib/div64.c: off by one in shift 2020-04-06 15:20:42 +02:00
dma-debug.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dump_stack.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dynamic_debug.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dynamic_queue_limits.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
earlycpio.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
extable.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fault-inject.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fdt_empty_tree.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fdt_ro.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fdt_rw.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fdt_strerror.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fdt_sw.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fdt_wip.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fdt.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
find_bit.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
flex_array.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
flex_proportions.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
gcd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
gen_crc32table.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
genalloc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
glob.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
halfmd4.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hexdump.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hweight.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
idr.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
inflate.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
int_sqrt.c lib/int_sqrt: optimize initial value compute 2020-04-06 13:43:46 +02:00
interval_tree_test.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
interval_tree.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
iomap_copy.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
iomap.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
iommu-common.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
iommu-helper.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ioremap.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
iov_iter.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
irq_regs.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
is_single_threaded.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
jedec_ddr_data.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kasprintf.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig.debug A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig.kasan A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig.kgdb A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig.kmemcheck A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kfifo.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
klist.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kobject_uevent.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kobject.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kstrtox.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kstrtox.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lcm.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
libcrc32c.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
list_debug.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
list_sort.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
llist.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-hardirq.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-mutex.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-rlock-hardirq.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-rlock-softirq.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-rlock.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-rsem.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-softirq.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-spin-hardirq.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-spin-softirq.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-spin.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-wlock-hardirq.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-wlock-softirq.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-wlock.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-wsem.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lockref.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lru_cache.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
md5.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
memory-notifier-error-inject.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
memweight.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
net_utils.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nlattr.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nmi_backtrace.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
notifier-error-inject.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
notifier-error-inject.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
of-reconfig-notifier-error-inject.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
oid_registry.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
once.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
parser.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pci_iomap.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
percpu_counter.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
percpu_ida.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
percpu_test.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
percpu-refcount.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
plist.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pm-notifier-error-inject.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
proportions.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
radix-tree.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
random32.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ratelimit.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rational.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rbtree_test.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rbtree.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
reciprocal_div.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rhashtable.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
scatterlist.c lib/scatterlist: Fix mapping iterator when sg->offset is greater than PAGE_SIZE 2020-04-06 20:04:15 +02:00
seq_buf.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sg_split.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sha1.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
show_mem.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
smp_processor_id.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sort.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
stackdepot.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
stmp_device.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
string_helpers.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
string.c lib/string.c: implement a basic bcmp 2020-04-06 15:07:18 +02:00
strncpy_from_user.c mm/uaccess: Use 'unsigned long' to placate UBSAN warnings on older GCC versions 2020-04-06 18:18:29 +02:00
strnlen_user.c mm/uaccess: Use 'unsigned long' to placate UBSAN warnings on older GCC versions 2020-04-06 18:18:29 +02:00
swiotlb.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
syscall.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test_bpf.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test_firmware.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test_kasan.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test_module.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test_printf.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test_rhashtable.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test_static_key_base.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test_static_keys.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test_user_copy.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test-hexdump.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test-kstrtox.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test-string_helpers.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
textsearch.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
timerqueue.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ts_bm.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ts_fsm.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ts_kmp.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ucs2_string.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
usercopy.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
uuid.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
vsprintf.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xxhash.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30