From: "Arnd Bergmann" <arnd@arndb.de>
To: "Christoph Hellwig" <hch@infradead.org>
Cc: "Christian Brauner" <brauner@kernel.org>,
"Arnd Bergmann" <arnd@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org,
"Anuj Gupta" <anuj20.g@samsung.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"Kanchan Joshi" <joshi.k@samsung.com>,
"LTP List" <ltp@lists.linux.it>,
"Dan Carpenter" <dan.carpenter@linaro.org>,
"Benjamin Copeland" <benjamin.copeland@linaro.org>,
rbm@suse.com, "Naresh Kamboju" <naresh.kamboju@linaro.org>,
"Anders Roxell" <anders.roxell@linaro.org>,
"Jens Axboe" <axboe@kernel.dk>,
"Pavel Begunkov" <asml.silence@gmail.com>,
"Alexey Dobriyan" <adobriyan@gmail.com>,
"Darrick J. Wong" <djwong@kernel.org>,
"Eric Biggers" <ebiggers@google.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] block: fix FS_IOC_GETLBMD_CAP parsing in blkdev_common_ioctl()
Date: Thu, 10 Jul 2025 13:52:57 +0200 [thread overview]
Message-ID: <50e77c3f-4704-4fb8-a3ac-9686d76fad30@app.fastmail.com> (raw)
In-Reply-To: <aG-dI2wJDl-HfzFG@infradead.org>
On Thu, Jul 10, 2025, at 12:59, Christoph Hellwig wrote:
>> I think the variant from commit 1b6d968de22b ("xfs: bump
>> XFS_IOC_FSGEOMETRY to v5 structures") where the old structure
>> gets renamed and the existing macro refers to a different
>> command code is more problematic. We used to always require
>> userspace to be built against the oldest kernel headers it could run
>> on. This worked fine in the past but it appears that userspace
>> (in particular glibc) has increasingly expected to also work
>> on older kernels when building against new headers.
>
> This is what I meant. Note that the userspace in this case also keeps a
> case trying the old structure, but that does indeed require keeping the
> userspace somewhat in lockstep if you do the renaming as in this example.
Right, it's fine for applications that keep a copy of the uapi
header file, because they can implement both versions when they
update to the new version of that file.
Redefining the ioctl command code does break if you have an
unmodified application source tree that unintentionally uses
the updated /usr/include/linux/*.h file. In this case there is
no benefit from the new header because it isn't aware of the
new struct member but it still ends up failing on old kernels.
Arnd
next prev parent reply other threads:[~2025-07-10 11:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-09 18:10 [PATCH] block: fix FS_IOC_GETLBMD_CAP parsing in blkdev_common_ioctl() Arnd Bergmann
2025-07-09 18:27 ` Darrick J. Wong
2025-07-09 20:30 ` Arnd Bergmann
2025-07-10 8:00 ` Christian Brauner
2025-07-10 8:14 ` Christoph Hellwig
2025-07-10 10:50 ` Arnd Bergmann
2025-07-10 10:59 ` Christoph Hellwig
2025-07-10 11:52 ` Arnd Bergmann [this message]
2025-07-10 12:11 ` Christian Brauner
2025-07-10 10:11 ` Arnd Bergmann
2025-07-10 12:03 ` Christian Brauner
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=50e77c3f-4704-4fb8-a3ac-9686d76fad30@app.fastmail.com \
--to=arnd@arndb.de \
--cc=adobriyan@gmail.com \
--cc=anders.roxell@linaro.org \
--cc=anuj20.g@samsung.com \
--cc=arnd@kernel.org \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=benjamin.copeland@linaro.org \
--cc=brauner@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=djwong@kernel.org \
--cc=ebiggers@google.com \
--cc=hch@infradead.org \
--cc=joshi.k@samsung.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ltp@lists.linux.it \
--cc=martin.petersen@oracle.com \
--cc=naresh.kamboju@linaro.org \
--cc=rbm@suse.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