android_kernel_sony_sdm845/drivers
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nathan Chancellor f13d870fce s390/netiucv: Fix return type of netiucv_tx()
[ Upstream commit 88d86d18d7cf7e9137c95f9d212bb9fff8a1b4be ]

With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG),
indirect call targets are validated against the expected function
pointer prototype to make sure the call target is valid to help mitigate
ROP attacks. If they are not identical, there is a failure at run time,
which manifests as either a kernel panic or thread getting killed. A
proposed warning in clang aims to catch these at compile time, which
reveals:

  drivers/s390/net/netiucv.c:1854:21: error: incompatible function pointer types initializing 'netdev_tx_t (*)(struct sk_buff *, struct net_device *)' (aka 'enum netdev_tx (*)(struct sk_buff *, struct net_device *)') with an expression of type 'int (struct sk_buff *, struct net_device *)' [-Werror,-Wincompatible-function-pointer-types-strict]
          .ndo_start_xmit         = netiucv_tx,
                                    ^~~~~~~~~~

->ndo_start_xmit() in 'struct net_device_ops' expects a return type of
'netdev_tx_t', not 'int'. Adjust the return type of netiucv_tx() to
match the prototype's to resolve the warning and potential CFI failure,
should s390 select ARCH_SUPPORTS_CFI_CLANG in the future.

Additionally, while in the area, remove a comment block that is no
longer relevant.

Link: https://github.com/ClangBuiltLinux/linux/issues/1750
Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-07 12:07:32 +01:00
..
accessibility
acpi ACPICA: Fix error code path in acpi_ds_call_control_method() 2023-01-07 12:07:31 +01:00
amba ARM: 9120/1: Revert "amba: make use of -1 IRQs warn" 2021-11-12 13:18:01 +01:00
android binder: use wake_up_pollfree() 2021-12-14 10:04:48 +01:00
ata ata: pata_legacy: fix pdc20230_set_piomode() 2022-11-10 15:46:05 +01:00
atm atm: idt77252: fix use-after-free bugs caused by tst_timer 2022-08-25 11:09:29 +02:00
auxdisplay auxdisplay: img-ascii-lcd: Fix lock-up when displaying empty string 2021-11-26 11:48:38 +01:00
base driver core: Don't probe devices after bus_type.match() probe deferral 2022-09-15 12:39:46 +02:00
bcma bcma: Fix memory leak for internally-handled cores 2021-09-22 11:43:02 +02:00
block loop: Check for overflow while configuring loop 2022-09-05 10:23:56 +02:00
bluetooth Bluetooth: hci_bcsp: don't call kfree_skb() under spin_lock_irqsave() 2023-01-07 12:07:22 +01:00
bus bus: sunxi-rsb: Support atomic transfers 2022-12-08 11:15:39 +01:00
cdrom cdrom: gdrom: initialize global variable at init time 2021-05-26 11:29:07 +02:00
char ipmi: fix memleak when unload ipmi driver 2023-01-07 12:07:31 +01:00
clk clk: rockchip: Fix memory leak in rockchip_clk_register_pll() 2023-01-07 12:07:17 +01:00
clocksource clocksource/drivers/sp804: Avoid error on multiple instances 2022-06-14 16:52:40 +02:00
connector
cpufreq cpufreq: pmac32-cpufreq: Fix refcount leak bug 2022-07-21 20:40:31 +02:00
cpuidle cpuidle: dt: Return the correct numbers of parsed idle states 2023-01-07 12:07:13 +01:00
crypto crypto: img-hash - Fix variable dereferenced before check 'hdev->req' 2023-01-07 12:07:24 +01:00
dax
dca
devfreq
dio drivers: dio: fix possible memory leak in dio_init() 2023-01-07 12:07:24 +01:00
dma dmaengine: at_hdmac: Check return code of dma_async_device_register 2022-11-25 17:35:38 +01:00
dma-buf
edac EDAC: Fix calculation of returned address and next offset in edac_align_ptr() 2022-02-23 11:56:41 +01:00
eisa
extcon extcon: max8997: Add missing modalias string 2021-07-20 16:21:05 +02:00
firewire firewire: core: extend card->lock in fw_core_handle_bus_reset 2022-05-12 12:14:57 +02:00
firmware firmware: google: Test spinlock on panic path to avoid lockups 2022-10-26 13:15:43 +02:00
fmc
fpga
gpio gpio: amd8111: Fix PCI device reference count leak 2022-12-14 11:24:33 +01:00
gpu drm/amdgpu: Fix PCI device refcount leak in amdgpu_atrm_get_bios() 2023-01-07 12:07:18 +01:00
hid HID: hid-sensor-custom: set fixed size for custom attributes 2023-01-07 12:07:17 +01:00
hsi HSI: omap_ssi_core: Fix error handling in ssi_init() 2023-01-07 12:07:27 +01:00
hv Drivers: hv: Never allocate anything besides framebuffer from framebuffer memory region 2022-09-28 10:55:47 +02:00
hwmon hwmon: (coretemp) fix pci device refcount leak in nv1a_ram_new() 2022-12-08 11:15:41 +01:00
hwspinlock
hwtracing coresight: Fix TRCCONFIGR.QE sysfs interface 2022-04-20 09:06:28 +02:00
i2c i2c: ismt: Fix an out-of-bounds bug in ismt_access() 2023-01-07 12:07:26 +01:00
ide
idle
iio iio: health: afe4404: Fix oob read in afe4404_[read|write]_raw 2022-12-08 11:15:40 +01:00
infiniband IB/IPoIB: Fix queue count inconsistency for PKEY child interfaces 2023-01-07 12:07:24 +01:00
input Input: elants_i2c - properly handle the reset GPIO when power is off 2023-01-07 12:07:17 +01:00
iommu iommu/fsl_pamu: Fix resource leak in fsl_pamu_probe() 2023-01-07 12:07:28 +01:00
ipack ipack: ipoctal: fix module reference leak 2021-10-06 10:23:42 +02:00
irqchip irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe() 2023-01-07 12:07:14 +01:00
isdn mISDN: hfcmulti: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave() 2023-01-07 12:07:29 +01:00
leds leds: ktd2692: Fix an error handling path 2021-07-20 16:21:05 +02:00
lguest
lightnvm lightnvm: disable the subsystem 2022-05-12 12:14:53 +02:00
macintosh macintosh/macio-adb: check the return value of ioremap() 2023-01-07 12:07:28 +01:00
mailbox
mcb mcb: mcb-parse: fix error handing in chameleon_parse_gdd() 2023-01-07 12:07:26 +01:00
md dm ioctl: fix misbehavior if list_versions races with module loading 2022-11-25 17:35:41 +01:00
media media: coda: Add check for kmalloc 2023-01-07 12:07:20 +01:00
memory memory: of: Fix refcount leak bug in of_get_ddr_timings() 2022-10-26 13:15:40 +02:00
memstick memstick: jmb38x_ms: use appropriate free function in jmb38x_ms_alloc_host() 2021-11-26 11:48:34 +01:00
message
mfd mfd: sm501: Add check for platform_driver_register() 2022-10-26 13:15:44 +02:00
misc cxl: fix possible null-ptr-deref in cxl_pci_init_afu|adapter() 2023-01-07 12:07:25 +01:00
mmc mmc: mmci: fix return value check of mmc_add_host() 2023-01-07 12:07:20 +01:00
mtd mtd: maps: pxa2xx-flash: fix memory leak in probe 2023-01-07 12:07:17 +01:00
net igb: Do not free q_vector unless new one was allocated 2023-01-07 12:07:32 +01:00
nfc nfc: pn533: Clear nfc_target before being used 2023-01-07 12:07:29 +01:00
ntb
nubus
nvdimm
nvme nvme: Fix IOC_PR_CLEAR and IOC_PR_RELEASE ioctls for nvme devices 2022-10-26 13:15:33 +02:00
nvmem nvmem: Fix shift-out-of-bound (UBSAN) with byte size cells 2021-10-27 09:33:58 +02:00
of fdt: Update CRC check for rng-seed 2022-07-02 16:17:16 +02:00
oprofile
parisc parisc: Export iosapic_serial_irq() symbol for serial port driver 2022-11-10 15:46:07 +01:00
parport parport_pc: Avoid FIFO port location truncation 2022-11-25 17:35:39 +01:00
pci PCI: Sanitise firmware BAR assignments behind a PCI-PCI bridge 2022-10-26 13:15:37 +02:00
pcmcia pcmcia: db1xxx_ss: restrict to MIPS_DB1XXX boards 2022-06-14 16:52:36 +02:00
perf
phy phy: samsung: exynos5250-sata: fix missing device put in probe error paths 2022-05-12 12:14:54 +02:00
pinctrl pinctrl: pinconf-generic: add missing of_node_put() 2023-01-07 12:07:18 +01:00
platform platform/x86: asus-wmi: add missing pci_dev_put() in asus_wmi_set_xusb2pr() 2022-12-08 11:15:40 +01:00
pnp PNP: fix name memory leak in pnp_alloc_dev() 2023-01-07 12:07:14 +01:00
power power: supply: fix residue sysfs file in error handle route of __power_supply_register() 2023-01-07 12:07:27 +01:00
powercap powercap: intel_rapl: fix UBSAN shift-out-of-bounds issue 2022-10-26 13:15:45 +02:00
pps
ps3
ptp ptp: replace snprintf with sysfs_emit 2022-04-20 09:06:42 +02:00
pwm pwm: lp3943: Fix duty calculation in case period was clamped 2022-06-14 16:52:37 +02:00
rapidio rapidio: devices: fix missing put_device in mport_cdev_open 2023-01-07 12:07:15 +01:00
ras
regulator regulator: core: fix module refcount leak in set_supply() 2023-01-07 12:07:19 +01:00
remoteproc remoteproc: qcom_wcnss: Add missing of_node_put() in wcnss_alloc_memory_region 2022-04-20 09:06:36 +02:00
reset reset: ti-syscon: fix to_ti_syscon_reset_data macro 2021-07-28 09:14:24 +02:00
rpmsg rpmsg: qcom_smd: Fix irq_of_parse_and_map() return value 2022-06-14 16:52:37 +02:00
rtc rtc: st-lpc: Add missing clk_disable_unprepare in st_rtc_probe() 2023-01-07 12:07:29 +01:00
s390 s390/netiucv: Fix return type of netiucv_tx() 2023-01-07 12:07:32 +01:00
sbus
scsi scsi: snic: Fix possible UAF in snic_tgt_create() 2023-01-07 12:07:23 +01:00
sfi
sh maple: fix wrong return value of maple_bus_init(). 2021-11-26 11:48:41 +01:00
sn
soc drivers: soc: ti: knav_qmss_queue: Mark knav_acc_firmwares as static 2023-01-07 12:07:11 +01:00
spi spi/omap100k:Fix PM disable depth imbalance in omap1_spi100k_probe 2022-10-26 13:15:39 +02:00
spmi
ssb ssb: sdio: Don't overwrite const buffer if block_write fails 2021-07-20 16:20:57 +02:00
staging staging: rtl8192e: Fix potential use-after-free in rtllib_rx_Monitor() 2023-01-07 12:07:26 +01:00
target scsi: target: iscsi: Make sure the np under each tpg is unique 2022-02-16 12:43:53 +01:00
tc
thermal thermal: intel_powerclamp: Use first online CPU as control_cpu 2022-10-26 13:15:48 +02:00
thunderbolt
tty serial: sunsab: Fix error handling in sunsab_init() 2023-01-07 12:07:25 +01:00
uio uio: uio_dmem_genirq: Fix deadlock between irq config and handling 2023-01-07 12:07:24 +01:00
usb usb: storage: Add check for kcalloc 2023-01-07 12:07:26 +01:00
uwb
vfio vfio: platform: Do not pass return buffer to ACPI _RST method 2023-01-07 12:07:24 +01:00
vhost vringh: Fix loop descriptors check in the indirect cases 2022-06-14 16:52:41 +02:00
video fbdev: uvesafb: Fixes an error handling path in uvesafb_probe() 2023-01-07 12:07:27 +01:00
virt
virtio virtio_mmio: Restore guest page size on resume 2022-07-21 20:40:31 +02:00
vlynq
vme vme: Fix error not catched in fake_init() 2023-01-07 12:07:26 +01:00
w1 w1: w1_therm: fixes w1_seq for ds28ea00 sensors 2022-04-20 09:06:43 +02:00
watchdog watchdog: f71808e_wdt: fix inaccurate report in WDIOC_GETTIMEOUT 2021-11-26 11:48:38 +01:00
xen xen/platform-pci: add missing free_irq() in error path 2022-12-08 11:15:40 +01:00
zorro
Kconfig
Makefile