Thread (87 messages) 87 messages, 12 authors, 2022-01-17

Re: [RFC PATCH 09/13] x86/uintr: Introduce vector registration and uintr_fd syscall

From: Sohil Mehta <hidden>
Date: 2021-09-28 20:40:43
Also in: linux-arch, linux-kselftest, lkml

On 9/24/2021 3:33 AM, Thomas Gleixner wrote:
If this ever comes back in some form, then I pretty please want the life
time rules of this documented properly.
I'll document the life time rules for the UPID, vector and UITT next 
time. I realize now that they are quite convoluted in the current 
implementation.

I'll also fix the concurrency and serialization issues that you 
mentioned in this patch and the next one.

quoted
+	ret = task_work_add(r_info->upid_ctx->task, &r_info->twork, true);
Care to look at the type of the third argument of task_work_add()?
Ah! I didn't realize the third argument changed a long time back.

quoted
+/*
+ * sys_uintr_create_fd - Create a uintr_fd for the registered interrupt vector.
So this creates a file descriptor for a vector which is already
allocated and then it calls do_uintr_register_vector() which allocates
the vector?
The syscall comment is misleading. Will fix it.

Vector allocation happens in userspace. The application is only expected 
to register the vector.

This syscall only creates an FD abstraction for the vector that is 
*being* registered.
quoted
+ */
+SYSCALL_DEFINE2(uintr_create_fd, u64, vector, unsigned int, flags)
+{
Thanks,

Sohil
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help