From: Greg KH <gregkh@linuxfoundation.org>
To: GUO Zihua <guozihua@huawei.com>
Cc: linux-staging@lists.linux.dev
Subject: Re: [PATCH v3] staging: rtl8723bs: Fix return type for implementation of ndo_start_xmit
Date: Fri, 9 Sep 2022 09:46:42 +0200 [thread overview]
Message-ID: <YxrvYuVFqSg+CcyF@kroah.com> (raw)
In-Reply-To: <20220905130310.11489-1-guozihua@huawei.com>
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
next prev parent reply other threads:[~2022-09-09 7:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-05 13:03 [PATCH v3] staging: rtl8723bs: Fix return type for implementation of ndo_start_xmit GUO Zihua
2022-09-09 7:46 ` Greg KH [this message]
2022-09-09 8:05 ` Guozihua (Scott)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YxrvYuVFqSg+CcyF@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=guozihua@huawei.com \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox