From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net ([212.227.17.21]:56559 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726738AbgGDMZh (ORCPT ); Sat, 4 Jul 2020 08:25:37 -0400 Date: Sat, 4 Jul 2020 14:25:17 +0200 From: Oscar Carter Subject: Re: [PATCH] drivers/s390/char/tty3270: Remove function callback casts Message-ID: <20200704122517.GB3143@ubuntu> References: <20200627125417.18887-1-oscar.carter@gmx.com> <202006270853.C40CA89806@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202006270853.C40CA89806@keescook> Content-Transfer-Encoding: quoted-printable Sender: linux-s390-owner@vger.kernel.org List-ID: To: Kees Cook Cc: Oscar Carter , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , kernel-hardening@lists.openwall.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org On Sat, Jun 27, 2020 at 09:10:56AM -0700, Kees Cook wrote: > On Sat, Jun 27, 2020 at 02:54:17PM +0200, Oscar Carter wrote: > > In an effort to enable -Wcast-function-type in the top-level Makefile = to > > support Control Flow Integrity builds, remove all the function callbac= k > > casts. > > > > To do this modify the function prototypes accordingly. > > > > Signed-off-by: Oscar Carter > > Oh yes, the tasklets! I'd love to see this fixed correctly. (Which is to > say, modernize the API.) Romain hasn't had time to continue the work: > https://lore.kernel.org/kernel-hardening/20190929163028.9665-1-romain.pe= rier@gmail.com/ > > Is this something you'd want to tackle? Yes, of course. It will be a pleasure to work on this. But without forgett= ing the work to remove all the function cast mismatches. > > --- > > drivers/s390/char/tty3270.c | 12 ++++++------ > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c > > index 98d7fc152e32..aec996de44d9 100644 > > --- a/drivers/s390/char/tty3270.c > > +++ b/drivers/s390/char/tty3270.c > > @@ -556,8 +556,9 @@ tty3270_scroll_backward(struct kbd_data *kbd) > > * Pass input line to tty. > > */ > > static void > > -tty3270_read_tasklet(struct raw3270_request *rrq) > > +tty3270_read_tasklet(unsigned long data) > > { > > + struct raw3270_request *rrq =3D (struct raw3270_request *)data; > > Regardless, this is correct as far as fixing the prototype. > > Reviewed-by: Kees Cook > > -- > Kees Cook Regards, Oscar Carter