android_kernel_motorola_sm6375/drivers
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Quentin Perret f0c4a768cf UPSTREAM: ehci-hcd: Move include to keep CRC stable
The CRC calculation done by genksyms is triggered when the parser hits
EXPORT_SYMBOL*() macros. At this point, genksyms recursively expands the
types of the function parameters, and uses that as the input for the CRC
calculation. In the case of forward-declared structs, the type expands
to 'UNKNOWN'. Following this, it appears that the result of the
expansion of each type is cached somewhere, and seems to be re-used
when/if the same type is seen again for another exported symbol in the
same C file.

Unfortunately, this can cause CRC 'stability' issues when a struct
definition becomes visible in the middle of a C file. For example, let's
assume code with the following pattern:

    struct foo;

    int bar(struct foo *arg)
    {
	/* Do work ... */
    }
    EXPORT_SYMBOL_GPL(bar);

    /* This contains struct foo's definition */
    #include "foo.h"

    int baz(struct foo *arg)
    {
	/* Do more work ... */
    }
    EXPORT_SYMBOL_GPL(baz);

Here, baz's CRC will be computed using the expansion of struct foo that
was cached after bar's CRC calculation ('UNKOWN' here). But if
EXPORT_SYMBOL_GPL(bar) is removed from the file (because of e.g. symbol
trimming using CONFIG_TRIM_UNUSED_KSYMS), struct foo will be expanded
late, during baz's CRC calculation, which now has visibility over the
full struct definition, hence resulting in a different CRC for baz.

The proper fix for this certainly is in genksyms, but that will take me
some time to get right. In the meantime, we have seen one occurrence of
this in the ehci-hcd code which hits this problem because of the way it
includes C files halfway through the code together with an unlucky mix
of symbol trimming.

In order to workaround this, move the include done in ehci-hub.c early
in ehci-hcd.c, hence making sure the struct definitions are visible to
the entire file. This improves CRC stability of the ehci-hcd exports
even when symbol trimming is enabled.

Bug: 167230325
Acked-by: Alan Stern <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Quentin Perret <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
(cherry picked from commit 29231826f3bd65500118c473fccf31c0cf14dbc0)
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Change-Id: Ie56a4deee980652e5285a0744a8bcc2c9e60db73
2020-10-15 17:21:03 +02:00
..
accessibility
acpi This is the 5.4.59 stable release 2020-08-19 08:40:57 +02:00
amba UPSTREAM: amba: Retry adding deferred devices at late_initcall 2020-06-27 01:02:29 +00:00
android ANDROID: sysrq: add vendor hook for sysrq crash information 2020-10-13 14:46:48 +09:00
ata ata/libata: Fix usage of page address by page_address in ata_scsi_mode_select_xlat function 2020-06-30 15:37:03 -04:00
atm atm: fix atm_dev refcnt leaks in atmtcp_remove_persistent 2020-08-11 15:33:38 +02:00
auxdisplay
base ANDROID: sched: add cpumask parameter to cpu capacity vendor hook 2020-09-28 16:04:11 +00:00
bcma
block This is the 5.4.59 stable release 2020-08-19 08:40:57 +02:00
bluetooth This is the 5.4.59 stable release 2020-08-19 08:40:57 +02:00
bus bus: ti-sysc: Add missing quirk flags for usb_host_hs 2020-08-19 08:16:00 +02:00
cdrom
char This is the 5.4.59 stable release 2020-08-19 08:40:57 +02:00
clk FROMLIST: clk: sunxi-ng: add support for the Allwinner A100 CCU 2020-08-27 17:11:05 +08:00
clocksource ANDROID: GKI: enable CONFIG_MTK_TIMER 2020-08-28 22:28:50 +00:00
connector
counter counter: 104-quad-8: Add lock guards - generic interface 2020-05-02 08:48:44 +02:00
cpufreq This is the 5.4.61 stable release 2020-08-26 11:11:38 +02:00
cpuidle ANDROID: adding __nocfi to cpuidle_enter_state 2020-10-08 12:58:32 +00:00
crypto Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
dax device-dax: don't leak kernel memory to user space after unloading kmem 2020-05-27 17:46:48 +02:00
dca
devfreq PM / devfreq: Add missing locking while setting suspend_freq 2020-05-10 10:31:34 +02:00
dio
dma This is the 5.4.54 stable release 2020-07-29 13:27:01 +02:00
dma-buf This is the 5.4.54 stable release 2020-07-29 13:27:01 +02:00
edac EDAC: Fix reference count leaks 2020-08-19 08:15:54 +02:00
eisa
extcon This is the 5.4.49 stable release 2020-06-25 07:49:21 +02:00
firewire
firmware This is the 5.4.61 stable release 2020-08-26 11:11:38 +02:00
fpga fpga: dfl: fix bug in port reset handshake 2020-07-29 10:18:31 +02:00
fsi
gnss This is the 5.4.48 stable release 2020-06-22 11:43:59 +02:00
gpio This is the 5.4.54 stable release 2020-07-29 13:27:01 +02:00
gpu This is the 5.4.61 stable release 2020-08-26 11:11:38 +02:00
greybus
hid This is the 5.4.59 stable release 2020-08-19 08:40:57 +02:00
hsi
hv Drivers: hv: vmbus: Ignore CHANNELMSG_TL_CONNECT_RESULT(23) 2020-08-11 15:33:38 +02:00
hwmon This is the 5.4.54 stable release 2020-07-29 13:27:01 +02:00
hwspinlock
hwtracing coresight: tmc: Fix TMC mode read in tmc_read_unprepare_etb() 2020-08-19 08:16:14 +02:00
i2c Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
i3c
ide
idle BACKPORT: FROMLIST: cpuidle: change enter_s2idle() prototype 2020-07-29 14:37:49 +00:00
iio Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
infiniband RDMA/bnxt_re: Do not add user qps to flushlist 2020-08-26 10:41:05 +02:00
input Revert "ANDROID: vendor_hooks: Add vendor hooks for key combination" 2020-09-11 11:47:54 +09:00
interconnect
iommu Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
ipack ipack: tpci200: fix error return code in tpci200_register() 2020-05-27 17:46:47 +02:00
irqchip Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
isdn
leds leds: core: Flush scheduled work for system suspend 2020-08-19 08:16:11 +02:00
lightnvm
macintosh macintosh/via-macii: Access autopoll_devs when inside lock 2020-08-19 08:16:15 +02:00
mailbox mailbox: zynqmp-ipi: Fix NULL vs IS_ERR() check in zynqmp_ipi_mbox_probe() 2020-06-24 17:50:36 +02:00
mcb
md This is the 5.4.61 stable release 2020-08-26 11:11:38 +02:00
media This is the 5.4.61 stable release 2020-08-26 11:11:38 +02:00
memory
memstick
message scsi: mptscsih: Fix read sense data size 2020-07-16 08:16:36 +02:00
mfd Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
misc ANDROID: lkdtm/usercopy: Use __va_function to find proper vm_mmap address 2020-09-15 13:01:00 -07:00
mmc Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
mtd Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
mux
net This is the 5.4.61 stable release 2020-08-26 11:11:38 +02:00
nfc nfc: s3fwrn5: add missing release on skb in s3fwrn5_recv_frame 2020-08-05 09:59:50 +02:00
ntb NTB: perf: Fix race condition when run with ntb_test 2020-06-24 17:50:41 +02:00
nubus
nvdimm Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
nvme nvme-multipath: do not fall back to __nvme_find_path() for non-optimized paths 2020-08-19 08:15:59 +02:00
nvmem This is the 5.4.46 stable release 2020-06-11 09:14:42 +02:00
of UPSTREAM: of: property: Add device link support for pinctrl-0 through pinctrl-8 2020-08-06 19:53:54 -07:00
opp opp: Enable resources again if they were disabled earlier 2020-08-26 10:40:53 +02:00
oprofile
parisc parisc: mask out enable and reserved bits from sba imask 2020-08-19 08:16:26 +02:00
parport
pci Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
pcmcia
perf drivers/perf: Prevent forced unbinding of PMU drivers 2020-07-29 10:18:40 +02:00
phy This is the 5.4.59 stable release 2020-08-19 08:40:57 +02:00
pinctrl FROMLIST: pinctrl: sunxi: add support for the Allwinner A100 pin controller 2020-08-27 17:09:29 +08:00
platform Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
pnp
power FROMLIST: power: supply: core: property to control reverse charge 2020-09-01 17:57:03 +00:00
powercap
pps
ps3
ptp
pwm Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
rapidio rapidio: fix an error in get_user_pages_fast() error handling 2020-05-27 17:46:48 +02:00
ras
regulator This is the 5.4.59 stable release 2020-08-19 08:40:57 +02:00
remoteproc Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
reset
rpmsg FROMLIST: rpmsg: Guard against null endpoint ops in destroy 2020-08-07 12:03:00 +00:00
rtc This is the 5.4.61 stable release 2020-08-26 11:11:38 +02:00
s390 scsi: zfcp: Fix use-after-free in request timeout handlers 2020-08-26 10:40:52 +02:00
sbus
scsi UPSTREAM: scsi: ufs: ufs-mediatek: Modify the minimum RX/TX lane count to 2 2020-08-28 20:54:00 +00:00
sfi
sh
siox
slimbus This is the 5.4.53 stable release 2020-07-23 12:36:54 +02:00
soc This is the 5.4.59 stable release 2020-08-19 08:40:57 +02:00
soundwire soundwire: intel: fix memory leak with devm_kasprintf 2020-07-22 09:33:00 +02:00
spi UPSTREAM: spi: add power control when set_cs 2020-09-07 10:13:03 +02:00
spmi
ssb
staging ANDROID: ion: export some ion symbols 2020-08-27 21:06:34 +00:00
target scsi: target: tcmu: Fix crash in tcmu_flush_dcache_range on ARM 2020-08-26 10:40:54 +02:00
tc
tee
thermal This is the 5.4.59 stable release 2020-08-19 08:40:57 +02:00
thunderbolt
tty ANDROID: sysrq: add vendor hook for sysrq crash information 2020-10-13 14:46:48 +09:00
uio uio_pdrv_genirq: fix use without device tree and no interrupt 2020-07-22 09:33:13 +02:00
usb UPSTREAM: ehci-hcd: Move include to keep CRC stable 2020-10-15 17:21:03 +02:00
vfio This is the 5.4.61 stable release 2020-08-26 11:11:38 +02:00
vhost This is the 5.4.56 stable release 2020-08-05 11:19:16 +02:00
video This is the 5.4.61 stable release 2020-08-26 11:11:38 +02:00
virt virt: vbox: Fix guest capabilities mask check 2020-07-22 09:33:11 +02:00
virtio This is the 5.4.61 stable release 2020-08-26 11:11:38 +02:00
visorbus
vlynq
vme
w1 w1: omap-hdq: cleanup to add missing newline for some dev_dbg 2020-06-22 09:31:26 +02:00
watchdog Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
xen xen: don't reschedule in preemption off sections 2020-08-26 10:41:07 +02:00
zorro
Kconfig
Makefile