From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753474AbdJaOqK (ORCPT ); Tue, 31 Oct 2017 10:46:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:57890 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751470AbdJaOqJ (ORCPT ); Tue, 31 Oct 2017 10:46:09 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D3F052190B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=jeyu@kernel.org Date: Tue, 31 Oct 2017 15:46:04 +0100 From: Jessica Yu To: Kees Cook Cc: Arnd Bergmann , LKML Subject: Re: module: Do not paper over type mismatches in module_param_call() Message-ID: <20171031144604.svshm5sfkxy5m54a@redbean> References: <1508292283-140003-1-git-send-email-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-OS: Linux redbean 4.13.0 x86_64 User-Agent: NeoMutt/20171013 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ Kees Cook [30/10/17 14:20 -0700]: >On Tue, Oct 17, 2017 at 7:04 PM, Kees Cook wrote: >> (re-sending to Jessica's @korg address...) >> >> The module_param_call() macro was explicitly casting the .set and .get >> function prototypes away with (void *). This can lead to hard-to-find >> type mismatches. Additionally, it creates problems for static checkers >> and Control Flow Itegrity compiler features, which depend on clustering >> function call sites based on prototype signature. >> >> This removes the casts and fixes all the incorrect prototypes tree-wide. > >A quick ping on this. I'd really like to land this in 4.15, as it's >relatively trivial. How does this look to you Jessica? Hey Kees! Sorry for the delay, and thanks for fixing this up - had to dig deep through git history to remind myself why these casts and that weird compiler type-check were being done in the first place :-/ I guess the original reason was backward compatibility. Anyways I've pushed this to modules-next, thanks! Jessica