kernel-hacking-2024-linux-s.../drivers
Andrey Ryabinin 393f203f5f x86_64: kasan: add interceptors for memset/memmove/memcpy functions
Recently instrumentation of builtin functions calls was removed from GCC
5.0.  To check the memory accessed by such functions, userspace asan
always uses interceptors for them.

So now we should do this as well.  This patch declares
memset/memmove/memcpy as weak symbols.  In mm/kasan/kasan.c we have our
own implementation of those functions which checks memory before accessing
it.

Default memset/memmove/memcpy now now always have aliases with '__'
prefix.  For files that built without kasan instrumentation (e.g.
mm/slub.c) original mem* replaced (via #define) with prefixed variants,
cause we don't want to check memory accesses there.

Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Konstantin Serebryany <kcc@google.com>
Cc: Dmitry Chernenkov <dmitryc@google.com>
Signed-off-by: Andrey Konovalov <adech.fo@gmail.com>
Cc: Yuri Gribov <tetra2005@gmail.com>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-02-13 21:21:41 -08:00
..
accessibility
acpi kernel.h: remove ancient __FUNCTION__ hack 2015-02-12 18:54:13 -08:00
amba ARM: 8256/1: driver coamba: add device binding path 'driver_override' 2015-02-10 10:23:15 +00:00
android
ata Merge branch 'for-3.20/drivers' of git://git.kernel.dk/linux-block 2015-02-12 14:30:53 -08:00
atm
auxdisplay
base drivers/base: use %*pb[l] to print bitmaps including cpumasks and nodemasks 2015-02-13 21:21:38 -08:00
bcma
block Merge branch 'akpm' (patches from Andrew) 2015-02-12 18:54:28 -08:00
bluetooth
bus arm: use %*pb[l] to print bitmaps including cpumasks and nodemasks 2015-02-13 21:21:37 -08:00
cdrom
char Merge branch 'for-3.20/bdi' of git://git.kernel.dk/linux-block 2015-02-12 13:50:21 -08:00
clk clk: convert clock name allocations to kstrdup_const 2015-02-13 21:21:36 -08:00
clocksource Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2015-02-12 08:51:56 -08:00
connector
coresight
cpufreq ACPI and power management updates for v3.20-rc1 2015-02-10 15:09:41 -08:00
cpuidle arm64 updates for 3.20: 2015-02-11 18:03:54 -08:00
crypto
dca
devfreq ACPI and power management updates for v3.20-rc1 2015-02-10 15:09:41 -08:00
dio
dma resources: Move struct resource_list_entry from ACPI into resource core 2015-02-05 15:09:25 +01:00
dma-buf
edac
eisa
extcon
firewire
firmware x86_64: kasan: add interceptors for memset/memmove/memcpy functions 2015-02-13 21:21:41 -08:00
fmc
gpio Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2015-02-12 08:51:56 -08:00
gpu sound updates for 3.20-rc1 2015-02-11 08:51:59 -08:00
hid Merge branches 'for-3.19/upstream-fixes', 'for-3.20/apple', 'for-3.20/betop', 'for-3.20/lenovo', 'for-3.20/logitech', 'for-3.20/rmi', 'for-3.20/upstream' and 'for-3.20/wacom' into for-linus 2015-02-09 11:17:45 +01:00
hsi
hv
hwmon hwmon: (tmp102) add hibernation callbacks 2015-02-03 12:17:12 -08:00
hwspinlock
i2c
ide
idle
iio Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2015-02-11 09:32:08 -08:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2015-02-10 20:01:30 -08:00
input input: use %*pb[l] to print bitmaps including cpumasks and nodemasks 2015-02-13 21:21:38 -08:00
iommu IOMMU Updates for Linux v3.20 2015-02-12 09:16:56 -08:00
ipack
irqchip Fairly small update, but there are some interesting new features. 2015-02-13 09:55:09 -08:00
isdn drivers: isdn: isdnloop: isdnloop.c: Remove parenthesis around return values, as specified in CodingStyle. 2015-02-05 15:40:23 -08:00
leds
lguest
macintosh
mailbox Merge branch 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration 2015-02-11 12:56:40 -08:00
mcb
md - Most significant change this cycle is request-based DM now supports 2015-02-12 16:36:31 -08:00
media mm: gup: use get_user_pages_unlocked 2015-02-11 17:06:05 -08:00
memory
memstick
message
mfd
misc powerpc updates for 3.20 2015-02-11 18:15:38 -08:00
mmc mmc: sdhci-s3c: solve problem with sleeping in atomic context 2015-02-04 13:39:14 +01:00
mtd
net MODULE_DEVICE_TABLE: fix some callsites 2015-02-13 21:21:40 -08:00
nfc NFC: nci: Move NFCEE discovery logic 2015-02-04 09:15:18 +01:00
ntb
nubus
of DeviceTree changes for 3.20: 2015-02-12 08:58:43 -08:00
oprofile
parisc
parport
pci ACPI and power management updates for v3.20-rc1 2015-02-10 15:09:41 -08:00
pcmcia
phy SCSI misc on 20150209 2015-02-11 10:28:45 -08:00
pinctrl This is the bulk of pin control changes for the v3.20 cycle: 2015-02-11 11:23:13 -08:00
platform
pnp ACPI: Return translation offset when parsing ACPI address space resources 2015-02-03 22:27:21 +01:00
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator Merge remote-tracking branches 'regulator/topic/rk808', 'regulator/topic/rpm', 'regulator/topic/rt5033' and 'regulator/topic/tps65023' into regulator-next 2015-02-08 11:16:30 +08:00
remoteproc
reset
rpmsg
rtc Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-02-09 17:53:53 -08:00
s390 Fairly small update, but there are some interesting new features. 2015-02-13 09:55:09 -08:00
sbus
scsi MODULE_DEVICE_TABLE: fix some callsites 2015-02-13 21:21:40 -08:00
sfi
sh
sn
soc
spi Merge remote-tracking branch 'spi/topic/xilinx' into spi-next 2015-02-08 11:17:01 +08:00
spmi
ssb
staging Merge branch 'for-3.20/bdi' of git://git.kernel.dk/linux-block 2015-02-12 13:50:21 -08:00
target
tc
thermal
thunderbolt
tty Merge branch 'akpm' (patches from Andrew) 2015-02-11 18:23:28 -08:00
uio
usb usb: use %*pb[l] to print bitmaps including cpumasks and nodemasks 2015-02-13 21:21:38 -08:00
uwb usb: use %*pb[l] to print bitmaps including cpumasks and nodemasks 2015-02-13 21:21:38 -08:00
vfio
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-02-05 14:33:28 -08:00
video mm: gup: use get_user_pages_unlocked 2015-02-11 17:06:05 -08:00
virt
virtio
vlynq
vme
w1
watchdog
xen SCSI misc on 20150209 2015-02-11 10:28:45 -08:00
zorro
Kconfig
Makefile