From: Elizabeth Figura <zfigura@codeweavers.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jonathan Corbet <corbet@lwn.net>, shuah <shuah@kernel.org>,
Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
wine-devel@winehq.org, "André Almeida" <andrealmeid@igalia.com>,
"Wolfram Sang" <wsa@kernel.org>,
"Arkadiusz Hiler" <ahiler@codeweavers.com>,
"Peter Zijlstra" <peterz@infradead.org>,
"Andy Lutomirski" <luto@kernel.org>,
linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org,
"Randy Dunlap" <rdunlap@infradead.org>,
"Ingo Molnar" <mingo@redhat.com>, "Will Deacon" <will@kernel.org>,
"Waiman Long" <longman@redhat.com>,
"Boqun Feng" <boqun.feng@gmail.com>
Subject: Re: [PATCH v6 00/28] NT synchronization primitive driver
Date: Mon, 09 Dec 2024 16:08:08 -0600 [thread overview]
Message-ID: <6110961.lOV4Wx5bFT@camazotz> (raw)
In-Reply-To: <a6ec954d-7794-483d-a1f3-d58d33c5fc7a@app.fastmail.com>
On Monday, 9 December 2024 14:24:36 CST Arnd Bergmann wrote:
> On Mon, Dec 9, 2024, at 19:58, Elizabeth Figura wrote:
> > == Previous versions ==
> >
> > No changes were made from v5 other than rebasing on top of the 6.13-rc1
> > char-misc-next tree.
> >
> > I would like to repeat a question from the last round of review, though. Two
> > changes were suggested related to API design, which I did not make because the
> > APIs in question were already released in upstream Linux. However, the driver is
> > also completely nonfunctional and hidden behind BROKEN, so would this be
> > acceptable anyway? The changes in question are:
>
> If it was impossible to use the driver, there is no regression.
> I feel the entire point of marking it as broken was to be able
> to add that type of change.
Makes sense. [I figured that the BROKEN was just there to prevent anyone from trying to use a half-finished driver, and the point of committing a half-finished driver was just to reduce the number of patches that needed to be resent.]
I'll make these changes and resend.
> > * rename NTSYNC_IOC_SEM_POST to NTSYNC_IOC_SEM_RELEASE (matching the NT
> > terminology instead of POSIX),
>
> No objections my me on either name.
>
> > * change object creation ioctls to return the fds directly in the return value
> > instead of through the args struct. I would also still appreciate a
> > clarification on the advice in [1], which is why I didn't do this in the first
> > place.
> >
> > [1] https://docs.kernel.org/driver-api/ioctl.html#return-code
>
> The git log tells me that I have written that, but I don't remember
> why I put that in, maybe someone else suggested it.
>
> My feeling right now is that returning a file descriptor number
> as a small positive integer from the ioctl() return code makes
> sense. On the other hand, returning pointers, negative signed
> integers or large (> 32bit) 'unsigned long' values can cause
> a number of issues, so I would avoid all those the same way we
> discourage passing those integers as a literal 'arg' into ioctl()
> instead of going through a pointer.
Ah, that makes sense to me, thanks.
next prev parent reply other threads:[~2024-12-09 22:08 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 18:58 [PATCH v6 00/28] NT synchronization primitive driver Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 01/28] ntsync: Introduce NTSYNC_IOC_WAIT_ANY Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 02/28] ntsync: Introduce NTSYNC_IOC_WAIT_ALL Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 03/28] ntsync: Introduce NTSYNC_IOC_CREATE_MUTEX Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 04/28] ntsync: Introduce NTSYNC_IOC_MUTEX_UNLOCK Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 05/28] ntsync: Introduce NTSYNC_IOC_MUTEX_KILL Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 06/28] ntsync: Introduce NTSYNC_IOC_CREATE_EVENT Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 07/28] ntsync: Introduce NTSYNC_IOC_EVENT_SET Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 08/28] ntsync: Introduce NTSYNC_IOC_EVENT_RESET Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 09/28] ntsync: Introduce NTSYNC_IOC_EVENT_PULSE Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 10/28] ntsync: Introduce NTSYNC_IOC_SEM_READ Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 11/28] ntsync: Introduce NTSYNC_IOC_MUTEX_READ Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 12/28] ntsync: Introduce NTSYNC_IOC_EVENT_READ Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 13/28] ntsync: Introduce alertable waits Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 14/28] selftests: ntsync: Add some tests for semaphore state Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 15/28] selftests: ntsync: Add some tests for mutex state Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 16/28] selftests: ntsync: Add some tests for NTSYNC_IOC_WAIT_ANY Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 17/28] selftests: ntsync: Add some tests for NTSYNC_IOC_WAIT_ALL Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 18/28] selftests: ntsync: Add some tests for wakeup signaling with WINESYNC_IOC_WAIT_ANY Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 19/28] selftests: ntsync: Add some tests for wakeup signaling with WINESYNC_IOC_WAIT_ALL Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 20/28] selftests: ntsync: Add some tests for manual-reset event state Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 21/28] selftests: ntsync: Add some tests for auto-reset " Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 22/28] selftests: ntsync: Add some tests for wakeup signaling with events Elizabeth Figura
2024-12-09 18:58 ` [PATCH v6 23/28] selftests: ntsync: Add tests for alertable waits Elizabeth Figura
2024-12-09 18:59 ` [PATCH v6 24/28] selftests: ntsync: Add some tests for wakeup signaling via alerts Elizabeth Figura
2024-12-09 18:59 ` [PATCH v6 25/28] selftests: ntsync: Add a stress test for contended waits Elizabeth Figura
2024-12-09 18:59 ` [PATCH v6 26/28] maintainers: Add an entry for ntsync Elizabeth Figura
2024-12-09 18:59 ` [PATCH v6 27/28] docs: ntsync: Add documentation for the ntsync uAPI Elizabeth Figura
2024-12-09 18:59 ` [PATCH v6 28/28] ntsync: No longer depend on BROKEN Elizabeth Figura
2024-12-12 4:52 ` kernel test robot
2024-12-12 7:18 ` Arnd Bergmann
2024-12-09 20:24 ` [PATCH v6 00/28] NT synchronization primitive driver Arnd Bergmann
2024-12-09 22:08 ` Elizabeth Figura [this message]
2024-12-12 12:01 ` Peter Zijlstra
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=6110961.lOV4Wx5bFT@camazotz \
--to=zfigura@codeweavers.com \
--cc=ahiler@codeweavers.com \
--cc=andrealmeid@igalia.com \
--cc=arnd@arndb.de \
--cc=boqun.feng@gmail.com \
--cc=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=longman@redhat.com \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rdunlap@infradead.org \
--cc=shuah@kernel.org \
--cc=will@kernel.org \
--cc=wine-devel@winehq.org \
--cc=wsa@kernel.org \
/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