Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp15333954rwb; Mon, 28 Nov 2022 10:19:14 -0800 (PST) X-Google-Smtp-Source: AA0mqf5/wkVw3U1Z/iGY3uZ582UAHnrYYQbusgrQNVq4oir84lkPx7kk/o0DRBDzCKKDp69qH636 X-Received: by 2002:a17:903:cc:b0:189:7441:1ada with SMTP id x12-20020a17090300cc00b0018974411adamr13129653plc.13.1669659554390; Mon, 28 Nov 2022 10:19:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669659554; cv=none; d=google.com; s=arc-20160816; b=c+g5p3XhtOsEfH1ktLhiPGJMqwu6rsm3xmcjZa6QTLanxbStpRzSlPw4I7Niqn6G74 CaR5xrLObviXHDJ3F8ZR8iLqujNPkVeI+/a34Fd+wUp40ysZgv3S+c3CyIZy1ri1HvGd Cp+SGVEVIuON5RD2x/DGIdy0idEKkf9bUbicuWCqpSx1K9mJ07+c1n/Fn2nYOxrhNn/Z I5LA98SoEg9xSvGME4iK96tADlVo79edsmwaT1JoqyjmFbhYmkZq2Q6aW/wHYncRsLsS t7tOYiCdCmQ8rg3giRGFNtV3peTpxCVReWfyLg0Mz6eFTxXoBHYHzOVo0pfn3A5wRsRR SXcQ== 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:dkim-signature; bh=N6OhLlFi8ozmHLPRySaIAeogD5ZelvXE92J+b5DNQxc=; b=Xb5TZcYApWFGgz7gsYgp+UcxdUwSGo80ZYZwC85huJzAJHwyUplONSNeUmsrT9gxyV E9RNod2pb4B7waZ0tPuHnF9j9Wv+F3mVlWWmRiz9l3pN0h/jmOnGqsQwxEg95o7cbV3f pCQt4d7Xirlk7F3Vok4jITLegrZOEZIRS6DyC+SCpD+CJHysJZrXofiDBanIr74wjaVv 7khLVZrlt7rV8XbZzzAzIXNY9XCUs7Afhln9tUgGRlW64eh1FPttQ7kRsoy+ivdhZVMB LOi8TiU8l3MkwDziCRtjXEXceYg0lpObRDmifcxdeX7dhM2i+NzR91+26K5kvd+96hum G+FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ivan-computer.20210112.gappssmtp.com header.s=20210112 header.b=vgVTjesr; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y25-20020a634b19000000b00476e845a78bsi12098179pga.126.2022.11.28.10.19.03; Mon, 28 Nov 2022 10:19:14 -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=@ivan-computer.20210112.gappssmtp.com header.s=20210112 header.b=vgVTjesr; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230419AbiK1Q5b (ORCPT + 84 others); Mon, 28 Nov 2022 11:57:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231558AbiK1Q53 (ORCPT ); Mon, 28 Nov 2022 11:57:29 -0500 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FE2A20198 for ; Mon, 28 Nov 2022 08:57:29 -0800 (PST) Received: by mail-pg1-x52c.google.com with SMTP id 6so10449678pgm.6 for ; Mon, 28 Nov 2022 08:57:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ivan-computer.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=N6OhLlFi8ozmHLPRySaIAeogD5ZelvXE92J+b5DNQxc=; b=vgVTjesr+9HZ/5Oz1M7G+xtgXK3Rat5iRcxIfjMIxG7/5h9r4OsUM3/T8+TmRONIMP fizpEZcOikI0v9ixw+cfsc/Ll+C09CeGhVu3PAyNFS+TaYW323zV/w6iSVSKzArJ8F+6 XJzOFzseiUEhs06iqPlLpcw3fE5VGJXQ8g/Y0PGyqyqHlyZGjtlzo0IbvXHCTe6lHXX7 i6MFOJm49nkyli+RQLpm+x/rcoAE/L8L/rYIkv2QKeAyo01qlsY2N98QoQqCnntGor1P nEboZ5sTJG8oyDfNk3BCC56H8eX3YVtfwIOGOGJjwfKpgwz3vd3aad7nA7JWLXjE5EQK 07TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=N6OhLlFi8ozmHLPRySaIAeogD5ZelvXE92J+b5DNQxc=; b=H37h7J/xIbW1GIe76eFPlfQciKsZ5KZvl8noY1XFCN7mfCK/bLTLQspSK1xS6v8j3x mijbpEIgQgKDD0oCNL7r5IiOXik+Nrf4M2741vdv5fZMWWEGqT8BfA6vvnKB7T03NDbR i6C+I0UIOdqdFoLaoDYo2kwLOZZUeVvQRbT3CGNGR2RxPFQyzZu8ko+Ne9VeOgFmyX9R RW+hykmeC3U+5lNDl3r+lPP0c0dzFX1A/G/0ciP3Ls1/vt+1mZ8A7cCS2G/alj4sGMdB 7NDPcVHHly9IDz9YcqGURZ7JFSmJxVtTKjdd5oV6G3toqy8Pwcb1eV1u9jWjcDVZT0Jf aQvw== X-Gm-Message-State: ANoB5pnZYHSIBVdTqyzIvd5PmOTLs1UJq2JGaTL0rTHZF7jXL1mHyouh OANmmFTk10nydG8zQukhhIJ/6kDVBvt3EI6mEfrb2w== X-Received: by 2002:a63:554a:0:b0:44c:bfe:9b1c with SMTP id f10-20020a63554a000000b0044c0bfe9b1cmr34796043pgm.103.1669654648480; Mon, 28 Nov 2022 08:57:28 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ivan Babrou Date: Mon, 28 Nov 2022 08:57:17 -0800 Message-ID: Subject: Re: Unused variable 'mark' in v6.1-rc7 To: Pablo Neira Ayuso Cc: Daniel Xu , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE 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, Nov 28, 2022 at 2:00 AM Pablo Neira Ayuso wrote: > > Hi, > > On Sun, Nov 27, 2022 at 05:30:47PM -0800, Ivan Babrou wrote: > > There's 52d1aa8b8249 in v6.1-rc7: > > > > * netfilter: conntrack: Fix data-races around ct mark > > > > It triggers an error: > > > > #19 355.8 /build/linux-source/net/netfilter/nf_conntrack_netlink.c: In > > function '__ctnetlink_glue_build': > > #19 355.8 /build/linux-source/net/netfilter/nf_conntrack_netlink.c:2674:13: > > error: unused variable 'mark' [-Werror=unused-variable] > > #19 355.8 2674 | u32 mark; > > #19 355.8 | ^~~~ > > #19 355.8 cc1: all warnings being treated as errors > > > > If CONFIG_NF_CONNTRACK_MARK is not enabled, as mark is declared > > unconditionally, but used under ifdef: > > > > #ifdef CONFIG_NF_CONNTRACK_MARK > > - if ((events & (1 << IPCT_MARK) || ct->mark) > > - && ctnetlink_dump_mark(skb, ct) < 0) > > + mark = READ_ONCE(ct->mark); > > + if ((events & (1 << IPCT_MARK) || mark) && > > + ctnetlink_dump_mark(skb, mark) < 0) > > goto nla_put_failure; > > #endif > > > > To have NF_CONNTRACK_MARK one needs NETFILTER_ADVANCED: > > > > config NF_CONNTRACK_MARK > > bool 'Connection mark tracking support' > > depends on NETFILTER_ADVANCED > > > > It's supposed to be enabled by default: > > > > config NETFILTER_ADVANCED > > bool "Advanced netfilter configuration" > > depends on NETFILTER > > default y > > > > But it's not in defconfig (it's missing from arm64 completely): > > > > $ rg NETFILTER_ADVANCED arch/x86/configs/x86_64_defconfig > > 93:# CONFIG_NETFILTER_ADVANCED is not set > > > > I think the solution is to enclose mark definition into ifdef as well > > and I'm happy to send a patch if you agree and would like me to. > > Thanks for reporting and offering a patch: > > Could you give a try to this one? I'll be glad to get a Tested-by: > tag if this is correct to you. > > https://patchwork.ozlabs.org/project/netfilter-devel/patch/20221128095853.10589-1-pablo@netfilter.org/ > > Thanks. LGTM, it builds. Tested-by: Ivan Babrou