From: Kees Cook <keescook@chromium.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org,
Florian Schilhabel <florian.c.schilhabel@googlemail.com>,
kernel-hardening@lists.openwall.com,
linux-kernel@vger.kernel.org,
Romain Perier <romain.perier@gmail.com>,
Larry Finger <Larry.Finger@lwfinger.net>
Subject: Re: [PATCH] staging: rtl*: Remove tasklet callback casts
Date: Fri, 15 Nov 2019 08:48:55 -0800 [thread overview]
Message-ID: <201911150848.12F713465F@keescook> (raw)
In-Reply-To: <20191115074235.GJ19079@kadam.lan>
On Fri, Nov 15, 2019 at 10:42:35AM +0300, Dan Carpenter wrote:
> On Fri, Nov 15, 2019 at 10:40:03AM +0300, Dan Carpenter wrote:
> > On Thu, Nov 14, 2019 at 09:39:00PM -0800, Kees Cook wrote:
> > > In order to make the entire kernel usable under Clang's Control Flow
> > > Integrity protections, function prototype casts need to be avoided
> > > because this will trip CFI checks at runtime (i.e. a mismatch between
> > > the caller's expected function prototype and the destination function's
> > > prototype). Many of these cases can be found with -Wcast-function-type,
> > > which found that the rtl wifi drivers had a bunch of needless function
> > > casts. Remove function casts for tasklet callbacks in the various drivers.
> > >
> > > Signed-off-by: Kees Cook <keescook@chromium.org>
> >
> > Clang should treat void pointers as a special case. If void pointers
> > are bad, surely replacing them with unsigned long is even more ambigous
> > and worse.
>
> Wow... Never mind. I completely misread this patch. I am ashamed.
Okay, whew. I was starting to try to wrap my brain around what you
meant and was failing badly. :)
> The patch is fine.
>
> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks!
-Kees
>
> regards,
> dan carpenter
>
--
Kees Cook
prev parent reply other threads:[~2019-11-15 16:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-15 5:39 [PATCH] staging: rtl*: Remove tasklet callback casts Kees Cook
2019-11-15 6:16 ` Greg Kroah-Hartman
2019-11-15 16:49 ` Kees Cook
2019-11-15 7:40 ` Dan Carpenter
2019-11-15 7:42 ` Dan Carpenter
2019-11-15 16:48 ` Kees Cook [this message]
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=201911150848.12F713465F@keescook \
--to=keescook@chromium.org \
--cc=Larry.Finger@lwfinger.net \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=florian.c.schilhabel@googlemail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kernel@vger.kernel.org \
--cc=romain.perier@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.