mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sechang Lim <rhkrqnwk98@gmail.com>
To: Tejun Heo <tj@kernel.org>
Cc: David Vernet <void@manifault.com>,
	Andrea Righi <arighi@nvidia.com>,
	Changwoo Min <changwoo@igalia.com>,
	sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched_ext: reject oversized exit_dump_len
Date: Tue, 24 Nov 2026 16:11:16 +0000	[thread overview]
Message-ID: <awW3JGUuyom8oG04@srsys1> (raw)
In-Reply-To: <07a90f0f36c010fffb626a80b6275772@kernel.org>

On Tue, Nov 24, 2026 at 04:05:29AM -1000, Tejun Heo wrote:
>Hello, Sechang.
>
>On Tue, Nov 24, 2026 at 10:05:03AM +0000, Sechang Lim wrote:
>>  	case offsetof(struct sched_ext_ops, exit_dump_len):
>> +		if (*(u32 *)(udata + moff) > INT_MAX)
>> +			return -E2BIG;
>>  		ops->exit_dump_len =
>>  			*(u32 *)(udata + moff) ?: SCX_EXIT_DUMP_DFL_LEN;
>
>Maybe read the field once into a local and test that?
>
>  	case offsetof(struct sched_ext_ops, exit_dump_len): {
>  		u32 dump_len = *(u32 *)(udata + moff);
>
>  		if (dump_len > INT_MAX)
>  			return -E2BIG;
>  		ops->exit_dump_len = dump_len ?: SCX_EXIT_DUMP_DFL_LEN;
>  		return 1;
>  	}
>

Sure, will do in v2.

Thanks,
Sechang

      reply	other threads:[~2026-11-24 16:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 10:05 Sechang Lim
2026-11-24 14:05 ` Tejun Heo
2026-11-24 16:11   ` Sechang Lim [this message]

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=awW3JGUuyom8oG04@srsys1 \
    --to=rhkrqnwk98@gmail.com \
    --cc=arighi@nvidia.com \
    --cc=changwoo@igalia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sched-ext@lists.linux.dev \
    --cc=tj@kernel.org \
    --cc=void@manifault.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®