Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1227712rwb; Wed, 14 Dec 2022 07:56:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf5RxFkO7TrTAL9YYgXlxP1wyiyGbnBlP+TSent1DMJUtJGqpf35OWHbYCWYWutqoJzSM7Wa X-Received: by 2002:a17:906:c083:b0:7a6:5b50:a32c with SMTP id f3-20020a170906c08300b007a65b50a32cmr23651243ejz.12.1671033367233; Wed, 14 Dec 2022 07:56:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671033367; cv=none; d=google.com; s=arc-20160816; b=ZdND2AEiXZ8w7WEP0CM6WrQaUbCjUyrqSp1vO7l0L0kMjbPWtW9CtdDpSCcOSk54qm kQGFCSpfT7oLS2PpQFrxBXp94qLBjMztcBf1LLYM6QDDQETkuoI0ncWYC2tbg+6AcuY2 z2DQiD9Ab5Yoh5SqrZyuyL71Ti/HJbO8foOMtkEvxLmpsiXCd/+85vAwFD9MBYHZyJPz W3Ddfd/jbIX59NCE+gZWd9OICtRWNum+lcxAwiXCtsvsGUqoVAPgT8QgC09lKVKN1G9i ATHq1DYax5RnBbpJeE6qj72aAFN8sw0YbdN1ZYa3F4D7yZO2gh6YdD0LadjzXVZb02fw fLvw== 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=o6UBdP4T0vkZ45xlVMYy+/o2JZ+dgqKChVXTOfO5zm8=; b=TfV3gidiccSAoOwkT3mmao48U0yAxqKy7wTi5oRlE3va0H2SZVfoYiolN1bKsWwnPf hnrEcsHO9o394xcUOlE5f6+gtnqGrIY/4Sj+R+n8m1iYtbg/rY3RXR9sV3SiqaGrfqSt O5yz4tjHDKxNs7GERM781TTUeHd2U0D+mZPrPY94Y2yUfd2Dzp8zmKrCxqCjn/PRyw/N jv/5jGTiArPZH1YeQmRq0I7Rrz9wZHr1q9gMUAkIGPB+IlDiRD7zylaEcf0TpziMCU/B ebKr/7jIrPamVPvDFx9yI3esrP2swCgU5anPirWOIZ3S58xxdd+7d4aL/1jodMVHDDHV +/AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DnVPosIO; 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 mp8-20020a1709071b0800b007aeab6a1174si12096926ejc.633.2022.12.14.07.55.49; Wed, 14 Dec 2022 07:56:07 -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=DnVPosIO; 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 S238428AbiLNO4f (ORCPT + 69 others); Wed, 14 Dec 2022 09:56:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238744AbiLNO4b (ORCPT ); Wed, 14 Dec 2022 09:56:31 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79DAC27B26; Wed, 14 Dec 2022 06:56:29 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 16B4261807; Wed, 14 Dec 2022 14:56:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB9B4C433D2; Wed, 14 Dec 2022 14:56:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1671029788; bh=maUEsgzJ2DJN1ffH0fFG9b002yrOqNh2td9Dk+SSa6U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DnVPosIOGOUiUQ7xNBq2QwKrLOcB2ifUac18WOMx7X+g68JJIMYsk5AaVrPZttqLK N6YVs4hSBp7IpU/MvgiwhAYhMMTRnorqQPOLFheYY0nwJwnC0wERlYUd+iFbnNeDgS EsGxxwRqqmYnRL+C4RN78eC3jUcBPlWE6H67BOK4= Date: Wed, 14 Dec 2022 15:56:25 +0100 From: Greg Kroah-Hartman To: Prashanth K Cc: "Gustavo A . R . Silva" , Shuah Khan , John Keeping , Linyu Yuan , Pratham Pratap , Vincent Pelletier , Dan Carpenter , 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> <214c4b8f-b86b-3e1f-d34b-ccfa756f3136@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <214c4b8f-b86b-3e1f-d34b-ccfa756f3136@quicinc.com> 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 Wed, Dec 14, 2022 at 06:38:17PM +0530, Prashanth K wrote: > > > On 12-12-22 07:05 pm, Greg Kroah-Hartman wrote: > > 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? > Sorry for the confusion in commit text, We caught a CFI (Control Flow > Integrity) failure internally on 5.15, hence pushed this patch. But later I > came to know that CFI was implemented on 5.4 kernel for Android. Will push > the same on ACK and share the related details there. I will have the same questions there, namely, "why just this one instance and why is it trigging anything"? So please, work this out here, in public, don't bury stuff in random vendor kernel trees. That's not the way to solve anything properly, you know this :) thanks, greg k-h