Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1655810rwb; Sat, 19 Nov 2022 00:43:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf4INluzs6RSYD3aQP+UqK4OuXvGmSmjHRgmL38Gg/DcbHg5ala7BV1fG6KdO8GY7uUDwcjy X-Received: by 2002:a17:902:ed93:b0:188:a281:1b16 with SMTP id e19-20020a170902ed9300b00188a2811b16mr3208594plj.103.1668847431258; Sat, 19 Nov 2022 00:43:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668847431; cv=none; d=google.com; s=arc-20160816; b=IbvmpNM/qXwWYGakeAeoiSCQIAbymP6pokQD7rDty67Gk8CS7sjwiQa29HN/jZfngE 6EpX9kT9ntCvIQb9uwLCpwl4SzVeQXw2Df7Ch0IW2JqOoO15rSYrN5oTaZSBszT9AWUE cANDJv++jKauPH/uRnO1Rt5Jm2SOaXnmzW+tNT6bYwPfguzMxAyMmxfjdYbt+mQB3L9/ mqzuxkNGKWgdJ46NW2c0gcHmuo77UqdX4+65yz37olmAbDNwXFmJguMneBzRrP776cAA oT/EkkJeoWoRthmcGrmJnsDFb9KEQGzS2YVLWwXeECIEE2wETcpBdcOcuMsfPD6KgLr8 NPew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=QEDCwVW6uuuHbiiKcc9DBnvWg+TJfsJ2v3EhFL0XN9o=; b=h0N+Oa7e0nwHXn0YM8Xw6JXAisJXjpXPTlEczD5DijvhrmiIL9Zw0Kt5udK1qxTu5q dGMqjXjA8mgoN5A5S68OBi4BcHwaV4sO1IHQ1QLCX/DkCTYQr9p2zuFgMnRqbF55XL3g s01OQ8FGVHEvHOsgmqC6V0wdjm79PTzpoeLUFdjsTKRURxNrUVSqW27se6CvZ1Y//58t Cw6DlosNan7SCFHej/wxZrOUnmNHf5gdjOf0RQIteEFLL/XSvRs1scowkzWjddBqJG4p 9KQ6AR+6wXj++4P96IheA5oGbvJn52oyv2xzZt2ZPZBSWb2S/k4PqcEPrBNjPgvUVqqb Xb9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="H/Ryjm1N"; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q8-20020a170902dac800b001769e08c554si6840380plx.545.2022.11.19.00.43.39; Sat, 19 Nov 2022 00:43:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="H/Ryjm1N"; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232547AbiKSIU6 (ORCPT + 90 others); Sat, 19 Nov 2022 03:20:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230211AbiKSIU4 (ORCPT ); Sat, 19 Nov 2022 03:20:56 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FCC4950EF; Sat, 19 Nov 2022 00:20:54 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id DDF5B1F383; Sat, 19 Nov 2022 08:20:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1668846052; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QEDCwVW6uuuHbiiKcc9DBnvWg+TJfsJ2v3EhFL0XN9o=; b=H/Ryjm1NMX2N+WZ3ckhenCooygFEg9Yfn77aE0Hsrl/e2jTVUqUKBgY/4R7swkNah6+M9R PmnDKkTTpFAoXi4Bt56ucl0dEidCF+itn9cvEQekhnSbpfBvSOBEEgtJwHUhxfxIGXiI0u C515FCgXPmknejVhuntrIlRbBzQ0H2o= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1668846052; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QEDCwVW6uuuHbiiKcc9DBnvWg+TJfsJ2v3EhFL0XN9o=; b=CTLCvID1yyQQODN5uIjEn4sdakmHfW057PiOsxEIkb8i+993/7daQouoSNWKhS/GUmqS0G saXmX594nhhnsWCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9856D1377F; Sat, 19 Nov 2022 08:20:52 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 6oogJOSReGNafQAAMHmgww (envelope-from ); Sat, 19 Nov 2022 08:20:52 +0000 Date: Sat, 19 Nov 2022 09:20:53 +0100 Message-ID: <87a64nxsm2.wl-tiwai@suse.de> From: Takashi Iwai To: Kees Cook Cc: Jaroslav Kysela , kernel test robot , Takashi Iwai , "Gustavo A. R. Silva" , alsa-devel@alsa-project.org, Nathan Chancellor , Nick Desaulniers , Tom Rix , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-hardening@vger.kernel.org Subject: Re: [PATCH] ALSA: seq: Fix function prototype mismatch in snd_seq_expand_var_event In-Reply-To: <20221118232346.never.380-kees@kernel.org> References: <20221118232346.never.380-kees@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 19 Nov 2022 00:23:50 +0100, Kees Cook wrote: > > With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), > indirect call targets are validated against the expected function > pointer prototype to make sure the call target is valid to help mitigate > ROP attacks. If they are not identical, there is a failure at run time, > which manifests as either a kernel panic or thread getting killed. > > seq_copy_in_user() and seq_copy_in_kernel() did not have prototypes > matching snd_seq_dump_func_t. Adjust this and remove the casts. There > are not resulting binary output differences. > > This was found as a result of Clang's new -Wcast-function-type-strict > flag, which is more sensitive than the simpler -Wcast-function-type, > which only checks for type width mismatches. > > Reported-by: kernel test robot > Link: https://lore.kernel.org/lkml/202211041527.HD8TLSE1-lkp@intel.com > Cc: Jaroslav Kysela > Cc: Takashi Iwai > Cc: "Gustavo A. R. Silva" > Cc: alsa-devel@alsa-project.org > Signed-off-by: Kees Cook Thanks, applied. Takashi