Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp988649iob; Fri, 13 May 2022 18:45:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQYaq9TYjrjpci7Y2bAv++oWHwoBkIbMaCnba1d54XS9j1J9Fbp3kcmadj2P0pABDvRdBr X-Received: by 2002:a5d:690c:0:b0:20a:d9d1:f5ce with SMTP id t12-20020a5d690c000000b0020ad9d1f5cemr6022998wru.295.1652492709875; Fri, 13 May 2022 18:45:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652492709; cv=none; d=google.com; s=arc-20160816; b=R9zyqpXWcP9zBqxbsRbxC/mxSju+i6EGnHfB45WigDVPXUkA40we2eOPOosDUK6/F4 liq/wVH5JW3nzVrWfBGuQB0le6o2IMgrGOOdELfkviE6klKwVyhuIPF75w5K+KvNx7+n FAOCJOf288aV+/19WhIMk9ivw8HEKVpOWaCei3Ij0CIYESd3BjkDnh/kfOA6q/Xcd6En RtOwXrXFTityDwEP0NpqaDVRgyNkpPL/QzQceror11YXGAxlgoeXUH5mLEFAFeaACH58 z3/WS6G9lwG7jU82hQ9WDj+oX+VawJv93zqD3nh5GqAvVNSXt0LqZJnL4TwP2CuWVlza ZZAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=FmZIoJGMrKtmX8tYXoWBlj/vP3BEUHY+bCqtu7SbDdQ=; b=GEAeli34m3UjzHqR5nA7VBN67d6fUvkzX7RcGeL/uQ+lP4NyVhaglp4++thIM9JmiZ Lfr/HseOwIGUxKSrROs+zk5GqMFaGXQyAT1YYnLL6XcCPGCguXxq3OA28vq+LK/lAq2c EZXthRAWmmM3F5E1oNGkCebm9v8NhBh1ruqfnhQGiX0wy9GS/T3OP0gG2bDmLrYh7SvD Okv3z+Z/RInNqQH8e6QLfT1l3M6x7Wm+K8CSejIDihQRbIWYKUWv1Ewdkr0X8zUF/wWm GQmuoIh3mw8LL9hPYSihgi2ZrLMVB6YbIaPstegmMzszJ61On7BQoRseseIzOpOZS/36 Fl5w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id o2-20020a5d6842000000b0020aa9a24b54si3093992wrw.929.2022.05.13.18.45.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 18:45:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 D0C78434D93; Fri, 13 May 2022 17:10:16 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381425AbiEMPUw (ORCPT + 99 others); Fri, 13 May 2022 11:20:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381888AbiEMPUt (ORCPT ); Fri, 13 May 2022 11:20:49 -0400 Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com [209.85.128.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 735A466ADA; Fri, 13 May 2022 08:20:48 -0700 (PDT) Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-2feb8eac315so15970627b3.3; Fri, 13 May 2022 08:20:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FmZIoJGMrKtmX8tYXoWBlj/vP3BEUHY+bCqtu7SbDdQ=; b=eRYvIy7JEGU/KpzqugeeAqcLMcWuKZc37MPdyj/9ElGSMFt+6yTo9/NQjhbIySLtAt DtX4OytyLtMt9Q5ZXWhqVcYYvibTRbpCcf48beDpxKZ8wqCs1rtb5WCwRZyCZMosCrQ8 W03jpy++9P/f+ar+eFEAPFQIDyXrz+56i9qffinJA6Qf4NwdF+6Hj4mIRUhynxYWcug2 3uPilDkpbcWm4PomotAycbxGyZDVh/f4UN52vB0uPwP3tWreQtff0wnXqvtOdQy3+TNh sxrvC3YscRZjw5rW3jyIi1OqH01sQEVjWu3sr0nSjcfnvjI4ZBaG0o7mlPKEqkIg41IK ZnqA== X-Gm-Message-State: AOAM5313Ehpt/L7AUPs2RlGaUh4/ls53mAo/miaU1Vq/lAvAqMwCMr0G cvQds8K5haGXSzhUHq6UiZssvipvkd5vhGK+Z+k= X-Received: by 2002:a81:34f:0:b0:2f7:bbb1:1576 with SMTP id 76-20020a81034f000000b002f7bbb11576mr6303681ywd.45.1652455247642; Fri, 13 May 2022 08:20:47 -0700 (PDT) MIME-Version: 1.0 References: <20220513142355.250389-1-mailhol.vincent@wanadoo.fr> <20220513144230.upuirv4ufebxvfbq@pengutronix.de> In-Reply-To: <20220513144230.upuirv4ufebxvfbq@pengutronix.de> From: Vincent MAILHOL Date: Sat, 14 May 2022 00:20:36 +0900 Message-ID: Subject: Re: [PATCH 0/2] can: drop tx skb if the device is in listen only mode To: Marc Kleine-Budde Cc: linux-can@vger.kernel.org, linux-kernel@vger.kernel.org, Max Staudt Content-Type: text/plain; charset="UTF-8" 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 On Fri. 13 May 2022 at 23:42, Marc Kleine-Budde wrote: > 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. OK. Will also migrate can_skb_headrom_valid() which is only used by can_dropped_invalid_skb(). > Marc > > -- > 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 |