From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 49671C6FA82 for ; Tue, 13 Sep 2022 08:17:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=O3HCnj72cnmmyeKrAOo+WzG9OQX86QJRQEX0tffHUok=; b=TgGYO9cNoBnlXi dZC2RWD1HQtQErb1mI8EorsferWQNzm0bYO61VdVJ3NrWsR8jHdQWkAkDu5GGw8vjRfsOEfqwsqdn PPJ6HtodgB+F3XijQ7GpE+K/VWFP1JPZ6f+nmJF9mSC8H9R1lY0iyUIKJ/r2rJAQGfy3P4nE8cWW5 Ii1BGA6xI+52FlHMeqENqSn2ZXQ/TDWzrYL4Lk9/egt8vw+klfllsFCkZ+nCJGhjzd9BwGdXQekd+ FHisjKfoB+/epWuS/cdL2nv1yXQZgVFZSo2RA168xVMiqEcuKIRCckFj448WF2tnPIja42zvzeAYl jSDw+rszT1wg7xjidnbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oY15Q-004B9l-AP; Tue, 13 Sep 2022 08:16:04 +0000 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oY15K-004B2r-2C for linux-arm-kernel@lists.infradead.org; Tue, 13 Sep 2022 08:16:00 +0000 Received: by mail-lj1-x236.google.com with SMTP id a14so11303815ljj.8 for ; Tue, 13 Sep 2022 01:15:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references :organization:message-id:subject:cc:to:from:date:from:to:cc:subject :date; bh=4ZZv5xCVVnY4y6rYdm7dulVMSoOLJlOJUQL0RHpll98=; b=qgXNIR8wAXAwWAJ6ChzaJEDc385w5xU5sTXNBOhucQiH7k5wNMoSwB+UxHaKcZZca9 9krr/Mg5miP2No270CtLt0pKUNXHRG8hI/g7x2kFsYLe96seFldobIDrg95T2EzxCE9p XRcO2Z2AZn2ZC5h6pCCyeoVQ0o1xSti1hCS6pAbqo74OKoOjaplPCCkzhhWK32Uxn8rz hPk7hBPwY29iCrn+8fgA85kxNCEWwJJdCtLAyOtczPRP3z0Swvxc2hHaNbtjxmgQ60+K ppmTlRRcp5OlWHj1x4Qp+HCuM04ogniDaKSHnU/V/AnzwsMCJL5OqEd6kdoyzaEL7fqu 89eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references :organization:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date; bh=4ZZv5xCVVnY4y6rYdm7dulVMSoOLJlOJUQL0RHpll98=; b=Lrc3jH/uvZRTccM8PwDItKhrOg22nXppBQKB0IsLJlOkHlnAsbTYKz7t9SIGWVJW2B lAKjMJCYBk6b9J3GLlwlkRmpN3Tmfj/EJeGDPf5/hafXaiyXUd0/ExsnRrsF55xwELiZ yiIiymh2cdtCQGbbg1WkL3xPirctE5EMXVOlBvEEpmNUKv2qW+e7uw77AlA5XOCy4dlH GhgFKOemeEZiLyB+XuxAtcp6H9K3FMeIeBdXgkYaP2QxN3vetO/LOixh26Hae14wdCmG 477Ppq8NsL6RKYtFhHcfl/BJEuPS9vnvX+91DBj57Mmhd2u81FmcZPlFXnuLCcILAVBD YEJw== X-Gm-Message-State: ACgBeo2arZMlxxvAjcd7bpJkOz6z3ec+ibGjh2CsYTxCTYMLE5Ejk+cW 86oAprrLQ6q/T5YReu/y1L0= X-Google-Smtp-Source: AA6agR6yJVHuuaqQSsevIAm5TLHRMUDcbyGPp84h0+Qeu7rIxl3UujxKPvj36ABCMA9af+8S+DeYlA== X-Received: by 2002:a2e:3e13:0:b0:26b:e6f1:ce14 with SMTP id l19-20020a2e3e13000000b0026be6f1ce14mr5735525lja.454.1663056951361; Tue, 13 Sep 2022 01:15:51 -0700 (PDT) Received: from wse-c0155 (c90-143-177-32.bredband.tele2.se. [90.143.177.32]) by smtp.gmail.com with ESMTPSA id p39-20020a05651213a700b0048a9e18ae67sm1554255lfa.84.2022.09.13.01.15.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 01:15:50 -0700 (PDT) Date: Tue, 13 Sep 2022 10:15:48 +0200 From: Casper Andersson To: Nathan Huckleberry Cc: Dan Carpenter , llvm@lists.linux.dev, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lars Povlsen , Steen Hegelund , UNGLinuxDriver@microchip.com, Nathan Chancellor , Nick Desaulniers , Tom Rix , Horatiu Vultur , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: sparx5: Fix return type of sparx5_port_xmit_impl Message-ID: <20220913081548.gmngjwuagbt63j7h@wse-c0155> Organization: Westermo Network Technologies AB References: <20220912214432.928989-1-nhuck@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220912214432.928989-1-nhuck@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220913_011558_522144_CBB90B85 X-CRM114-Status: GOOD ( 14.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On 2022-09-12 14:44, 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 sparx5_port_xmit_impl should be changed from int to > netdev_tx_t. I noticed that the functions that assign the return value inside sparx5_port_xmit_impl also have return type int, which would ideally also be changed. But a bigger issue might be that sparx5_ptp_txtstamp_request and sparx5_inject (called inside sparx5_port_xmit_impl) returns -EBUSY (-16), when they should return NETDEV_TX_BUSY (16). If this is an issue then it also needs to be fixed. sparx5_fdma_xmit also has int return type, but always returns NETDEV_TX_OK right now. Best Regards, Casper _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel