Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1469861ybt; Sat, 27 Jun 2020 09:11:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJDTAfU3TDR/ZwroeKBVvPEgcCaItwZV1C9C/IPTr7eiZulNVfedB+v+YZj4XF4SumHSKc X-Received: by 2002:a17:906:c452:: with SMTP id ck18mr7523167ejb.415.1593274294976; Sat, 27 Jun 2020 09:11:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593274294; cv=none; d=google.com; s=arc-20160816; b=WXLWtPQwBmPNp7OrR4TmPWvc6yKjEMOnpewkBXduGabDtueO+wML0N+8OjEwQubNha HNxyqsTnBVhL6JQKRiWDcQKLEbx+PGyu58rZctzt29IvqyV/lWz2pUnnkGKwdkXoZbBA 3VPl2NDYcEreinQ7pGbaux5CmZwrNBicd81nPGKcJY3pFIig7NHtBbDjlTySITotUcsM 9zC0y1mknm1h6QksCrRToj0o2ISte2I+KfSJys27VAFlixPmVsn7uwpDlD5ak8g9DhdI dTYkgO3002wBDRftt9WtoeRI9uNba5N32jy5wVrNogju7GQpTbIRFAMfSPPk/KPLHcd0 XRXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=GmqzFZ1buIwT4xrRi2FIHyllUAjbkOAd/H/8HxkAW6U=; b=yrMd2tUXBjaVk1HjYp7heGnlhX42MEYc5CmiFFP0s/b5FI7IczrlaNeyB1UTsrfizo /SlVuPhX8W/Z8glju0YB0vkcGyh+mkGGrKVk10WnMvmdKLuN1xepcGkcELqrXvWhJwNk SXopfY6dN8Vh+dI99c/94eJuqcWn5Mt9GiXE5VhtwHq9TBGW0qL+1KjvNCWBx6Xl8HRQ CDtPFUgWW0dktERqtmvJLZH8G0+k37GkZbYgLw9Yib2xbzW8JofuCRcCifBazoHCSENW QaM7ebmteIgtmzlnVfqjGz3dLKEaEYssTilmiYA65vFh7rx7xj/xPYXbVdmCX41c1MfG ePuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=dh4JYSM4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o5si9111226edj.37.2020.06.27.09.11.10; Sat, 27 Jun 2020 09:11:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=dh4JYSM4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726057AbgF0QLA (ORCPT + 99 others); Sat, 27 Jun 2020 12:11:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725882AbgF0QK7 (ORCPT ); Sat, 27 Jun 2020 12:10:59 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90D44C061794 for ; Sat, 27 Jun 2020 09:10:59 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id q90so5443025pjh.3 for ; Sat, 27 Jun 2020 09:10:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=GmqzFZ1buIwT4xrRi2FIHyllUAjbkOAd/H/8HxkAW6U=; b=dh4JYSM4NRBR8w2L+qg0N6eb1ocUwJuefZCDJ8ZAsegTTsNUdCHDIcY2KsJTT14RgX lmeulxGNpq4ng/Fmwb1zgiNrDYW0uFB4egI29Rc7jTu1T59KcyRuyhT/Zn9yPJpRPuSQ E5NYbzcoNWjOrKIiJt1IMVILm4RHgsJF72yjM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=GmqzFZ1buIwT4xrRi2FIHyllUAjbkOAd/H/8HxkAW6U=; b=b57QZdSS8LKnl9XMKEww5bW66mRJRx8duSZN6zNAXTVKHd3MGjaoeFuxTaHDn9HCuj 93K911rJnyxo0R813XXyO3e9xdy/TLpUGmi/P0iUb5X6qj5OSrgdQOUXPBivdjAqpLdp KYA81rTBorJo/6CQV0cVMUi958ZUmxGgzejKgjCAN4+rq/bJJhR8LHFRTJD6wvJeVBng GoZeHjaXTohVvJIWmmyEJ0RewYf/lVEAuft5KOshc+Jk/VJgEULk63Wux1WCVJNIvOQG hn37e5fsyb5IzF3yTcprhRAvbykK52234FWCIj9ZfsgU7eWnEEGm/v9R9qcD0ngzwreE ZuKA== X-Gm-Message-State: AOAM530z1omcN0kdNmF1RownAVSymNgpKaN00tBcaFJasivcHTLcbcIC OU6o+aYdxcKnerratcK1tIHZxg== X-Received: by 2002:a17:90a:35c:: with SMTP id 28mr1653573pjf.63.1593274258994; Sat, 27 Jun 2020 09:10:58 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id u13sm7074448pjy.40.2020.06.27.09.10.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jun 2020 09:10:58 -0700 (PDT) Date: Sat, 27 Jun 2020 09:10:56 -0700 From: Kees Cook To: Oscar Carter Cc: Heiko Carstens , Vasily Gorbik , Christian Borntraeger , kernel-hardening@lists.openwall.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drivers/s390/char/tty3270: Remove function callback casts Message-ID: <202006270853.C40CA89806@keescook> References: <20200627125417.18887-1-oscar.carter@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200627125417.18887-1-oscar.carter@gmx.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 callback > 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.perier@gmail.com/ Is this something you'd want to tackle? > --- > 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 = (struct raw3270_request *)data; Regardless, this is correct as far as fixing the prototype. Reviewed-by: Kees Cook -- Kees Cook