From: Anshuman <anshumantewari123@gmail.com>
To: kees@kernel.org
Cc: Frank.Li@kernel.org, James.Bottomley@HansenPartnership.com,
airlied@gmail.com, akpm@linux-foundation.org,
andriy.shevchenko@linux.intel.com,
anton.ivanov@cambridgegreys.com, apparmor@lists.ubuntu.com,
atomlin@atomlin.com, benjamin.berg@intel.com,
bhelgaas@google.com, bp@alien8.de, bvanassche@acm.org,
corey@minyard.net, da.gomez@kernel.org,
daniel.lezcano@kernel.org, dave.hansen@linux.intel.com,
david.e.box@linux.intel.com, dmaengine@vger.kernel.org,
dri-devel@lists.freedesktop.org, dvyukov@google.com,
elver@google.com, eperezma@redhat.com,
georgia.garcia@canonical.com, glider@google.com,
gor@linux.ibm.com, gregkh@linuxfoundation.org, hansg@kernel.org,
hare@suse.de, hca@linux.ibm.com, hpa@zytor.com,
ilpo.jarvinen@linux.intel.com, intel-gfx@lists.freedesktop.org,
jani.nikula@linux.intel.com, jasowang@redhat.com,
jbaron@akamai.com, jgg@ziepe.ca, jim.cromie@gmail.com,
jirislaby@kernel.org, jmorris@namei.org,
johannes@sipsolutions.net, john.johansen@canonical.com,
joonas.lahtinen@linux.intel.com, kasan-dev@googlegroups.com,
kvm@vger.kernel.org, laurent.pinchart@ideasonboard.com,
lenb@kernel.org, leon@kernel.org, linux-acpi@vger.kernel.org,
linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org, linux-mm@kvack.org,
linux-modules@vger.kernel.org, linux-pci@vger.kernel.org,
linux-pm@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-scsi@vger.kernel.org,
linux-security-module@vger.kernel.org,
linux-serial@vger.kernel.org, linux-um@lists.infradead.org,
linux-usb@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
lukasz.luba@arm.com, macro@orcam.me.uk,
martin.petersen@oracle.com, mcgrof@kernel.org,
mchehab@kernel.org, mingo@redhat.com, mst@redhat.com,
netdev@vger.kernel.org, openipmi-developer@lists.sourceforge.net,
paul@paul-moore.com, pbonzini@redhat.com, pengpeng@iscas.ac.cn,
peterz@infradead.org, petr.pavlu@suse.com, qemu-devel@nongnu.org,
rafael@kernel.org, richard@nod.at, rodrigo.vivi@intel.com,
rui.zhang@intel.com, samitolvanen@google.com, seanjc@google.com,
serge@hallyn.com, simona@ffwll.ch, somlo@cmu.edu,
srinivas.pandruvada@linux.intel.com, stable@vger.kernel.org,
stern@rowland.harvard.edu, tglx@kernel.org,
tiwei.btw@antgroup.com, tursulin@ursulin.net,
usb-storage@lists.one-eyed-alien.net,
virtualization@lists.linux.dev, vkoul@kernel.org, x86@kernel.org,
xuanzhuo@linux.alibaba.com
Subject: Re: [PATCH 01/11] params: bound array element output to the caller's page buffer
Date: Sun, 4 Oct 2026 16:17:41 +0530 [thread overview]
Message-ID: <20261004104741.51238-1-anshumantewari123@gmail.com> (raw)
In-Reply-To: <20260521133326.2465264-1-kees@kernel.org>
On Thu, May 21, 2026 at 06:33:14AM -0700, Kees Cook wrote:
> ret = min(ret, (int)(PAGE_SIZE - 1 - off));
> if (!ret)
> break;
One question about the truncation behavior here: when an element does
not fully fit in the remaining buffer, this min() can cause only part
of that element to be copied. For example, if the remaining space is
4 bytes and the next element produces "123456789\n", the resulting
output could contain only "1234".
This leaves the reader with no way to distinguish a genuinely short
value from one that was truncated due to the PAGE_SIZE limit, while
the array otherwise still looks like a normal comma-separated list.
Is this partial-element truncation intentional for this patch, or is
the expectation that it gets handled as part of the later seq_buf
conversion? Would it be preferable to avoid copying an element unless
it fits completely, and leave the larger-buffer case to be addressed
later in the series?
next prev parent reply other threads:[~2026-10-04 10:51 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-21 13:33 [PATCH 00/11] Convert moduleparams to seq_buf Kees Cook
2026-05-21 13:33 ` [PATCH 01/11] params: bound array element output to the caller's page buffer Kees Cook
2026-05-21 16:46 ` David Laight
2026-06-01 20:23 ` Matthew Wilcox
2026-06-02 11:26 ` Andy Shevchenko
2026-06-02 12:33 ` Jason Gunthorpe
2026-06-02 13:04 ` David Laight
2026-10-04 10:47 ` Anshuman [this message]
2026-05-21 13:33 ` [PATCH 02/11] panic: Replace panic_print_get() with generic helper Kees Cook
2026-05-21 13:33 ` [PATCH 03/11] moduleparam: Add DEFINE_KERNEL_PARAM_OPS macro family Kees Cook
2026-05-25 13:27 ` Petr Pavlu
2026-05-21 13:33 ` [PATCH 04/11] treewide: Convert struct kernel_param_ops initializers to DEFINE_KERNEL_PARAM_OPS Kees Cook
2026-05-21 13:59 ` Sean Christopherson
2026-05-22 17:01 ` Rafael J. Wysocki
2026-05-23 0:38 ` SeongJae Park
2026-05-25 13:35 ` Petr Pavlu
2026-06-10 21:06 ` jim.cromie
2026-05-21 13:33 ` [PATCH 05/11] moduleparam: Rename .get field to .get_str Kees Cook
2026-05-21 13:33 ` [PATCH 06/11] moduleparam: Add seq_buf-based .get callback alongside .get_str Kees Cook
2026-05-25 16:19 ` Petr Pavlu
2026-05-21 13:33 ` [PATCH 07/11] moduleparam: Route DEFINE_KERNEL_PARAM_OPS get pointer via _Generic Kees Cook
2026-05-25 16:24 ` Petr Pavlu
2026-05-21 13:33 ` [PATCH 08/11] params: Convert generic kernel_param_ops .get helpers to seq_buf Kees Cook
2026-05-25 17:10 ` Petr Pavlu
2026-05-21 13:33 ` [PATCH 09/11] treewide: Convert custom kernel_param_ops .get callbacks to seq_buf via cocci Kees Cook
2026-05-21 13:45 ` Sean Christopherson
2026-05-22 17:03 ` Rafael J. Wysocki
2026-05-23 0:45 ` SeongJae Park
2026-05-21 13:33 ` [PATCH 10/11] treewide: Manually convert custom kernel_param_ops .get callbacks Kees Cook
2026-05-21 17:44 ` Jani Nikula
2026-05-22 17:05 ` Rafael J. Wysocki
2026-05-21 13:33 ` [PATCH 11/11] moduleparam: Drop legacy kernel_param_ops .get_str field and dispatch logic Kees Cook
2026-05-26 6:53 ` [PATCH 00/11] Convert moduleparams to seq_buf Petr Pavlu
2026-06-01 19:59 ` Kees Cook
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=20261004104741.51238-1-anshumantewari123@gmail.com \
--to=anshumantewari123@gmail.com \
--cc=Frank.Li@kernel.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=airlied@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=anton.ivanov@cambridgegreys.com \
--cc=apparmor@lists.ubuntu.com \
--cc=atomlin@atomlin.com \
--cc=benjamin.berg@intel.com \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=bvanassche@acm.org \
--cc=corey@minyard.net \
--cc=da.gomez@kernel.org \
--cc=daniel.lezcano@kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=david.e.box@linux.intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=eperezma@redhat.com \
--cc=georgia.garcia@canonical.com \
--cc=glider@google.com \
--cc=gor@linux.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=hare@suse.de \
--cc=hca@linux.ibm.com \
--cc=hpa@zytor.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=jasowang@redhat.com \
--cc=jbaron@akamai.com \
--cc=jgg@ziepe.ca \
--cc=jim.cromie@gmail.com \
--cc=jirislaby@kernel.org \
--cc=jmorris@namei.org \
--cc=johannes@sipsolutions.net \
--cc=john.johansen@canonical.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=kasan-dev@googlegroups.com \
--cc=kees@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=lenb@kernel.org \
--cc=leon@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-modules@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lukasz.luba@arm.com \
--cc=macro@orcam.me.uk \
--cc=martin.petersen@oracle.com \
--cc=mcgrof@kernel.org \
--cc=mchehab@kernel.org \
--cc=mingo@redhat.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=openipmi-developer@lists.sourceforge.net \
--cc=paul@paul-moore.com \
--cc=pbonzini@redhat.com \
--cc=pengpeng@iscas.ac.cn \
--cc=peterz@infradead.org \
--cc=petr.pavlu@suse.com \
--cc=qemu-devel@nongnu.org \
--cc=rafael@kernel.org \
--cc=richard@nod.at \
--cc=rodrigo.vivi@intel.com \
--cc=rui.zhang@intel.com \
--cc=samitolvanen@google.com \
--cc=seanjc@google.com \
--cc=serge@hallyn.com \
--cc=simona@ffwll.ch \
--cc=somlo@cmu.edu \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=stable@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=tglx@kernel.org \
--cc=tiwei.btw@antgroup.com \
--cc=tursulin@ursulin.net \
--cc=usb-storage@lists.one-eyed-alien.net \
--cc=virtualization@lists.linux.dev \
--cc=vkoul@kernel.org \
--cc=x86@kernel.org \
--cc=xuanzhuo@linux.alibaba.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