Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1001932iob; Fri, 13 May 2022 19:13:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqPvcunz5XWFdcWkPWbJ5A3GPcO/BcHtfYGgDKqb7YQnLfApd8wUAcOCnUOPyZ3tBZm2qN X-Received: by 2002:a1c:35c1:0:b0:38e:c4f6:1931 with SMTP id c184-20020a1c35c1000000b0038ec4f61931mr6868817wma.161.1652494415588; Fri, 13 May 2022 19:13:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652494415; cv=none; d=google.com; s=arc-20160816; b=zVtsb2lLsDW2RdfS8ir2Tfwdfz0C/LwYdaE1zp5gVj9Zv9rCH0yUzed3cmwSQDBSmd IPNQT8MmIJFMHY6CsBcdC17oa8GUoCc0K7Y++Tcj//gZlPVQEtyND7PpWPKMnLSyDpeP msxFH8B+h6gMhJGZq5ySAe10hoE+BJU//xQJ90lWSwLY4r69W7mxGm/VnFCB2O48s9E0 asgHXQzJrdOM7q63Qp8/FQYjBJVFNxKzZyCOvCpzbCMizL3q2FvLC0qH88D9Ct5wrs3e CE6KFm7n3PzeyuRQ9DOU7qu1rXe1mJkjcuYaRJc4tW5Hl2znJCpAK9LRw1PR7zU84z95 wgcQ== 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; bh=dfn/Y9/Wbb9VNx7Kduh2hry+a0SU8SDZCdBT7lWn3FA=; b=m/4x2LZ/3nK9+hbO4C8gbf2Kb/5+xDhfl0S+qJ1RZbVMwBMtzpin9tjsV4T54jMyxe A3BV4w9GslsnX/yI6Hh4nYFd/tKz1P3vX48r623SAjOlOr/Rt3hqEZY+HSgby3kybVB2 8/xFQmWIlxqqX1yCcAFpPQ4td6FnuGq1GQ9hYBBOjlfDV72s4qywUdvCsAYwV5ehfTOB +zwBGXSPpvGJD0JiHvg9tQL3NxYea1L+kKP4YlQ8v635Y07DlJ54DkHpdUnYQMYMSlMz zRyfLIRU41feBAiFcJBsfily4Nk4IDc7DP98pKqADyIhnVEu06thr1hdewxk2J/b3wC6 3l1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c12-20020adfef4c000000b0020cdd1ba5fdsi3488719wrp.307.2022.05.13.19.13.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 19:13:35 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A01C531569C; Fri, 13 May 2022 17:31:31 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381101AbiEMOoC (ORCPT + 99 others); Fri, 13 May 2022 10:44:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382845AbiEMOnS (ORCPT ); Fri, 13 May 2022 10:43:18 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC9E72127A for ; Fri, 13 May 2022 07:42:34 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1npWUy-00006s-Jy; Fri, 13 May 2022 16:42:32 +0200 Received: from pengutronix.de (unknown [IPv6:2a01:4f8:1c1c:29e9:22:41ff:fe00:1400]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id 2CB777DB54; Fri, 13 May 2022 14:42:31 +0000 (UTC) Date: Fri, 13 May 2022 16:42:30 +0200 From: Marc Kleine-Budde To: Vincent Mailhol Cc: linux-can@vger.kernel.org, linux-kernel@vger.kernel.org, Max Staudt Subject: Re: [PATCH 0/2] can: drop tx skb if the device is in listen only mode Message-ID: <20220513144230.upuirv4ufebxvfbq@pengutronix.de> References: <20220513142355.250389-1-mailhol.vincent@wanadoo.fr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gqifvyadwdcbjat7" Content-Disposition: inline In-Reply-To: <20220513142355.250389-1-mailhol.vincent@wanadoo.fr> X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 --gqifvyadwdcbjat7 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 13.05.2022 23:23:53, Vincent Mailhol wrote: > In listen only mode, tx CAN frames can still reach the driver if > injected via the packet socket. This series add a check toward > CAN_CTRLMODE_LISTENONLY in can_dropped_invalid_skb() to discard such > skb. The first patch does some preparation work and migrates > can_dropped_invalid_skb() from skb.h to dev.h. The second and last > patch is the actual change. Thanks for your quick patch! What about moving the function to a .c file? The can_dropped_invalid_skb() grew a lot over the years, since it was added to the header as a static inline function. Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --gqifvyadwdcbjat7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEBsvAIBsPu6mG7thcrX5LkNig010FAmJ+blQACgkQrX5LkNig 012Bigf+OBMnCULTQxKU9B8Mkb6CCPhadQ7XNbJ+RbQVPcOSTdDHr1dK3PslcrGE dBtCKgNBXwKAPNyv6Xkv7WgcDcXXlHbik92UexT3q3dm8By1DtymBQ3SoK+jZ6Aa CANx8blpS7Pv+GFqS3gl4F/1s9/Uoq6k5oLEhp/ZCbfSuJD9VaQxgMzDFWWU0SRC eWoB790kCRAS7SqPUyfuPM1NCrvCSMKVoU0slhCiz2GS78sTWzxVJ4x05K5GqUTt yd0+zimmi/LFZ75ou2UqWtzbXtxav/35+N3lOotJMLCDkddyYHd15dOB0T2qULPk rCDvBHYOsHzQqXHssnoBmkFoYC55pQ== =PMY2 -----END PGP SIGNATURE----- --gqifvyadwdcbjat7--