From: "Arnd Bergmann" <arnd@arndb.de>
To: "Thomas Weißschuh" <linux@weissschuh.net>,
"Richard Cochran" <richardcochran@gmail.com>
Cc: "Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Anna-Maria Gleixner" <anna-maria@linutronix.de>,
"Frederic Weisbecker" <frederic@kernel.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"John Stultz" <johnstul@us.ibm.com>,
Netdev <netdev@vger.kernel.org>,
linux-kernel@vger.kernel.org,
"Cyrill Gorcunov" <gorcunov@gmail.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] posix-clock: Explicitly handle compat ioctls
Date: Thu, 23 Jan 2025 22:10:52 +0100 [thread overview]
Message-ID: <1ba5d3a4-7931-455b-a3ce-85a968a7cb10@app.fastmail.com> (raw)
In-Reply-To: <82861179-dfd5-4330-86cb-048d124487b0@t-8ch.de>
On Thu, Jan 23, 2025, at 17:22, Thomas Weißschuh wrote:
> On 2025-01-22 18:15:13+0100, Arnd Bergmann wrote:
>> A simpler variant of the patch would move the switch/case logic
>> into posix_clock_compat_ioctl() and avoid the extra function
>> pointer, simply calling posix_clock_ioctl() with the modified
>> argument.
>
> That would work, but be a layering violation.
> Or a "compat_mode" argument to ptp_ioctl()
>
> I'm fine with either approach.
You don't even need to add an argument, just use
in_compat_syscall() to check for compat mode inside
of the ioctl handler. If CONFIG_COMPAT is disabled, that
gets optimized out through dead-code-elimination.
Arnd
next prev parent reply other threads:[~2025-01-23 21:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-21 22:41 Thomas Weißschuh
2025-01-22 6:59 ` Cyrill Gorcunov
2025-01-22 7:30 ` Arnd Bergmann
2025-01-22 16:23 ` Richard Cochran
2025-01-22 16:48 ` Thomas Weißschuh
2025-01-22 17:15 ` Arnd Bergmann
2025-01-23 16:22 ` Thomas Weißschuh
2025-01-23 21:10 ` Arnd Bergmann [this message]
2025-01-22 9:52 ` Simon Horman
2025-01-22 16:39 ` Richard Cochran
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=1ba5d3a4-7931-455b-a3ce-85a968a7cb10@app.fastmail.com \
--to=arnd@arndb.de \
--cc=andrew+netdev@lunn.ch \
--cc=anna-maria@linutronix.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=frederic@kernel.org \
--cc=gorcunov@gmail.com \
--cc=johnstul@us.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
/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®