From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.219.69 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796526433; b=LS+zHnpJ5eN1vmDeUIhXk9fUX4N4KnLG5AAUlW1xTiemsmCts4j7M1SLCF13WM+2Tzk8 YCEzCNUtCIYPQ97fGfr040SQQ1Qy+AyXB36OUO1QDX4QBTe+Fa8eF5/rpu1v0XE8iiq2l 1bhG9nwW5Wl9A9XzRDvE/4UEptJ8lE4rL/KJJCg/9s+cinBqVGn48TvkwATrveAQ8WbW/ a1fUZyg5X+Vi17HXzL2n83smZBL5SaG6+3jmEhG+dDbB3hD6Db1zMErwpCqp5iHiXmm3g V3VIQ8GE+3Sv8a3pERYUyf0vVayHIhaEJ3Ydp/dLKX9+s9U24c0qi8TBPQJ5K8JW0hA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796526433; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:Message-ID:Subject:From:To:Cc:Content-Type; bh=0YzxPs19jnex2v1vpWMtnyn2Cycr8F5m+6Mq1uQ84IU=; b=MIl968Hr+TvZ1D+3dCON9L768woAXBsiiU/pGwIDB1xqx8U/pkifNNfQvcyHuD2a7zT1 jUwu13l46Punkg8/gXdW9+rdZpv69bI2pPBK43JNOge/ce3uCs6CZkgIY3UYU/3x/1ckx mI66DTmUvqiyOeXYtuy/PRCIImdP+qQ9SwEd2Lfh544RHbR6Z3MxyVDEjaum/3qIMFT/P 06UbKigkFnJmP5bstvVdRgzuaNqFXtHyXlsRvzPIek3FNYsefkRtHtTsEhXUAuLKF+HfX 1Rq8+mIKaofAwv6N/UH1KFSSrF9TIgaAKT2dMTh8C3fx/IJM1v4k3nNc3ll34KJUnbA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--willemb.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=kcjWbPr0; arc=none smtp.remote-ip=209.85.219.69 Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEFB5606A321 for ; Sun, 6 Dec 2026 03:07:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DEFB5606A321 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--willemb.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=kcjWbPr0 Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-9212335e257so46933526d6.3 for ; Sat, 05 Dec 2026 19:07:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796526432; x=1797131232; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=0YzxPs19jnex2v1vpWMtnyn2Cycr8F5m+6Mq1uQ84IU=; b=kcjWbPr02BSPNvICM6SMybGovbqztSw0uOxyBjWJFc/y1O+Y5fIzlhv5dvw0Fg/rA4 JeU1clkgjhJlu9jiuz0FLGBDPcsT3p8R2Lk0qjt+ycT0gUHhqyV1GstBueR9nPbxAde+ hwjSrAM6Ujb4y4qDPDehZRrskiKVVZzi0Fb4Q06CRAj0sHVOfEF9Z/AUupXKRLA3DwfT xylGfrGS7WEY5VELYVoWJ8KDUSZGWaGAWIWKHUb99wdoEEHdZPQwGUYLrwt99ZSfPRWY tn4qx00q+Zs4xV/67NvNAE7CwhlmD4oosNuQRuetdWJOiECJbzfUPWKymI4xHwQnR1/4 zcNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796526432; x=1797131232; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=0YzxPs19jnex2v1vpWMtnyn2Cycr8F5m+6Mq1uQ84IU=; b=X3JGhSbLpN+Lm18TMW1+LhjK13hEI/X4f6BLCgdzrudlqs5te1aSomr/ZExhCEN5vG Svv5PiGylX2et/DzsGDMjPL7rnrL30CqL0gmdny7WyvbiJ3w4egrMkx6C1r8NJo0hi7H 6aKz5xBTcoKGy0xtJh/7bg/oqwtYzepdB6UN5vVwItzxKHbexGBY0aoruVda5OzeswXt DM44zlYMKWPZtl8lnJzeTcaguCjz78vVwhInPL8phNikIWdp76WcMLVqpgy708JVDeAo sy3Gi88YB3UT9I2vy4N7j0+ygK09xnSRLazQE4c/Kc3QDq3hZSk3kPxgckBRDenSS2oR rlBg== X-Forwarded-Encrypted: i=1; AL+hErEuDwcVB73fZ9Rdri8yayd4jKcsyQm23zk+QRC3hMlIRF9P+4SMYPqyXws8glvJ9ey0Ylu0CSE=@vger.kernel.org X-Gm-Message-State: AB4q+uFuSQx/mD4jPWj2r6hF9lyfRB0yRlIGH3+eTQmxVEYCipUE43ky /2Vp/dkrM/01xUbiCwhfV/D42j/cVDu59dlJPiBpjMMNQG3S59uDE/8RlY3CvRia6J2wq3xTboQ garndiUeafw== X-Received: from qvbel5.prod.google.com ([2002:ad4:59c5:0:b0:921:101d:2262]) (user=willemb job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6214:519d:b0:921:d76f:1fe7 with SMTP id 6a1803df08f44-921e245ced3mr100827426d6.26.1796526431688; Sat, 05 Dec 2026 19:07:11 -0800 (PST) Date: Sat, 05 Dec 2026 22:07:10 -0500 In-Reply-To: X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 References: Message-ID: Subject: Re: [PATCH net v5 0/2] net/sched: act_gate: bound the cycle time and start time arithmetic From: willemb@google.com To: Jamal Hadi Salim , netdev@vger.kernel.org Cc: Jamal Hadi Salim , Jiri Pirko , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Willem de Bruijn , Simon Horman , Shuah Khan , linux-kselftest@vger.kernel.org, Alexei Starovoitov , Victor Nogueira , stable@vger.kernel.org, syzbot+0054fed3dc9085390f51@syzkaller.appspotmail.com, shaos Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes Jamal Hadi Salim wrote: > The cycle time and the base time are read from u64 attributes into a > signed ktime_t, and the cycle arithmetic built on them wraps when either > value is above S64_MAX. With base_time = 1 and cycle_time = all ones the > timer is armed in the past on every expiry, so the softirq never finishes > and the installing task soft-locks the CPU. > Neither attribute has been bounded since the action was introduced, so one > request is enough to stall a CPU on any kernel that has it. > Patch 1 bounds both attributes at KTIME_MAX and computes the next > boundary with ktime_add_safe(), so an unrepresentable expiry saturates in > the far future. Patch 2 covers the accepted upper bound and both refusals > in tc-testing. > The 10 us schedule-entry floor from the previous posting is a policy > change and moves to net-next; it follows once this series lands, and is > not > part of this series. > Changes since v4: > - Split: only the regression fix and its tests are here; the entry > interval floor and its test cases move to net-next. Applied the fix to net. Please include the test in the net-next series. > - Conditions states the user-namespace route through a filter, which is > the minimum privilege that reaches the code (reported on the list). > - The test cases match the kernel's own message on a libmnl build as > well as the strerror text, use deterministic signed values instead of a > 2^63 decimal whose conversion is architecture dependent, and assert > the stored value instead of only the index. > Jamal Hadi Salim (2): > net/sched: act_gate: bound the cycle time and start time arithmetic > selftests: tc-testing: act_gate: cover the cycle time and base time > bounds > net/sched/act_gate.c | 34 +++--- > .../tc-testing/tc-tests/actions/gate.json | 108 ++++++++++++++++++ > 2 files changed, 127 insertions(+), 15 deletions(-) > -- > 2.34.1