mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
a269396080e22d83283c445a8aeb44b90893e779
rockchip_canfd_start_xmit is used as a callback function for the ndo_start_xmit function pointer. ndo_start_xmit's return type is netdev_tx_t but rockchip_canfd_start_xmit's return type is int. This causes a failure with Control Flow Integrity (CFI), which requires function pointer prototypes and callback function definitions to match exactly. When CFI is in enforcing, the kernel panics. When booting a CFI kernel with WSL 2, the VM is immediately terminated because of this. The splat when CONFIG_CFI_PERMISSIVE is used: [ 82.432581][ T2211] CPU: 3 PID: 2211 Comm: cansend Tainted: G E 6.1.57-android14-11-gfc4b04d84027-ab11318753 #1 [ 82.433595][ T2211] Hardware name: Rockchip RK3568 EVB1 DDR4 V10 Board (DT) [ 82.434206][ T2211] pstate: 30400005 (nzCV daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 82.434887][ T2211] pc : dev_hard_start_xmit+0xd0/0x260 [ 82.435367][ T2211] lr : sch_direct_xmit+0xf0/0x3d0 [ 82.435815][ T2211] sp : ffffffc0110f3a70 [ 82.436175][ T2211] x29: ffffffc0110f3a80 x28: ffffffc009f47000 x27: ffffff800d078080 [ 82.436873][ T2211] x26: ffffffc009f2ed80 x25: ffffffc009f50550 x24: 0000000000000010 [ 82.437567][ T2211] x23: ffffff807bfefc00 x22: ffffff800d078000 x21: ffffff81f41b7200 [ 82.438261][ T2211] x20: 0000000000000000 x19: ffffffc0110f3ae4 x18: ffffffc01075d070 [ 82.438954][ T2211] x17: 0000000044e57e43 x16: 00000000ab1f26f7 x15: 0000007fec6a51b0 [ 82.439646][ T2211] x14: 0000000000000001 x13: 0000000008000000 x12: fffffffdeff6a120 [ 82.440340][ T2211] x11: 0000000000000000 x10: 0000000000000000 x9 : ffffff81f9bf5d80 [ 82.441033][ T2211] x8 : ffffffc00262b620 x7 : 7f7f7f7f7f7f7f7f x6 : fefefefefefefeff [ 82.441726][ T2211] x5 : 0000000000000001 x4 : 0000000000000000 x3 : ffffffc0110f3ae4 [ 82.442418][ T2211] x2 : ffffff81f41b7200 x1 : ffffff800d078000 x0 : ffffff807bfefc00 [ 82.443111][ T2211] Call trace: [ 82.443393][ T2211] dev_hard_start_xmit+0xd0/0x260 [ 82.443839][ T2211] sch_direct_xmit+0xf0/0x3d0 [ 82.444247][ T2211] __dev_queue_xmit+0x5f0/0xd40 [ 82.444667][ T2211] can_send+0x22c/0x2b0 [can] [ 82.445098][ T2211] raw_sendmsg+0x1b4/0x3ac [can_raw] [ 82.445585][ T2211] sock_write_iter+0xdc/0x13c [ 82.445997][ T2211] vfs_write+0x1e0/0x2c8 [ 82.446375][ T2211] ksys_write+0x78/0xe8 [ 82.446737][ T2211] __arm64_sys_write+0x1c/0x2c [ 82.447157][ T2211] invoke_syscall+0x58/0x11c [ 82.447557][ T2211] el0_svc_common+0xb4/0xf4 [ 82.447954][ T2211] do_el0_svc+0x2c/0xb0 [ 82.448316][ T2211] el0_svc+0x2c/0xa4 [ 82.448661][ T2211] el0t_64_sync_handler+0x68/0xb4 [ 82.449102][ T2211] el0t_64_sync+0x1a4/0x1a8 [ 82.449504][ T2211] Code: 728fc871 72a89cb1 6b11021f 54000040 (d4304500) [ 82.450106][ T2211] ---[ end trace 0000000000000000 ]--- [ 82.468041][ T2211] Kernel panic - not syncing: Oops - CFI: Fatal exception in interrupt [ 82.468776][ T2211] SMP: stopping secondary CPUs [ 82.469267][ T2211] Kernel Offset: disabled [ 82.469643][ T2211] CPU features: 0x00,00040000,00040184,6600721b [ 82.470190][ T2211] Memory Limit: none [ 82.470530][ T2211] PMU CRU: Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com> Change-Id: I62fa546e07984c7fd6acbd0bdf1278414b479829
…
Merge tag 'mm-hotfixes-stable-2022-12-10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
…
…
…
…
…
Linux kernel
============
There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.
In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``. The formatted documentation can also be read online at:
https://www.kernel.org/doc/html/latest/
There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
Languages
C
97.7%
Assembly
1.6%
Makefile
0.3%
Perl
0.1%