All of lore.kernel.org
 help / color / mirror / Atom feed
From: willemb@google.com
To: Jamal Hadi Salim <jhs@mojatatu.com>, netdev@vger.kernel.org
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
	Jiri Pirko <jiri@resnulli.us>,
	 "David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	 Willem de Bruijn <willemb@google.com>,
	Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
	 linux-kselftest@vger.kernel.org,
	Alexei Starovoitov <ast@kernel.org>,
	 Victor Nogueira <victor@mojatatu.com>,
	stable@vger.kernel.org,
	 syzbot+0054fed3dc9085390f51@syzkaller.appspotmail.com,
	 shaos <shawnq1@163.com>
Subject: Re: [PATCH net v5 0/2] net/sched: act_gate: bound the cycle time and start time arithmetic
Date: Sat, 05 Dec 2026 22:07:10 -0500	[thread overview]
Message-ID: <willemb.39717ede7cc4d@google.com> (raw)
In-Reply-To: <ACT-WEXM.v5.r0.20261127063407@mojatatu.com>

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




  parent reply	other threads:[~2026-12-06  3:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 11:43 [PATCH net v5 0/2] net/sched: act_gate: bound the cycle time and start time arithmetic Jamal Hadi Salim
2026-11-27 11:43 ` [PATCH net v5 1/2] " Jamal Hadi Salim
2026-11-27 11:43 ` [PATCH net v5 2/2] selftests: tc-testing: act_gate: cover the cycle time and base time bounds Jamal Hadi Salim
2026-11-28  0:38 ` [PATCH net v5 0/2] net/sched: act_gate: bound the cycle time and start time arithmetic Alexei Starovoitov
2026-12-06  3:07 ` willemb [this message]
2026-12-06  3:20 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=willemb.39717ede7cc4d@google.com \
    --to=willemb@google.com \
    --cc=ast@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shawnq1@163.com \
    --cc=shuah@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=syzbot+0054fed3dc9085390f51@syzkaller.appspotmail.com \
    --cc=victor@mojatatu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.