android_kernel_motorola_sm6225/drivers
Nathan Chancellor 8175003163 net: pasemi: Fix return type of pasemi_mac_start_tx()
[ Upstream commit c8384d4a51e7cb0e6587f3143f29099f202c5de1 ]

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
warning in clang aims to catch these at compile time, which reveals:

  drivers/net/ethernet/pasemi/pasemi_mac.c:1665: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         = pasemi_mac_start_tx,
                                    ^~~~~~~~~~~~~~~~~~~
  1 error generated.

->ndo_start_xmit() in 'struct net_device_ops' expects a return type of
'netdev_tx_t', not 'int'. Adjust the return type of
pasemi_mac_start_tx() to match the prototype's to resolve the warning.
While PowerPC does not currently implement support for kCFI, it could in
the future, which means this warning becomes a fatal CFI failure at run
time.

Link: https://github.com/ClangBuiltLinux/linux/issues/1750
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Link: https://lore.kernel.org/r/20230319-pasemi-incompatible-pointer-types-strict-v1-1-1b9459d8aef0@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-30 12:42:08 +01:00
..
accessibility
acpi ACPICA: ACPICA: check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects 2023-05-30 12:42:08 +01:00
amba
android binder: fix UAF of ref->proc caused by race condition 2022-09-15 12:17:03 +02:00
ata ata: libata: Fix sata_down_spd_limit() when no link speed is reported 2023-02-22 12:47:12 +01:00
atm atm: idt77252: fix kmemleak when rmmod idt77252 2023-04-05 11:15:34 +02:00
auxdisplay
base regmap: cache: Return error in cache sync operations for REGCACHE_NONE 2023-05-30 12:42:08 +01:00
bcma
block drbd: correctly submit flush bio on barrier 2023-05-17 11:13:28 +02:00
bluetooth Revert "Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work" 2023-05-17 11:13:14 +02:00
bus bus: imx-weim: fix branch condition evaluates to a garbage value 2023-04-05 11:15:38 +02:00
cdrom
char ipmi: fix SSIF not responding under certain cond. 2023-05-17 11:13:22 +02:00
clk clk: rockchip: rk3399: allow clk_cifout to force clk_cifout_src to reparent 2023-05-17 11:13:21 +02:00
clocksource clocksource/drivers/sh_cmt: Make sure channel clock supply is enabled 2023-01-18 11:30:06 +01:00
connector
cpufreq cpufreq: amd_freq_sensitivity: Add missing pci_dev_put() 2023-01-18 11:30:06 +01:00
cpuidle cpuidle: dt: Return the correct numbers of parsed idle states 2023-01-18 11:30:04 +01:00
crypto crypto: crypto4xx - Call dma_unmap_page when done 2023-03-11 16:31:38 +01:00
dax
dca
devfreq PM / devfreq: rk3399_dmc: Disable edev on remove() 2022-06-14 16:59:17 +02:00
dio drivers: dio: fix possible memory leak in dio_init() 2023-01-18 11:30:23 +01:00
dma dmaengine: at_xdmac: do not enable all cyclic channels 2023-05-17 11:13:20 +02:00
dma-buf
edac EDAC/skx: Fix overflows on the DRAM row address mapping arrays 2023-05-17 11:13:09 +02:00
eisa
extcon extcon: Modify extcon device to be created after driver data is set 2022-06-14 16:59:37 +02:00
firewire firewire: fix memory leak for payload of request subaction to IEC 61883-1 FCP region 2023-02-22 12:47:11 +01:00
firmware firmware: arm_sdei: Fix sleep from invalid context BUG 2023-05-30 12:42:08 +01:00
fmc
fpga fpga: bridge: fix kernel-doc parameter description 2023-05-17 11:13:15 +02:00
fsi fsi: core: Check error number after calling ida_simple_get 2022-10-26 13:19:33 +02:00
gnss
gpio gpio: davinci: Add irq chip flag to skip set wake 2023-04-20 12:04:38 +02:00
gpu drm/tegra: Avoid potential 32-bit integer overflow 2023-05-30 12:42:08 +01:00
hid HID: wacom: Set a default resolution for older tablets 2023-05-17 11:13:26 +02:00
hsi HSI: omap_ssi_core: Fix error handling in ssi_init() 2023-01-18 11:30:30 +01:00
hv Drivers: hv: vmbus: fix possible memory leak in vmbus_device_register() 2022-12-08 11:18:29 +01:00
hwmon hwmon (it87): Fix voltage scaling for chips with 10.9mV ADCs 2023-04-05 11:15:35 +02:00
hwspinlock
hwtracing coresight-etm4: Fix for() loop drvdata->nr_addr_cmp range bug 2023-04-20 12:04:41 +02:00
i2c i2c: omap: Fix standard mode false ACK readings 2023-05-17 11:13:07 +02:00
ide
idle intel_idle: Disable IBRS during long idle 2022-11-23 07:53:45 +01:00
iio iio: adc: palmas_gpadc: fix NULL dereference on rmmod 2023-05-17 11:13:06 +02:00
infiniband RDMA/mlx5: Use correct device num_ports when modify DC 2023-05-17 11:13:19 +02:00
input Input: i8042 - add quirk for Fujitsu Lifebook A574/H 2023-04-26 11:21:51 +02:00
iommu iommu/mediatek-v1: Fix an error handling path in mtk_iommu_v1_probe() 2023-01-18 11:30:55 +01:00
ipack
irqchip irqchip/irq-bcm7120-l2: Set IRQ_LEVEL for level triggered interrupts 2023-03-11 16:31:39 +01:00
isdn mISDN: hfcmulti: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave() 2023-01-18 11:30:32 +01:00
leds
lightnvm lightnvm: disable the subsystem 2022-05-01 17:00:38 +02:00
macintosh macintosh: via-pmu-led: requires ATA to be set 2023-05-17 11:13:18 +02:00
mailbox mailbox: bcm-ferxrm-mailbox: Fix error check for dma_map_sg 2022-10-26 13:19:34 +02:00
mcb mcb: mcb-parse: fix error handing in chameleon_parse_gdd() 2023-01-18 11:30:27 +01:00
md dm verity: fix error handling for check_at_most_once on FEC 2023-05-17 11:13:23 +02:00
media media: rc: gpio-ir-recv: Fix support for wake-up 2023-05-17 11:13:10 +02:00
memory memory: of: Fix refcount leak bug in of_get_ddr_timings() 2022-10-26 13:19:28 +02:00
memstick memstick: r592: Fix UAF bug in r592_remove due to race condition 2023-05-30 12:42:08 +01:00
message
mfd mfd: pcf50633-adc: Fix potential memleak in pcf50633_adc_async_read() 2023-03-11 16:31:43 +01:00
misc vmci_host: fix a race condition in vmci_host_poll() causing GPF 2023-05-17 11:13:16 +02:00
mmc mmc: atmel-mci: fix race between stop command and start of next command 2023-03-22 13:27:11 +01:00
mtd spi: cadence-quadspi: fix suspend-resume implementations 2023-05-17 11:13:17 +02:00
mux
net net: pasemi: Fix return type of pasemi_mac_start_tx() 2023-05-30 12:42:08 +01:00
nfc nfc: st-nci: Fix use after free bug in ndlc_remove due to race condition 2023-03-22 13:27:09 +01:00
ntb NTB: ntb_tool: uninitialized heap data in tool_fn_write() 2022-08-25 11:15:39 +02:00
nubus
nvdimm nvdimm: Fix badblocks clear off-by-one error 2022-07-07 17:35:09 +02:00
nvme nvmet: avoid potential UAF in nvmet_req_complete() 2023-03-22 13:27:09 +01:00
nvmem
of of: Fix modalias string generation 2023-05-17 11:13:16 +02:00
opp
oprofile
parisc parisc: led: Fix potential null-ptr-deref in start_task() 2023-01-18 11:30:44 +01:00
parport parport_pc: Avoid FIFO port location truncation 2022-11-25 17:40:23 +01:00
pci PCI: pciehp: Fix AB-BA deadlock between reset_lock and device_lock 2023-05-17 11:13:28 +02:00
pcmcia pcmcia: db1xxx_ss: restrict to MIPS_DB1XXX boards 2022-06-14 16:59:31 +02:00
perf perf: arm_dsu: Fix hotplug callback leak in dsu_pmu_init() 2023-01-18 11:30:02 +01:00
phy phy: tegra: xusb: Add missing tegra_xusb_port_unregister for usb2_port and ulpi_port 2023-05-17 11:13:20 +02:00
pinctrl Revert "pinctrl: amd: Disable and mask interrupts on resume" 2023-04-20 12:04:39 +02:00
platform platform/x86: touchscreen_dmi: Add info for the Dexp Ursus KX210i 2023-05-17 11:13:26 +02:00
pnp PNP: fix name memory leak in pnp_alloc_dev() 2023-01-18 11:30:05 +01:00
power power: supply: generic-adc-battery: fix unit scaling 2023-05-17 11:13:19 +02:00
powercap powercap: fix possible name leak in powercap_register_zone() 2023-03-11 16:31:36 +01:00
pps
ps3
ptp ptp: replace snprintf with sysfs_emit 2022-04-15 14:15:00 +02:00
pwm pwm: mtk-disp: Disable shadow registers before setting backlight values 2023-05-17 11:13:20 +02:00
rapidio rapidio: devices: fix missing put_device in mport_cdev_open 2023-01-18 11:30:08 +01:00
ras
regulator regulator: s5m8767: Bounds check id indexing into arrays 2023-03-11 16:31:48 +01:00
remoteproc remoteproc: qcom: wcnss: Fix handling of IRQs 2022-08-25 11:15:21 +02:00
reset reset: tegra-bpmp: Restore Handle errors in BPMP response 2022-04-27 13:39:43 +02:00
rpmsg rpmsg: glink: Avoid infinite loop on intent for missing channel 2023-03-11 16:31:45 +01:00
rtc rtc: pm8xxx: fix set-alarm race 2023-03-11 16:31:48 +01:00
s390 s390/dasd: fix hanging blockdevice after request requeue 2023-05-17 11:13:21 +02:00
sbus
scsi scsi: megaraid: Fix mega_cmd_done() CMDID_INT_CMDS 2023-05-17 11:13:12 +02:00
sfi
sh
siox siox: fix possible memory leak in siox_device_add() 2022-11-25 17:40:23 +01:00
slimbus slimbus: stream: correct presence rate frequencies 2022-11-25 17:40:25 +01:00
sn
soc ARM: ux500: do not directly dereference __iomem 2023-01-18 11:30:41 +01:00
soundwire soundwire: bus_type: fix remove and shutdown support 2022-08-25 11:15:15 +02:00
spi spi: fsl-spi: Fix CPM/QE mode Litte Endian 2023-05-17 11:13:16 +02:00
spmi spmi: Add a check for remove callback when removing a SPMI driver 2023-05-17 11:13:17 +02:00
ssb
staging staging: rtl8192e: Fix W_DISABLE# does not work after stop/start 2023-05-17 11:13:17 +02:00
target scsi: target: iscsit: Fix TAS handling during conn cleanup 2023-05-17 11:13:12 +02:00
tc
tee tee: add overflow check in register_shm_helper() 2022-08-25 11:15:48 +02:00
thermal thermal: intel: powerclamp: Fix cur_state for multi package system 2023-03-11 16:32:02 +01:00
thunderbolt thunderbolt: Use const qualifier for ring_interrupt_index 2023-04-05 11:15:35 +02:00
tty serial: 8250: Fix serial8250_tx_empty() race with DMA Tx 2023-05-17 11:13:28 +02:00
uio uio: uio_dmem_genirq: Fix deadlock between irq config and handling 2023-01-18 11:30:25 +01:00
usb usb: chipidea: fix missing goto in ci_hdrc_probe 2023-05-17 11:13:17 +02:00
uwb
vfio vfio: platform: Do not pass return buffer to ACPI _RST method 2023-01-18 11:30:25 +01:00
vhost vhost/vsock: Use kvmalloc/kvfree for larger packets. 2022-10-26 13:19:26 +02:00
video fbdev: au1200fb: Fix potential divide by zero 2023-04-05 11:15:40 +02:00
virt vboxguest: Do not use devm for irq 2022-08-25 11:15:43 +02:00
virtio virtio_mmio: Restore guest page size on resume 2022-07-21 21:09:30 +02:00
visorbus
vlynq
vme vme: Fix error not catched in fake_init() 2023-01-18 11:30:28 +01:00
w1 w1: fix WARNING after calling w1_process() 2023-02-06 07:49:40 +01:00
watchdog watchdog: sbsa_wdog: Make sure the timeout programming is within the limits 2023-04-20 12:04:41 +02:00
xen xen/privcmd: Fix a possible warning in privcmd_ioctl_mmap_resource() 2023-01-18 11:30:07 +01:00
zorro
Kconfig
Makefile