From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF431438024 for ; Thu, 6 Aug 2026 10:12:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786011149; cv=none; b=pgV0D8EH/1Km2eD4ifJvM1/tDlmzSMVEKoUiTelUKdwVXi2dPVycBWFq9WwAXeQJuRJrlMNELB2++tEwt80ZeV8gDcHj/JdjWQNQJqNnufUNQX2Gcsk5hSRgzqIbOwh4swxJF4PAdAK0OdawN2gMScxm7yW67BuKriR668dGijA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786011149; c=relaxed/simple; bh=aAq9lw5aq8RYaL0xpQ9nQVP3sTZFy5k1cgm4NiwNvCY=; h=Message-ID:Date:From:To:Cc:Subject:In-Reply-To:References: Content-Type:MIME-Version; b=YHJpROs+8K/Min5lGgCqPwhFXeM9+cLlmREvTiPnJgIGvtqZcOxHzrac4fmknFWFA9bEycfz+n6XXnak1ShGcs3oIr8TsWOLQthKL1hOdUj8kok1vvUuXqnRoQfog9OIDuBWptK1R7T9ojeEJBBHdI3CfCiuTwfsb2qPM0EzyHc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IIN8v/6C; arc=none smtp.client-ip=209.85.216.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IIN8v/6C" Received: by mail-pj1-f49.google.com with SMTP id 98e67ed59e1d1-38e3efab7e0so712609a91.0 for ; Thu, 06 Aug 2026 03:12:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786011147; x=1786615947; darn=vger.kernel.org; h=mime-version:content-transfer-encoding:content-type:references :in-reply-to:subject:cc:to:from:date:message-id:from:to:cc:subject :date:message-id:reply-to:content-type; bh=jwPvnHnNY5KtRjTEjUBgn4OJzPCZ/4RYDCW24QvykqE=; b=IIN8v/6C4BEiG9q/kFVn8sCM9V5dCbNxNnoO0XJhBh8joCTEPKAO99FcjoOPH2Oyz9 CCj1FS40sRVASW1UQkXQcje28MV+YschIUcQiam4zDZo3mU40lvV47fd3TFHYhv9QALE vMk0qH/9QtQ6uu9313qfIra3E9ocqS1xj+XiGnj1j8q6ezXu2kdQ+kDGG2gP3nyazOIY Mi/FUXMBEkzKtRBLnN99P53eL+rIINj6vrwxEzM3JklDmf4p7C/cisPBwO6n30pUr4je pdgV65WWCRbNZZbUaC78Xgo3ZLt6lWE5bVL+NpWXatUW3NtoXiFneHssZGkvLKZuvQwd 7A+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786011147; x=1786615947; h=mime-version:content-transfer-encoding:content-type:references :in-reply-to:subject:cc:to:from:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=jwPvnHnNY5KtRjTEjUBgn4OJzPCZ/4RYDCW24QvykqE=; b=Jn86hefSxS3FzL31qm/59gDABzezGbmORmUTsmboxi8Nu3DOc/pMMMOnLjUVnE++m/ 3hdz1hbdhwY924uxu1JnNVzrAdgmj7I/3Z+Si4iSRvtOISXW4ZXjw7xgj9vsrNbMww7q R5057S+0KvpBJUvOZ40sOBZ4dnNod+FBTuZaox8XcvjOvzW7kTsDjjZsx5lCfc8AMmKg VUMyjZpIDnO3NihCweCDLrRkVyNsAAZqBVpeha/avyR4BVZuhDWBR30UijH17nV325k4 JBygsJtTkmvugd7ID2v6dfRRSdGhNIEUqkmia+loA/1iIuz53FyxP9kwCDKnPBxEQyaa mKbA== X-Forwarded-Encrypted: i=1; AHgh+RreQu8R12Z0/DkgpVHn9qvT/KwDYAizfnnJ7xDaHAVKBqttc76XNvsHvtoPGseB7zkQJqEBkT0/V0g409k=@vger.kernel.org X-Gm-Message-State: AOJu0YyLZfwQxv2a00852AOhU+z/Jx1nT5tLmrWtrURc2PF1//cBp8vP J0fN9A0mIzpO5wJHWgMeBLXvv1dJRlsmGlpkWtYDN459bauMpkvf6b+n X-Gm-Gg: AR+sD13vm1bqOeFTgMSdYdrvJ44ZJe8lDYvS57d39Z9Dm/NWVO2DtOv/tss5CpIMNvr Hqc9SVYvSg+pMVDdtOA3OnTcZimE4oNZL5nAPbKsrx6SyojWybwrliAWLtSKalK2n1/GkJIZqaP NYa4MIF+GwsP7FJQjZxmmYdQJ3fCBrHNaS0LcuZJ0vgk8NfPvyDDrq4C4ciTbNYwLHKtxhQk1fY kIHuNwxLrm4KiR3Tk6ZZ/ssEwdVzAJdna6wuQETgnIr6kILkMJuBKIZDYzRne0VfspHnTHtCi1S 6+kEyqMf58jVwZ48Mh2fZV8tPNYLOOhSTZ/oSkhyF4VmTNbXJVIEdlQ6sL9fyIgwmGyAgcrX1/F PMyuAaLXpgQrOQhe4va2O6PyBEjkNNZxEb0gCf7m3nDGMhLTXKY5HZmNu/fkDl8uXIqP2L9lDwI 5sZMruDryDWQp0wgCpCTHX2nzd85Tgiblnx5oQW50NNdDfiijjQx9Y/naUxlpR1nDve2kmCeNS6 PsbhY7wMLbDfP+sYtFdvXVnzRMobeIGO/MVXpTxnP1mW5SCMg8= X-Received: by 2002:a17:90b:2d87:b0:385:3ab:fecb with SMTP id 98e67ed59e1d1-3908972ccc2mr1351738a91.4.1786011147110; Thu, 06 Aug 2026 03:12:27 -0700 (PDT) Received: from BOOK-P74QMIQ7E8.localdomain ([220.73.18.179]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-39086164982sm1229297a91.16.2026.08.06.03.12.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Aug 2026 03:12:26 -0700 (PDT) Message-ID: <6a745e0a.dde95cf2.1d436b.2244@mx.google.com> Date: Thu, 06 Aug 2026 03:12:26 -0700 (PDT) From: Hyunjung Ko To: Jamal Hadi Salim Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Jiri Pirko , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] net/sched: act_gact, act_police: range check the fallback control action In-Reply-To: References: <20260805095527.204088-1-hj351016@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Wed, Aug 5, 2026 at 1:59 PM Jamal Hadi Salim wrote: > > 1) We test almost _everything_, so to get a review - even if it as > trivial as this: Always, always send a test case to reproduce even if > it seems as obvious as this. Preferable will be tdc. But you can send > or point to an AI generated poc as well if you cant ask it to create a > tdc test. If the issue is sensitive - send the poc to the tc/netdev > maintainers in a separate email. > > 2) If you got assistance from an ai - please add assisted-by tag. > > Same goes for your other patch... Thanks for the review. Both points addressed for both patches; v2 of each follows shortly. The act_ct patch now comes with a tdc case (2/2). It uses the scapy plugin to inject the malformed IPv6 frame and matches on the clsact drop counter, which turns out to be a clean discriminator: before the fix act_ct returns TC_ACT_CONSUMED, so tc_run() never reaches its TC_ACT_SHOT arm and the counter stays at zero while the skbs leak; after the fix it reads "dropped 10". To be straight about how far I verified that: I do not have a scapy-capable tdc setup, so I have not run tdc.py over the case itself. I ran the equivalent by hand under qemu on both an unpatched and a patched kernel - same topology, same ten frames, same tc -s qdisc show - and got "dropped 0" vs "dropped 10". The JSON is modelled on the existing scapy cases in the same file (3992, 9c2a). Noted below the --- line of 2/2 as well. This patch I could not express in tdc. iproute2 only parses symbolic control-action names, so tc(8) rejects the bad value before it ever reaches the kernel: $ tc actions add action gact drop random determ ok 2 RTNETLINK answers: Operation not permitted <- parsed fine $ tc actions add action gact drop random determ 9 2 Bad action type 9 <- rejected by iproute2 The fallback has to be planted over raw netlink, so I have inlined a self-contained C reproducer below the --- line of v2 instead. It sets up the clsact chain, plants TCA_GACT_PROB.paction =3D 9 and then TCA_POLICE_RESULT =3D 9, and reports skbuff_head_cache growth per injected packet. If you would rather have this as a tdc case anyway I can write a plugin that does the raw netlink setup, but that looked like more machinery than a one-line range check warrants - happy to do it if you disagree. The AI assistance tag is on both patches now. Thanks, Hyunjung