Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp696167rwj; Fri, 23 Dec 2022 07:02:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXtD+31SVtwQtYFcbM4UYbraynbm7sP1Iq5GspcR8x9xAf/vSbM+rLZ/Ve2iRI/Gjt9ijvy7 X-Received: by 2002:a17:906:57c4:b0:844:436f:8f01 with SMTP id u4-20020a17090657c400b00844436f8f01mr5298565ejr.17.1671807779702; Fri, 23 Dec 2022 07:02:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671807779; cv=none; d=google.com; s=arc-20160816; b=DHwITffAImP6MXJiuEM6TWzSEdE/wlU6rgdFWR8AxHAaDRwXtgQXCiNqYu9ybZVRox dVrrz8jlL5QCCzeaHfoHySL0QbbTdBD6r0vTnT6JFTdv/+QOUaf/CGtnHreS3hMiw8/r LXF82d7cGuyxG/fGyPnbNS0ZgUwRzF5tk8h/bvmMWUZcajH9ap9aXtfFyrv60IVQu7RZ bEsW/IV4cJ20kBwcek0YYDilLiaKB4Sd1vI+QfDrWMsjfj/wOid6bnP7c483IjgumRCj o/wFJb3ZdnEXa+DlzomvjsVb4iRi+9V/6xMd8WF+vxSFDR+tPB5M5y5lRVAQd+1mPuAF MdAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/Nj0ltQVRNqcXGYJaNJCECGRl86P5PTrQ1XYSbEfe18=; b=DyzgrVEDEPXA3/VIIVY7uYIT/SNGRDD3h8b5M8x8v8FM6kSL5+2zzVkFV0rU4ifSVp gq4eKiDYrjnOMvE18vnmeaDlkWTZG9f2bR71hWO3LYfxONXA28G40JG7F+kRobhFIeYh 8OCs1b7AVu3PRdg6lNb/2KFfcoMELEYDwMs2rL4F10AVyWjj8BKFaAhyqSjnwA7Gpciw mRS742NDcaqotUwYtA3BzeQls9FE9vFwgTqV/KD7EBazkOLBau3wtSKRABxo/PhGYg7Y btfDQCwSqGaSSwo1aIzH5lkQ5sjxX1gr3HOl8IRGK1JL6lI2k8v7ZZRG4+TeGyYeahOt XR5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=T2OsMkea; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg16-20020a170907971000b008376c09a3e6si2897153ejc.170.2022.12.23.07.02.43; Fri, 23 Dec 2022 07:02:59 -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=@linuxfoundation.org header.s=korg header.b=T2OsMkea; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230391AbiLWOvR (ORCPT + 66 others); Fri, 23 Dec 2022 09:51:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236398AbiLWOvO (ORCPT ); Fri, 23 Dec 2022 09:51:14 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B30D4B1D8; Fri, 23 Dec 2022 06:51:13 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 731BCB80315; Fri, 23 Dec 2022 14:51:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0616C433EF; Fri, 23 Dec 2022 14:51:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1671807071; bh=kNH4zf3D7/4hjbqE5cHwauHXbJqf2MkEh7zrETewNzY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=T2OsMkeaLXZ3LoGvMPLrR3x1WKZSESD6cVCnbf/dB9Cr4Q/NXvqwtIHf2bBNtDPQo vpKqj8Y2m/xZuAftmJcIuKSwliu6gXgLjoZe9n7ED09GeyHIY5wxitEED0db2S/ZpJ EdxphWMWrVUxKWQRVRTcJywe5yerH5IMYy/BDYGg= Date: Fri, 23 Dec 2022 15:51:07 +0100 From: 'Greg Kroah-Hartman' To: Prashanth K Cc: David Laight , Dan Carpenter , "Gustavo A . R . Silva" , Shuah Khan , John Keeping , Pratham Pratap , Vincent Pelletier , Udipto Goswami , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "# 5 . 15" Subject: Re: usb: f_fs: Fix CFI failure in ki_complete Message-ID: References: <1670851464-8106-1-git-send-email-quic_prashk@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Thu, Dec 22, 2022 at 06:21:03PM +0530, Prashanth K wrote: > > > On 14-12-22 11:05 pm, David Laight wrote: > > From: Greg Kroah-Hartman > > > Sent: 12 December 2022 13:35 > > > > > > On Mon, Dec 12, 2022 at 06:54:24PM +0530, Prashanth K wrote: > > > > Function pointer ki_complete() expects 'long' as its second > > > > argument, but we pass integer from ffs_user_copy_worker. This > > > > might cause a CFI failure, as ki_complete is an indirect call > > > > with mismatched prototype. Fix this by typecasting the second > > > > argument to long. > > > > > > "might"? Does it or not? If it does, why hasn't this been reported > > > before? > > > > Does the cast even help at all. > Actually I also have these same questions > - why we haven't seen any instances other than this one? > - why its not seen on other indirect function calls? Great, please work on figuring these out before you resubmit this again as obviously we can't take this change without knowing the answers here. good luck! greg k-h