Re: [PATCH v3] staging: rtl8723bs: Fix return type for implementation of ndo_start_xmit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 05, 2022 at 09:03:10PM +0800, GUO Zihua wrote:
> CFI (Control Flow Integrity) is a safety feature allowing the system to
> detect and react should a potential control flow hijacking occurs. In
> particular, the Forward-Edge CFI protects indirect function calls by
> ensuring the prototype of function that is actually called matches the
> definition of the function hook.
> 
> Since Linux now supports CFI, it will be a good idea to fix mismatched
> return type for implementation of hooks. Otherwise this would get
> cought out by CFI and cause a panic.
> 
> As returns from _rtw_xmit_entry() would always be 0, remove unneeded
> variable ret and use enums from netdev_tx_t as return value instead.
> Then change return type to netdev_tx_t.

If _rtw_xmit_entry() can never fail, then it needs to not have a return
value at all, and that needs to also be fixed.  Can you make this a
patch series that does the return type change for _rtw_xmit_entry()
first, and then this change on top of that one.

thanks,

greg k-h




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux