Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp7181900rwn; Tue, 13 Sep 2022 15:34:13 -0700 (PDT) X-Google-Smtp-Source: AA6agR5gZ6LHDv8yNSO8Z+QCOAKqeuNf9IChvtYRI0NcF7Z7GoS1/GK+wG1NIRK3VmFW1lUFRoP9 X-Received: by 2002:a63:4e0d:0:b0:430:3d93:a6f8 with SMTP id c13-20020a634e0d000000b004303d93a6f8mr30306487pgb.212.1663108453460; Tue, 13 Sep 2022 15:34:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663108453; cv=none; d=google.com; s=arc-20160816; b=Es+OR/T2ur537STxZAKkJ6v2xH4n/tQmFJHwf8doI0PduaJF4yQybnquG7tRYG4YMy ERTSl3QcEGPXkwR4BLrAMC75HPwlILsCxl/VuvmBINW9QM8GAW7qwPfP7YmSXnxgp0NI C4ZXgMhUZ8Bpl2YQNJIHI6yhF75IHbmKJLTtY/3Ym3khq+6ZV9p7HnX5cSV4x4IaJgFw miX2Psff48gp04IZn6rEtBnAhlDu4OJHYXOpw74yix4UkS0QQVE4dIzWjbsbh9ga5QHm vS1sLNBZHkjQLDIZ0l35DpqTm7iGDAgMKt3fCdS+gHdPBirKiiZiIriqdybc/l8iavzP Tp5w== 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=Argv5yJC0JY9IcxPQqKLYMKqBM7RCy3c7CeX0XMscq4=; b=f/O2X0Yg1h+PGcxFcfm8jxEmnm+A8oZusg1zzx5DuFB/GaWaidQDupR3hLW3n3y/UR 39+aGOUpqrlPy8EIyjj2/1ZmRIrLoRVvh3VxrcAbiAO4uD/oLu1HIOfacip4sOAWNrW4 sd94fGrLClVd+J/JrVI1cAet3+qsxfQjTrLhu2ml4r/jdbScYVAFKnR78S6f0u+x5wqX 4WQWz/EUcL+IGK7d/6cF0a/OYIqsv+Yzfv93aoUXpGM325b4mpesRT4R9Cc2wm6ftBaJ 8z2iAVm6tS0WNGQf6cyLrJvZvZM9uInTg3FVqtZrcIgyMfkn3ucTRoZPchklWoZHlEN4 m1Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RbIRmhpR; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k13-20020a170902ce0d00b001729146e418si12648635plg.388.2022.09.13.15.34.00; Tue, 13 Sep 2022 15:34:13 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=RbIRmhpR; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229739AbiIMWcR (ORCPT + 99 others); Tue, 13 Sep 2022 18:32:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbiIMWcO (ORCPT ); Tue, 13 Sep 2022 18:32:14 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83BE16DAD0; Tue, 13 Sep 2022 15:32:13 -0700 (PDT) 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 E7CFBB810E2; Tue, 13 Sep 2022 22:32:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16C46C433D6; Tue, 13 Sep 2022 22:32:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663108330; bh=xQNxJxEcyNL4T14W2RgiHc+osVherdxF9bKhuT2OEJE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RbIRmhpR4/HqeQ8QQ10xdOEksaF5/3/e1DpHaJ39pIQQKAerXx0/yr39srGVnWil0 XT1QnXnz8Cxi0QwdRDQU9Wmkp2OknRn9wOihZ4Jl/V/EQCqu1TeV1N/kDGrIIZLk8h brC30s9zo+cQS1KxOD7kfhLDmeFwUvkDTwjk1Xj0kSkbnIaFyWKx64i3Rz8iOW/jkv 8yoqfTs6F04c/vkAXUrWDWEPQDIKBCs4KDzzNafuRoFvNa4VBJCJ3XIblEKmTBFaAM 2LqGlIkYHo1HsrJ940uQZjbssp8ycmmdjglSuGuiFRSGz1sAVewvwwTKdpbc8lu2oc N8nEywX1pUlgw== Date: Tue, 13 Sep 2022 15:32:08 -0700 From: Nathan Chancellor To: Nathan Huckleberry Cc: Dan Carpenter , llvm@lists.linux.dev, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Nick Desaulniers , Tom Rix , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: korina: Fix return type of korina_send_packet Message-ID: References: <20220912214344.928925-1-nhuck@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220912214344.928925-1-nhuck@google.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,T_SCC_BODY_TEXT_LINE 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 Mon, Sep 12, 2022 at 02:43:40PM -0700, Nathan Huckleberry wrote: > The ndo_start_xmit field in net_device_ops is expected to be of type > netdev_tx_t (*ndo_start_xmit)(struct sk_buff *skb, struct net_device *dev). > > The mismatched return type breaks forward edge kCFI since the underlying > function definition does not match the function hook definition. > > The return type of korina_send_packet should be changed from int to > netdev_tx_t. > > Reported-by: Dan Carpenter > Link: https://github.com/ClangBuiltLinux/linux/issues/1703 > Cc: llvm@lists.linux.dev > Signed-off-by: Nathan Huckleberry Reviewed-by: Nathan Chancellor > --- > drivers/net/ethernet/korina.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c > index df9a8eefa007..eec6a9ec528b 100644 > --- a/drivers/net/ethernet/korina.c > +++ b/drivers/net/ethernet/korina.c > @@ -416,7 +416,8 @@ static void korina_abort_rx(struct net_device *dev) > } > > /* transmit packet */ > -static int korina_send_packet(struct sk_buff *skb, struct net_device *dev) > +static netdev_tx_t korina_send_packet(struct sk_buff *skb, > + struct net_device *dev) > { > struct korina_private *lp = netdev_priv(dev); > u32 chain_prev, chain_next; > -- > 2.37.2.789.g6183377224-goog >