On 2022/9/9 15:46, Greg KH wrote:
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
.
Sure Greg
--
Best
GUO Zihua