summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2018-04-30drivers/media/platform/sti/delta/delta-ipc.c: fix read buffer overflowAndi Kleen
The single caller passes a string to delta_ipc_open, which copies with a fixed size larger than the string. So it copies some random data after the original string the ro segment. If the string was at the end of a page it may fault. Just copy the string with a normal strcpy after clearing the field. Found by a LTO build (which errors out) because the compiler inlines the functions and can resolve the string sizes and triggers the compile time checks in memcpy. In function `memcpy', inlined from `delta_ipc_open.constprop' at linux/drivers/media/platform/sti/delta/delta-ipc.c:178:0, inlined from `delta_mjpeg_ipc_open' at linux/drivers/media/platform/sti/delta/delta-mjpeg-dec.c:227:0, inlined from `delta_mjpeg_decode' at linux/drivers/media/platform/sti/delta/delta-mjpeg-dec.c:403:0: /home/andi/lsrc/linux/include/linux/string.h:337:0: error: call to `__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter __read_overflow2(); Link: http://lkml.kernel.org/r/20171222001212.1850-1-andi@firstfloor.org Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Hugues FRUCHET <hugues.fruchet@st.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2018-04-30treewide: use PHYS_ADDR_MAX to avoid type casting ULLONG_MAXStefan Agner
With PHYS_ADDR_MAX there is now a type safe variant for all bits set. Make use of it. Patch created using a semantic patch as follows: // <smpl> @@ typedef phys_addr_t; @@ -(phys_addr_t)ULLONG_MAX +PHYS_ADDR_MAX // </smpl> Link: http://lkml.kernel.org/r/20180419214204.19322-1-stefan@agner.ch Signed-off-by: Stefan Agner <stefan@agner.ch> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2018-04-30Merge branch 'akpm-current/current'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'kspp/for-next/kspp'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'ntb/ntb-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'at24/at24/for-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'rtc/rtc-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'coresight/next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'pinctrl-samsung/for-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'pinctrl/for-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'gpio/for-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'rpmsg/for-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'vhost/linux-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'libata/for-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'scsi/for-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'slave-dma/next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'mux/for-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'staging/staging-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'char-misc/char-misc-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'tty/tty-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'phy-next/next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'usb-serial/usb-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'ipmi/for-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'leds/for-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'hsi/for-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'drivers-x86/for-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'rcu/rcu/next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'tip/auto-latest'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'spi/for-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'mailbox/mailbox-for-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'devicetree/for-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'tpmdd/next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'regulator/for-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'battery/for-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'backlight/for-backlight-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'mfd/for-mfd-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'md/for-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'mmc/next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'device-mapper/for-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'input/next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'imx-drm/imx-drm/next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'drm-misc/for-linux-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'drm-intel/for-linux-next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'crypto/master'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'spi-nor/spi-nor/next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'nand/nand/next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'l2-mtd/mtd/next'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'mac80211-next/master'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'bluetooth/master'Stephen Rothwell
2018-04-30Merge remote-tracking branch 'wireless-drivers-next/master'Stephen Rothwell