Received: by 10.213.65.68 with SMTP id h4csp1118901imn; Wed, 14 Mar 2018 10:07:15 -0700 (PDT) X-Google-Smtp-Source: AG47ELvEbTOCm5n1/yd1jffY9GCjxfUUyqn+4aIoiQ7srQKPf5H9DQAkEDLiGUIExpPWG00o8OkT X-Received: by 2002:a17:902:7102:: with SMTP id a2-v6mr3916349pll.87.1521047235866; Wed, 14 Mar 2018 10:07:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521047235; cv=none; d=google.com; s=arc-20160816; b=M0foHai1fhzyyG4fM/Ur4vX6IyMxEVTgKGyaY55FR6+vG0cLQtuBfPG3aXl3Fl8boR AenLxp8ckNcsMOTW1dKx/pS97GSuW1nlAygFGzrkNUb8mSFIlOaeR6bZDxqp7kNEJdvl 9d0b6c0ycPNEPyUxqG6PGrVWzr0MhKAclD+V+WoKFHXHLfkX/e8mO+157aL5cGLSNwj3 Ck5Z8ARF/4jFMEq6FMr1JRpnwp+UIofvD6YrhJd/JI+aDcEh+Lgmgq/ihsNeSK7taE51 8+MzoO2iWXiZs7G0aHKUXyaqWIBPZU4qEiWsAs8Sr+MN9fKJi822V65cI2XTCoP9gHUL LTPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=bj0dbIQyOlRlD6r06SVWGlUOdClIVaELVkRwHrw2F+w=; b=JlWenUAFm5cn7YtHRPTpVlOYZhi9QCdoOIP6D7gXu6Tq1RiXthe0ouHTWpa8C2k0Hs RuveXBRMLDSoJxraV8+RZRyiXyeF7/JxyEe0TkcUtA3tZwoSv3jFZOWxDnXxbbGWSagB 9JYxbJR5EEhigiVPheFN7m5IFIg6XW5fw9Hfuc1AzWDLaWnoDzNgJv4mOmXsV6WWNWek nRD0YSzxAsO1yhN6VNzkBGXdJ0MwbBj1yW6fDTMcNTO+XDho54LlvWOQxXyaS+0XxwkX 6EGIcYLfWoZb/P9T0Syq29jOXZmeUsaWMm3FrOrUshrIdRzFHbyR3rlb+sUuOisq4y2h VaAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Wo+cVgFm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h1-v6si2270749pln.216.2018.03.14.10.07.01; Wed, 14 Mar 2018 10:07:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Wo+cVgFm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752555AbeCNRDq (ORCPT + 99 others); Wed, 14 Mar 2018 13:03:46 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:56417 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752283AbeCNRDo (ORCPT ); Wed, 14 Mar 2018 13:03:44 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 6D00220B3B; Wed, 14 Mar 2018 13:03:43 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Wed, 14 Mar 2018 13:03:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=bj0dbI QyOlRlD6r06SVWGlUOdClIVaELVkRwHrw2F+w=; b=Wo+cVgFmZBtcwk15sSKozu cvzDzAMZjngOcFqEyZFv2Yghd0vEWkPrhrA0EXHVvE3hCLXqIbpCdIFnCxQaQKiX wyTsQeXY1qrGBJacER9s7lfLYE1OyZFW9xB5ky14ekF0jMyNFZDfF8Qe99BYwQw/ xv2mQ9qe1Ocrg0u2+FKzm+2DAsDCw553MhT3rI5Bswpuyp1SMr8hmB4ZbinVnj11 raRwsG92zbONR1zatGDLyXVWmcP147kGh7otwV9zTT0+wc00PuQYUnOKwQiqxjoH IiAbRxQhVTZrg92y6XoSXFpeiC+Ksdi3K18LAvsJczTlTqH6Qv/xTuayi1R1Z11Q == X-ME-Sender: Received: from localhost (lfbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.messagingengine.com (Postfix) with ESMTPA id E43157E17F; Wed, 14 Mar 2018 13:03:42 -0400 (EDT) Date: Wed, 14 Mar 2018 18:03:41 +0100 From: Greg KH To: Joao Moreira Cc: kernel-hardening@lists.openwall.com, linux-kernel@vger.kernel.org, danielmicay@gmail.com, keescook@chromium.org Subject: Re: [PATCH] vgacon: fix function prototypes Message-ID: <20180314170341.GA15364@kroah.com> References: <20180310064059.12720-1-jmoreira@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180310064059.12720-1-jmoreira@suse.de> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 10, 2018 at 03:40:59AM -0300, Joao Moreira wrote: > It is possible to indirectly invoke functions with prototypes that do not > match those of the respectively used function pointers by using void types. > Despite widely used as a feature for relaxing function invocation, this > should be avoided when possible as it may prevent the use of heuristics > such as prototype matching-based Control-Flow Integrity, which can be used > to prevent ROP-based attacks. > > Given the above, the current efforts to improve the Linux security, and the > upcoming kernel support to compilers with CFI features, fix prototypes in > vgacon console driver. > > Another similar fix can be seen in [1]. > > [1] https://android-review.googlesource.com/c/kernel/common/+/602010 > > Signed-off-by: Jo?o Moreira > Acked-by: Kees Cook > Acked-by: Bartlomiej Zolnierkiewicz > --- > drivers/video/console/vgacon.c | 18 +++++++++++++----- > 1 file changed, 13 insertions(+), 5 deletions(-) This fails the build :( drivers/video/console/vgacon.c:1432:15: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .con_putcs = vgacon_putcs, ^~~~~~~~~~~~ What tree should this go to? It doesn't apply at all to my tty tree, which is where I thought it should go, so I tried a different one and got this mess :( confused, greg k-h