release 6.12.5
This commit is contained in:
@@ -18,7 +18,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||
|
||||
--- a/fs/btrfs/super.c
|
||||
+++ b/fs/btrfs/super.c
|
||||
@@ -2631,7 +2631,7 @@ module_exit(exit_btrfs_fs)
|
||||
@@ -2618,7 +2618,7 @@ module_exit(exit_btrfs_fs)
|
||||
|
||||
MODULE_DESCRIPTION("B-Tree File System (BTRFS)");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
@@ -21,7 +21,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||
|
||||
--- a/net/ieee802154/socket.c
|
||||
+++ b/net/ieee802154/socket.c
|
||||
@@ -1138,4 +1138,4 @@ module_exit(af_ieee802154_remove);
|
||||
@@ -1140,4 +1140,4 @@ module_exit(af_ieee802154_remove);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION("IEEE 802.15.4 socket interface");
|
||||
|
@@ -12,7 +12,7 @@ actually used.
|
||||
---
|
||||
--- a/fs/notify/fanotify/fanotify_user.c
|
||||
+++ b/fs/notify/fanotify/fanotify_user.c
|
||||
@@ -1752,6 +1752,14 @@ static int do_fanotify_mark(int fanotify
|
||||
@@ -1763,6 +1763,14 @@ static int do_fanotify_mark(int fanotify
|
||||
umask = FANOTIFY_EVENT_FLAGS;
|
||||
}
|
||||
|
||||
|
2
debian/patches/debian/kernelvariables.patch
vendored
2
debian/patches/debian/kernelvariables.patch
vendored
@@ -54,7 +54,7 @@ use of $(ARCH) needs to be moved after this.
|
||||
KCONFIG_CONFIG ?= .config
|
||||
export KCONFIG_CONFIG
|
||||
|
||||
@@ -524,6 +494,35 @@ RUSTFLAGS_KERNEL =
|
||||
@@ -525,6 +495,35 @@ RUSTFLAGS_KERNEL =
|
||||
AFLAGS_KERNEL =
|
||||
LDFLAGS_vmlinux =
|
||||
|
||||
|
@@ -20,7 +20,7 @@ is non-empty.
|
||||
---
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1817,7 +1817,7 @@ PHONY += prepare
|
||||
@@ -1818,7 +1818,7 @@ PHONY += prepare
|
||||
# now expand this into a simple variable to reduce the cost of shell evaluations
|
||||
prepare: CC_VERSION_TEXT := $(CC_VERSION_TEXT)
|
||||
prepare:
|
||||
|
@@ -42,7 +42,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||
Ignore sysrq setting - this boot parameter will
|
||||
--- a/arch/x86/Kconfig
|
||||
+++ b/arch/x86/Kconfig
|
||||
@@ -3164,6 +3164,14 @@ config COMPAT_32
|
||||
@@ -3163,6 +3163,14 @@ config COMPAT_32
|
||||
select HAVE_UID16
|
||||
select OLD_SIGSUSPEND3
|
||||
|
||||
|
2
debian/patches/krd/0003-local-ports.patch
vendored
2
debian/patches/krd/0003-local-ports.patch
vendored
@@ -1,6 +1,6 @@
|
||||
--- a/net/ipv4/af_inet.c
|
||||
+++ b/net/ipv4/af_inet.c
|
||||
@@ -1802,7 +1802,7 @@ static __net_init int inet_init_net(stru
|
||||
@@ -1800,7 +1800,7 @@ static __net_init int inet_init_net(stru
|
||||
/*
|
||||
* Set defaults for local port range
|
||||
*/
|
||||
|
@@ -1,21 +0,0 @@
|
||||
From 06bc88f16094c6f38e0890992af4a32415716c5d Mon Sep 17 00:00:00 2001
|
||||
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
|
||||
Date: Thu, 18 Jul 2024 21:19:39 +0200
|
||||
Subject: Revert "misc: ntsync: mark driver as "broken" to prevent from
|
||||
building"
|
||||
|
||||
This reverts commit f5b335dc025cfee90957efa90dc72fada0d5abb4.
|
||||
---
|
||||
drivers/misc/Kconfig | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
--- a/drivers/misc/Kconfig
|
||||
+++ b/drivers/misc/Kconfig
|
||||
@@ -517,7 +517,6 @@ config OPEN_DICE
|
||||
|
||||
config NTSYNC
|
||||
tristate "NT synchronization primitive emulation"
|
||||
- depends on BROKEN
|
||||
help
|
||||
This module provides kernel support for emulation of Windows NT
|
||||
synchronization primitives. It is not a hardware driver.
|
55
debian/patches/misc-ntsync7/0001-ntsync-Return-the-fd-from-NTSYNC_IOC_CREATE_SEM.patch
vendored
Normal file
55
debian/patches/misc-ntsync7/0001-ntsync-Return-the-fd-from-NTSYNC_IOC_CREATE_SEM.patch
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
From e50ffd43b88d64b8063a9fce59f1d03b56f6144c Mon Sep 17 00:00:00 2001
|
||||
From: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
Date: Fri, 13 Dec 2024 13:34:42 -0600
|
||||
Subject: ntsync: Return the fd from NTSYNC_IOC_CREATE_SEM.
|
||||
|
||||
Simplify the user API a bit by returning the fd as return value from the ioctl
|
||||
instead of through the argument pointer.
|
||||
|
||||
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
---
|
||||
drivers/misc/ntsync.c | 7 ++-----
|
||||
include/uapi/linux/ntsync.h | 3 +--
|
||||
2 files changed, 3 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/misc/ntsync.c
|
||||
+++ b/drivers/misc/ntsync.c
|
||||
@@ -165,7 +165,6 @@ static int ntsync_obj_get_fd(struct ntsy
|
||||
|
||||
static int ntsync_create_sem(struct ntsync_device *dev, void __user *argp)
|
||||
{
|
||||
- struct ntsync_sem_args __user *user_args = argp;
|
||||
struct ntsync_sem_args args;
|
||||
struct ntsync_obj *sem;
|
||||
int fd;
|
||||
@@ -182,12 +181,10 @@ static int ntsync_create_sem(struct ntsy
|
||||
sem->u.sem.count = args.count;
|
||||
sem->u.sem.max = args.max;
|
||||
fd = ntsync_obj_get_fd(sem);
|
||||
- if (fd < 0) {
|
||||
+ if (fd < 0)
|
||||
kfree(sem);
|
||||
- return fd;
|
||||
- }
|
||||
|
||||
- return put_user(fd, &user_args->sem);
|
||||
+ return fd;
|
||||
}
|
||||
|
||||
static int ntsync_char_open(struct inode *inode, struct file *file)
|
||||
--- a/include/uapi/linux/ntsync.h
|
||||
+++ b/include/uapi/linux/ntsync.h
|
||||
@@ -11,12 +11,11 @@
|
||||
#include <linux/types.h>
|
||||
|
||||
struct ntsync_sem_args {
|
||||
- __u32 sem;
|
||||
__u32 count;
|
||||
__u32 max;
|
||||
};
|
||||
|
||||
-#define NTSYNC_IOC_CREATE_SEM _IOWR('N', 0x80, struct ntsync_sem_args)
|
||||
+#define NTSYNC_IOC_CREATE_SEM _IOW ('N', 0x80, struct ntsync_sem_args)
|
||||
|
||||
#define NTSYNC_IOC_SEM_POST _IOWR('N', 0x81, __u32)
|
||||
|
64
debian/patches/misc-ntsync7/0002-ntsync-Rename-NTSYNC_IOC_SEM_POST-to-NTSYNC_IOC_SEM_.patch
vendored
Normal file
64
debian/patches/misc-ntsync7/0002-ntsync-Rename-NTSYNC_IOC_SEM_POST-to-NTSYNC_IOC_SEM_.patch
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
From 160e9bf7826da868ae4de261753a03cce2208ff6 Mon Sep 17 00:00:00 2001
|
||||
From: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
Date: Fri, 13 Dec 2024 13:34:43 -0600
|
||||
Subject: ntsync: Rename NTSYNC_IOC_SEM_POST to NTSYNC_IOC_SEM_RELEASE.
|
||||
|
||||
Use the more common "release" terminology, which is also the term used by NT,
|
||||
instead of "post" (which is used by POSIX).
|
||||
|
||||
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
---
|
||||
drivers/misc/ntsync.c | 10 +++++-----
|
||||
include/uapi/linux/ntsync.h | 2 +-
|
||||
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/misc/ntsync.c
|
||||
+++ b/drivers/misc/ntsync.c
|
||||
@@ -57,7 +57,7 @@ struct ntsync_device {
|
||||
* Actually change the semaphore state, returning -EOVERFLOW if it is made
|
||||
* invalid.
|
||||
*/
|
||||
-static int post_sem_state(struct ntsync_obj *sem, __u32 count)
|
||||
+static int release_sem_state(struct ntsync_obj *sem, __u32 count)
|
||||
{
|
||||
__u32 sum;
|
||||
|
||||
@@ -71,7 +71,7 @@ static int post_sem_state(struct ntsync_
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int ntsync_sem_post(struct ntsync_obj *sem, void __user *argp)
|
||||
+static int ntsync_sem_release(struct ntsync_obj *sem, void __user *argp)
|
||||
{
|
||||
__u32 __user *user_args = argp;
|
||||
__u32 prev_count;
|
||||
@@ -87,7 +87,7 @@ static int ntsync_sem_post(struct ntsync
|
||||
spin_lock(&sem->lock);
|
||||
|
||||
prev_count = sem->u.sem.count;
|
||||
- ret = post_sem_state(sem, args);
|
||||
+ ret = release_sem_state(sem, args);
|
||||
|
||||
spin_unlock(&sem->lock);
|
||||
|
||||
@@ -114,8 +114,8 @@ static long ntsync_obj_ioctl(struct file
|
||||
void __user *argp = (void __user *)parm;
|
||||
|
||||
switch (cmd) {
|
||||
- case NTSYNC_IOC_SEM_POST:
|
||||
- return ntsync_sem_post(obj, argp);
|
||||
+ case NTSYNC_IOC_SEM_RELEASE:
|
||||
+ return ntsync_sem_release(obj, argp);
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
}
|
||||
--- a/include/uapi/linux/ntsync.h
|
||||
+++ b/include/uapi/linux/ntsync.h
|
||||
@@ -17,6 +17,6 @@ struct ntsync_sem_args {
|
||||
|
||||
#define NTSYNC_IOC_CREATE_SEM _IOW ('N', 0x80, struct ntsync_sem_args)
|
||||
|
||||
-#define NTSYNC_IOC_SEM_POST _IOWR('N', 0x81, __u32)
|
||||
+#define NTSYNC_IOC_SEM_RELEASE _IOWR('N', 0x81, __u32)
|
||||
|
||||
#endif
|
@@ -1,6 +1,6 @@
|
||||
From 60b01019526236e40466cf20bf1192074e5e1a7c Mon Sep 17 00:00:00 2001
|
||||
From e855a17ec837cdee9047e6e23e47ed7b4312a265 Mon Sep 17 00:00:00 2001
|
||||
From: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
Date: Sun, 19 May 2024 15:24:27 -0500
|
||||
Date: Fri, 13 Dec 2024 13:34:44 -0600
|
||||
Subject: ntsync: Introduce NTSYNC_IOC_WAIT_ANY.
|
||||
|
||||
This corresponds to part of the functionality of the NT syscall
|
||||
@@ -38,9 +38,9 @@ in future patches (split out to ease review).
|
||||
|
||||
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
---
|
||||
drivers/misc/ntsync.c | 245 ++++++++++++++++++++++++++++++++++++
|
||||
include/uapi/linux/ntsync.h | 14 +++
|
||||
2 files changed, 259 insertions(+)
|
||||
drivers/misc/ntsync.c | 247 +++++++++++++++++++++++++++++++++++-
|
||||
include/uapi/linux/ntsync.h | 14 ++
|
||||
2 files changed, 260 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/misc/ntsync.c
|
||||
+++ b/drivers/misc/ntsync.c
|
||||
@@ -126,10 +126,12 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
/*
|
||||
* Actually change the semaphore state, returning -EOVERFLOW if it is made
|
||||
* invalid.
|
||||
@@ -88,6 +138,8 @@ static int ntsync_sem_post(struct ntsync
|
||||
@@ -87,7 +137,9 @@ static int ntsync_sem_release(struct nts
|
||||
spin_lock(&sem->lock);
|
||||
|
||||
prev_count = sem->u.sem.count;
|
||||
ret = post_sem_state(sem, args);
|
||||
- ret = release_sem_state(sem, args);
|
||||
+ ret = post_sem_state(sem, args);
|
||||
+ if (!ret)
|
||||
+ try_wake_any_sem(sem);
|
||||
|
||||
@@ -143,8 +145,8 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
|
||||
return obj;
|
||||
}
|
||||
@@ -190,6 +243,196 @@ static int ntsync_create_sem(struct ntsy
|
||||
return put_user(fd, &user_args->sem);
|
||||
@@ -187,6 +240,196 @@ static int ntsync_create_sem(struct ntsy
|
||||
return fd;
|
||||
}
|
||||
|
||||
+static struct ntsync_obj *get_obj(struct ntsync_device *dev, int fd)
|
||||
@@ -340,7 +342,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
static int ntsync_char_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct ntsync_device *dev;
|
||||
@@ -221,6 +464,8 @@ static long ntsync_char_ioctl(struct fil
|
||||
@@ -218,6 +461,8 @@ static long ntsync_char_ioctl(struct fil
|
||||
switch (cmd) {
|
||||
case NTSYNC_IOC_CREATE_SEM:
|
||||
return ntsync_create_sem(dev, argp);
|
||||
@@ -351,7 +353,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
}
|
||||
--- a/include/uapi/linux/ntsync.h
|
||||
+++ b/include/uapi/linux/ntsync.h
|
||||
@@ -16,7 +16,21 @@ struct ntsync_sem_args {
|
||||
@@ -15,7 +15,21 @@ struct ntsync_sem_args {
|
||||
__u32 max;
|
||||
};
|
||||
|
||||
@@ -368,8 +370,8 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
+
|
||||
+#define NTSYNC_MAX_WAIT_COUNT 64
|
||||
+
|
||||
#define NTSYNC_IOC_CREATE_SEM _IOWR('N', 0x80, struct ntsync_sem_args)
|
||||
#define NTSYNC_IOC_CREATE_SEM _IOW ('N', 0x80, struct ntsync_sem_args)
|
||||
+#define NTSYNC_IOC_WAIT_ANY _IOWR('N', 0x82, struct ntsync_wait_args)
|
||||
|
||||
#define NTSYNC_IOC_SEM_POST _IOWR('N', 0x81, __u32)
|
||||
#define NTSYNC_IOC_SEM_RELEASE _IOWR('N', 0x81, __u32)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
From 73fc33606fcb7028ec1ee6027a361de4e85ab5d6 Mon Sep 17 00:00:00 2001
|
||||
From 6c1dac87ff835a48a067fe75bd0a6965921dac78 Mon Sep 17 00:00:00 2001
|
||||
From: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
Date: Sun, 19 May 2024 15:24:28 -0500
|
||||
Date: Fri, 13 Dec 2024 13:34:45 -0600
|
||||
Subject: ntsync: Introduce NTSYNC_IOC_WAIT_ALL.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
@@ -27,9 +27,9 @@ The locking scheme used here was written by Peter Zijlstra.
|
||||
|
||||
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
---
|
||||
drivers/misc/ntsync.c | 334 ++++++++++++++++++++++++++++++++++--
|
||||
drivers/misc/ntsync.c | 336 ++++++++++++++++++++++++++++++++++--
|
||||
include/uapi/linux/ntsync.h | 1 +
|
||||
2 files changed, 322 insertions(+), 13 deletions(-)
|
||||
2 files changed, 323 insertions(+), 14 deletions(-)
|
||||
|
||||
--- a/drivers/misc/ntsync.c
|
||||
+++ b/drivers/misc/ntsync.c
|
||||
@@ -280,7 +280,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
|
||||
list_for_each_entry(entry, &sem->any_waiters, node) {
|
||||
struct ntsync_q *q = entry->q;
|
||||
@@ -111,7 +315,7 @@ static int post_sem_state(struct ntsync_
|
||||
@@ -111,7 +315,7 @@ static int release_sem_state(struct ntsy
|
||||
{
|
||||
__u32 sum;
|
||||
|
||||
@@ -289,9 +289,9 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
|
||||
if (check_add_overflow(sem->u.sem.count, count, &sum) ||
|
||||
sum > sem->u.sem.max)
|
||||
@@ -123,9 +327,11 @@ static int post_sem_state(struct ntsync_
|
||||
@@ -123,9 +327,11 @@ static int release_sem_state(struct ntsy
|
||||
|
||||
static int ntsync_sem_post(struct ntsync_obj *sem, void __user *argp)
|
||||
static int ntsync_sem_release(struct ntsync_obj *sem, void __user *argp)
|
||||
{
|
||||
+ struct ntsync_device *dev = sem->dev;
|
||||
__u32 __user *user_args = argp;
|
||||
@@ -301,7 +301,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
int ret;
|
||||
|
||||
if (copy_from_user(&args, argp, sizeof(args)))
|
||||
@@ -134,14 +340,17 @@ static int ntsync_sem_post(struct ntsync
|
||||
@@ -134,14 +340,17 @@ static int ntsync_sem_release(struct nts
|
||||
if (sem->type != NTSYNC_TYPE_SEM)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -309,8 +309,9 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
+ all = ntsync_lock_obj(dev, sem);
|
||||
|
||||
prev_count = sem->u.sem.count;
|
||||
ret = post_sem_state(sem, args);
|
||||
- ret = post_sem_state(sem, args);
|
||||
- if (!ret)
|
||||
+ ret = release_sem_state(sem, args);
|
||||
+ if (!ret) {
|
||||
+ if (all)
|
||||
+ try_wake_all_obj(dev, sem);
|
||||
@@ -331,7 +332,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
|
||||
return obj;
|
||||
}
|
||||
@@ -304,7 +515,7 @@ static int ntsync_schedule(const struct
|
||||
@@ -301,7 +512,7 @@ static int ntsync_schedule(const struct
|
||||
* Allocate and initialize the ntsync_q structure, but do not queue us yet.
|
||||
*/
|
||||
static int setup_wait(struct ntsync_device *dev,
|
||||
@@ -340,7 +341,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
struct ntsync_q **ret_q)
|
||||
{
|
||||
const __u32 count = args->count;
|
||||
@@ -327,6 +538,7 @@ static int setup_wait(struct ntsync_devi
|
||||
@@ -324,6 +535,7 @@ static int setup_wait(struct ntsync_devi
|
||||
return -ENOMEM;
|
||||
q->task = current;
|
||||
atomic_set(&q->signaled, -1);
|
||||
@@ -348,7 +349,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
q->count = count;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
@@ -336,6 +548,16 @@ static int setup_wait(struct ntsync_devi
|
||||
@@ -333,6 +545,16 @@ static int setup_wait(struct ntsync_devi
|
||||
if (!obj)
|
||||
goto err;
|
||||
|
||||
@@ -365,7 +366,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
entry->obj = obj;
|
||||
entry->q = q;
|
||||
entry->index = i;
|
||||
@@ -365,13 +587,14 @@ static int ntsync_wait_any(struct ntsync
|
||||
@@ -362,13 +584,14 @@ static int ntsync_wait_any(struct ntsync
|
||||
struct ntsync_wait_args args;
|
||||
struct ntsync_q *q;
|
||||
int signaled;
|
||||
@@ -381,7 +382,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
@@ -381,9 +604,9 @@ static int ntsync_wait_any(struct ntsync
|
||||
@@ -378,9 +601,9 @@ static int ntsync_wait_any(struct ntsync
|
||||
struct ntsync_q_entry *entry = &q->entries[i];
|
||||
struct ntsync_obj *obj = entry->obj;
|
||||
|
||||
@@ -393,7 +394,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
}
|
||||
|
||||
/* check if we are already signaled */
|
||||
@@ -394,9 +617,9 @@ static int ntsync_wait_any(struct ntsync
|
||||
@@ -391,9 +614,9 @@ static int ntsync_wait_any(struct ntsync
|
||||
if (atomic_read(&q->signaled) != -1)
|
||||
break;
|
||||
|
||||
@@ -405,7 +406,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
}
|
||||
|
||||
/* sleep */
|
||||
@@ -409,13 +632,94 @@ static int ntsync_wait_any(struct ntsync
|
||||
@@ -406,13 +629,94 @@ static int ntsync_wait_any(struct ntsync
|
||||
struct ntsync_q_entry *entry = &q->entries[i];
|
||||
struct ntsync_obj *obj = entry->obj;
|
||||
|
||||
@@ -502,7 +503,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
signaled = atomic_read(&q->signaled);
|
||||
if (signaled != -1) {
|
||||
struct ntsync_wait_args __user *user_args = argp;
|
||||
@@ -441,6 +745,8 @@ static int ntsync_char_open(struct inode
|
||||
@@ -438,6 +742,8 @@ static int ntsync_char_open(struct inode
|
||||
if (!dev)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -511,7 +512,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
file->private_data = dev;
|
||||
dev->file = file;
|
||||
return nonseekable_open(inode, file);
|
||||
@@ -464,6 +770,8 @@ static long ntsync_char_ioctl(struct fil
|
||||
@@ -461,6 +767,8 @@ static long ntsync_char_ioctl(struct fil
|
||||
switch (cmd) {
|
||||
case NTSYNC_IOC_CREATE_SEM:
|
||||
return ntsync_create_sem(dev, argp);
|
||||
@@ -522,11 +523,11 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
default:
|
||||
--- a/include/uapi/linux/ntsync.h
|
||||
+++ b/include/uapi/linux/ntsync.h
|
||||
@@ -31,6 +31,7 @@ struct ntsync_wait_args {
|
||||
@@ -30,6 +30,7 @@ struct ntsync_wait_args {
|
||||
|
||||
#define NTSYNC_IOC_CREATE_SEM _IOWR('N', 0x80, struct ntsync_sem_args)
|
||||
#define NTSYNC_IOC_CREATE_SEM _IOW ('N', 0x80, struct ntsync_sem_args)
|
||||
#define NTSYNC_IOC_WAIT_ANY _IOWR('N', 0x82, struct ntsync_wait_args)
|
||||
+#define NTSYNC_IOC_WAIT_ALL _IOWR('N', 0x83, struct ntsync_wait_args)
|
||||
|
||||
#define NTSYNC_IOC_SEM_POST _IOWR('N', 0x81, __u32)
|
||||
#define NTSYNC_IOC_SEM_RELEASE _IOWR('N', 0x81, __u32)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
From fdeceab49078a80987c665ed837ee4f1b8a942a8 Mon Sep 17 00:00:00 2001
|
||||
From bcdeaefdc4b60e7845232c201427717df3a83277 Mon Sep 17 00:00:00 2001
|
||||
From: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
Date: Sun, 19 May 2024 15:24:29 -0500
|
||||
Date: Fri, 13 Dec 2024 13:34:46 -0600
|
||||
Subject: ntsync: Introduce NTSYNC_IOC_CREATE_MUTEX.
|
||||
|
||||
This corresponds to the NT syscall NtCreateMutant().
|
||||
@@ -18,9 +18,9 @@ created.
|
||||
|
||||
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
---
|
||||
drivers/misc/ntsync.c | 77 +++++++++++++++++++++++++++++++++++--
|
||||
include/uapi/linux/ntsync.h | 10 ++++-
|
||||
2 files changed, 83 insertions(+), 4 deletions(-)
|
||||
drivers/misc/ntsync.c | 74 +++++++++++++++++++++++++++++++++++--
|
||||
include/uapi/linux/ntsync.h | 9 ++++-
|
||||
2 files changed, 79 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/misc/ntsync.c
|
||||
+++ b/drivers/misc/ntsync.c
|
||||
@@ -121,13 +121,12 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
/*
|
||||
* Actually change the semaphore state, returning -EOVERFLOW if it is made
|
||||
* invalid.
|
||||
@@ -454,6 +492,33 @@ static int ntsync_create_sem(struct ntsy
|
||||
return put_user(fd, &user_args->sem);
|
||||
@@ -451,6 +489,30 @@ static int ntsync_create_sem(struct ntsy
|
||||
return fd;
|
||||
}
|
||||
|
||||
+static int ntsync_create_mutex(struct ntsync_device *dev, void __user *argp)
|
||||
+{
|
||||
+ struct ntsync_mutex_args __user *user_args = argp;
|
||||
+ struct ntsync_mutex_args args;
|
||||
+ struct ntsync_obj *mutex;
|
||||
+ int fd;
|
||||
@@ -144,18 +143,16 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
+ mutex->u.mutex.count = args.count;
|
||||
+ mutex->u.mutex.owner = args.owner;
|
||||
+ fd = ntsync_obj_get_fd(mutex);
|
||||
+ if (fd < 0) {
|
||||
+ if (fd < 0)
|
||||
+ kfree(mutex);
|
||||
+ return fd;
|
||||
+ }
|
||||
+
|
||||
+ return put_user(fd, &user_args->mutex);
|
||||
+ return fd;
|
||||
+}
|
||||
+
|
||||
static struct ntsync_obj *get_obj(struct ntsync_device *dev, int fd)
|
||||
{
|
||||
struct file *file = fget(fd);
|
||||
@@ -523,7 +588,7 @@ static int setup_wait(struct ntsync_devi
|
||||
@@ -520,7 +582,7 @@ static int setup_wait(struct ntsync_devi
|
||||
struct ntsync_q *q;
|
||||
__u32 i, j;
|
||||
|
||||
@@ -164,7 +161,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
return -EINVAL;
|
||||
|
||||
if (args->count > NTSYNC_MAX_WAIT_COUNT)
|
||||
@@ -537,6 +602,7 @@ static int setup_wait(struct ntsync_devi
|
||||
@@ -534,6 +596,7 @@ static int setup_wait(struct ntsync_devi
|
||||
if (!q)
|
||||
return -ENOMEM;
|
||||
q->task = current;
|
||||
@@ -172,7 +169,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
atomic_set(&q->signaled, -1);
|
||||
q->all = all;
|
||||
q->count = count;
|
||||
@@ -579,6 +645,9 @@ static void try_wake_any_obj(struct ntsy
|
||||
@@ -576,6 +639,9 @@ static void try_wake_any_obj(struct ntsy
|
||||
case NTSYNC_TYPE_SEM:
|
||||
try_wake_any_sem(obj);
|
||||
break;
|
||||
@@ -182,7 +179,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -768,6 +837,8 @@ static long ntsync_char_ioctl(struct fil
|
||||
@@ -765,6 +831,8 @@ static long ntsync_char_ioctl(struct fil
|
||||
void __user *argp = (void __user *)parm;
|
||||
|
||||
switch (cmd) {
|
||||
@@ -193,12 +190,11 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
case NTSYNC_IOC_WAIT_ALL:
|
||||
--- a/include/uapi/linux/ntsync.h
|
||||
+++ b/include/uapi/linux/ntsync.h
|
||||
@@ -16,6 +16,12 @@ struct ntsync_sem_args {
|
||||
@@ -15,6 +15,11 @@ struct ntsync_sem_args {
|
||||
__u32 max;
|
||||
};
|
||||
|
||||
+struct ntsync_mutex_args {
|
||||
+ __u32 mutex;
|
||||
+ __u32 owner;
|
||||
+ __u32 count;
|
||||
+};
|
||||
@@ -206,7 +202,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
#define NTSYNC_WAIT_REALTIME 0x1
|
||||
|
||||
struct ntsync_wait_args {
|
||||
@@ -24,7 +30,8 @@ struct ntsync_wait_args {
|
||||
@@ -23,7 +28,8 @@ struct ntsync_wait_args {
|
||||
__u32 count;
|
||||
__u32 index;
|
||||
__u32 flags;
|
||||
@@ -216,11 +212,11 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
};
|
||||
|
||||
#define NTSYNC_MAX_WAIT_COUNT 64
|
||||
@@ -32,6 +39,7 @@ struct ntsync_wait_args {
|
||||
#define NTSYNC_IOC_CREATE_SEM _IOWR('N', 0x80, struct ntsync_sem_args)
|
||||
@@ -31,6 +37,7 @@ struct ntsync_wait_args {
|
||||
#define NTSYNC_IOC_CREATE_SEM _IOW ('N', 0x80, struct ntsync_sem_args)
|
||||
#define NTSYNC_IOC_WAIT_ANY _IOWR('N', 0x82, struct ntsync_wait_args)
|
||||
#define NTSYNC_IOC_WAIT_ALL _IOWR('N', 0x83, struct ntsync_wait_args)
|
||||
+#define NTSYNC_IOC_CREATE_MUTEX _IOWR('N', 0x84, struct ntsync_sem_args)
|
||||
+#define NTSYNC_IOC_CREATE_MUTEX _IOW ('N', 0x84, struct ntsync_mutex_args)
|
||||
|
||||
#define NTSYNC_IOC_SEM_POST _IOWR('N', 0x81, __u32)
|
||||
#define NTSYNC_IOC_SEM_RELEASE _IOWR('N', 0x81, __u32)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
From cc9ade623cd90cd002fb86f3aa249af2e6e4019e Mon Sep 17 00:00:00 2001
|
||||
From e349279c9dc7fc2136a764a16074a90ef3039f38 Mon Sep 17 00:00:00 2001
|
||||
From: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
Date: Sun, 19 May 2024 15:24:30 -0500
|
||||
Date: Fri, 13 Dec 2024 13:34:47 -0600
|
||||
Subject: ntsync: Introduce NTSYNC_IOC_MUTEX_UNLOCK.
|
||||
|
||||
This corresponds to the NT syscall NtReleaseMutant().
|
||||
@@ -17,7 +17,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
|
||||
--- a/drivers/misc/ntsync.c
|
||||
+++ b/drivers/misc/ntsync.c
|
||||
@@ -396,6 +396,57 @@ static int ntsync_sem_post(struct ntsync
|
||||
@@ -396,6 +396,57 @@ static int ntsync_sem_release(struct nts
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -77,8 +77,8 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
struct ntsync_obj *obj = file->private_data;
|
||||
@@ -415,6 +466,8 @@ static long ntsync_obj_ioctl(struct file
|
||||
switch (cmd) {
|
||||
case NTSYNC_IOC_SEM_POST:
|
||||
return ntsync_sem_post(obj, argp);
|
||||
case NTSYNC_IOC_SEM_RELEASE:
|
||||
return ntsync_sem_release(obj, argp);
|
||||
+ case NTSYNC_IOC_MUTEX_UNLOCK:
|
||||
+ return ntsync_mutex_unlock(obj, argp);
|
||||
default:
|
||||
@@ -86,10 +86,10 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
}
|
||||
--- a/include/uapi/linux/ntsync.h
|
||||
+++ b/include/uapi/linux/ntsync.h
|
||||
@@ -42,5 +42,6 @@ struct ntsync_wait_args {
|
||||
#define NTSYNC_IOC_CREATE_MUTEX _IOWR('N', 0x84, struct ntsync_sem_args)
|
||||
@@ -40,5 +40,6 @@ struct ntsync_wait_args {
|
||||
#define NTSYNC_IOC_CREATE_MUTEX _IOW ('N', 0x84, struct ntsync_mutex_args)
|
||||
|
||||
#define NTSYNC_IOC_SEM_POST _IOWR('N', 0x81, __u32)
|
||||
#define NTSYNC_IOC_SEM_RELEASE _IOWR('N', 0x81, __u32)
|
||||
+#define NTSYNC_IOC_MUTEX_UNLOCK _IOWR('N', 0x85, struct ntsync_mutex_args)
|
||||
|
||||
#endif
|
@@ -1,6 +1,6 @@
|
||||
From dca3fe766afa42e34f5d3f62c0f2850760663176 Mon Sep 17 00:00:00 2001
|
||||
From ebb60a10ac3c6b28ba7a46aa67b279d41ad9356d Mon Sep 17 00:00:00 2001
|
||||
From: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
Date: Sun, 19 May 2024 15:24:31 -0500
|
||||
Date: Fri, 13 Dec 2024 13:34:48 -0600
|
||||
Subject: ntsync: Introduce NTSYNC_IOC_MUTEX_KILL.
|
||||
|
||||
This does not correspond to any NT syscall. Rather, when a thread dies, it
|
||||
@@ -111,7 +111,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
{
|
||||
struct ntsync_obj *obj = file->private_data;
|
||||
@@ -468,6 +522,8 @@ static long ntsync_obj_ioctl(struct file
|
||||
return ntsync_sem_post(obj, argp);
|
||||
return ntsync_sem_release(obj, argp);
|
||||
case NTSYNC_IOC_MUTEX_UNLOCK:
|
||||
return ntsync_mutex_unlock(obj, argp);
|
||||
+ case NTSYNC_IOC_MUTEX_KILL:
|
||||
@@ -119,7 +119,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
}
|
||||
@@ -658,6 +714,7 @@ static int setup_wait(struct ntsync_devi
|
||||
@@ -652,6 +708,7 @@ static int setup_wait(struct ntsync_devi
|
||||
q->owner = args->owner;
|
||||
atomic_set(&q->signaled, -1);
|
||||
q->all = all;
|
||||
@@ -127,7 +127,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
q->count = count;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
@@ -766,7 +823,7 @@ static int ntsync_wait_any(struct ntsync
|
||||
@@ -760,7 +817,7 @@ static int ntsync_wait_any(struct ntsync
|
||||
struct ntsync_wait_args __user *user_args = argp;
|
||||
|
||||
/* even if we caught a signal, we need to communicate success */
|
||||
@@ -136,7 +136,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
|
||||
if (put_user(signaled, &user_args->index))
|
||||
ret = -EFAULT;
|
||||
@@ -847,7 +904,7 @@ static int ntsync_wait_all(struct ntsync
|
||||
@@ -841,7 +898,7 @@ static int ntsync_wait_all(struct ntsync
|
||||
struct ntsync_wait_args __user *user_args = argp;
|
||||
|
||||
/* even if we caught a signal, we need to communicate success */
|
||||
@@ -147,9 +147,9 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
ret = -EFAULT;
|
||||
--- a/include/uapi/linux/ntsync.h
|
||||
+++ b/include/uapi/linux/ntsync.h
|
||||
@@ -43,5 +43,6 @@ struct ntsync_wait_args {
|
||||
@@ -41,5 +41,6 @@ struct ntsync_wait_args {
|
||||
|
||||
#define NTSYNC_IOC_SEM_POST _IOWR('N', 0x81, __u32)
|
||||
#define NTSYNC_IOC_SEM_RELEASE _IOWR('N', 0x81, __u32)
|
||||
#define NTSYNC_IOC_MUTEX_UNLOCK _IOWR('N', 0x85, struct ntsync_mutex_args)
|
||||
+#define NTSYNC_IOC_MUTEX_KILL _IOW ('N', 0x86, __u32)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
From 3f3bbc85f1e613364261d685b8197c32ffdeaad0 Mon Sep 17 00:00:00 2001
|
||||
From f74c8259d49ea4c0e679902da9c7c95ec06ae65c Mon Sep 17 00:00:00 2001
|
||||
From: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
Date: Sun, 19 May 2024 15:24:32 -0500
|
||||
Date: Fri, 13 Dec 2024 13:34:49 -0600
|
||||
Subject: ntsync: Introduce NTSYNC_IOC_CREATE_EVENT.
|
||||
|
||||
This correspond to the NT syscall NtCreateEvent().
|
||||
@@ -17,9 +17,9 @@ creation time.
|
||||
|
||||
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
---
|
||||
drivers/misc/ntsync.c | 62 +++++++++++++++++++++++++++++++++++++
|
||||
include/uapi/linux/ntsync.h | 7 +++++
|
||||
2 files changed, 69 insertions(+)
|
||||
drivers/misc/ntsync.c | 59 +++++++++++++++++++++++++++++++++++++
|
||||
include/uapi/linux/ntsync.h | 6 ++++
|
||||
2 files changed, 65 insertions(+)
|
||||
|
||||
--- a/drivers/misc/ntsync.c
|
||||
+++ b/drivers/misc/ntsync.c
|
||||
@@ -91,13 +91,12 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
/*
|
||||
* Actually change the semaphore state, returning -EOVERFLOW if it is made
|
||||
* invalid.
|
||||
@@ -628,6 +661,30 @@ static int ntsync_create_mutex(struct nt
|
||||
return put_user(fd, &user_args->mutex);
|
||||
@@ -622,6 +655,27 @@ static int ntsync_create_mutex(struct nt
|
||||
return fd;
|
||||
}
|
||||
|
||||
+static int ntsync_create_event(struct ntsync_device *dev, void __user *argp)
|
||||
+{
|
||||
+ struct ntsync_event_args __user *user_args = argp;
|
||||
+ struct ntsync_event_args args;
|
||||
+ struct ntsync_obj *event;
|
||||
+ int fd;
|
||||
@@ -111,18 +110,16 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
+ event->u.event.manual = args.manual;
|
||||
+ event->u.event.signaled = args.signaled;
|
||||
+ fd = ntsync_obj_get_fd(event);
|
||||
+ if (fd < 0) {
|
||||
+ if (fd < 0)
|
||||
+ kfree(event);
|
||||
+ return fd;
|
||||
+ }
|
||||
+
|
||||
+ return put_user(fd, &user_args->event);
|
||||
+ return fd;
|
||||
+}
|
||||
+
|
||||
static struct ntsync_obj *get_obj(struct ntsync_device *dev, int fd)
|
||||
{
|
||||
struct file *file = fget(fd);
|
||||
@@ -758,6 +815,9 @@ static void try_wake_any_obj(struct ntsy
|
||||
@@ -752,6 +806,9 @@ static void try_wake_any_obj(struct ntsy
|
||||
case NTSYNC_TYPE_MUTEX:
|
||||
try_wake_any_mutex(obj);
|
||||
break;
|
||||
@@ -132,7 +129,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -947,6 +1007,8 @@ static long ntsync_char_ioctl(struct fil
|
||||
@@ -941,6 +998,8 @@ static long ntsync_char_ioctl(struct fil
|
||||
void __user *argp = (void __user *)parm;
|
||||
|
||||
switch (cmd) {
|
||||
@@ -143,12 +140,11 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
case NTSYNC_IOC_CREATE_SEM:
|
||||
--- a/include/uapi/linux/ntsync.h
|
||||
+++ b/include/uapi/linux/ntsync.h
|
||||
@@ -22,6 +22,12 @@ struct ntsync_mutex_args {
|
||||
@@ -20,6 +20,11 @@ struct ntsync_mutex_args {
|
||||
__u32 count;
|
||||
};
|
||||
|
||||
+struct ntsync_event_args {
|
||||
+ __u32 event;
|
||||
+ __u32 manual;
|
||||
+ __u32 signaled;
|
||||
+};
|
||||
@@ -156,11 +152,11 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
#define NTSYNC_WAIT_REALTIME 0x1
|
||||
|
||||
struct ntsync_wait_args {
|
||||
@@ -40,6 +46,7 @@ struct ntsync_wait_args {
|
||||
@@ -38,6 +43,7 @@ struct ntsync_wait_args {
|
||||
#define NTSYNC_IOC_WAIT_ANY _IOWR('N', 0x82, struct ntsync_wait_args)
|
||||
#define NTSYNC_IOC_WAIT_ALL _IOWR('N', 0x83, struct ntsync_wait_args)
|
||||
#define NTSYNC_IOC_CREATE_MUTEX _IOWR('N', 0x84, struct ntsync_sem_args)
|
||||
+#define NTSYNC_IOC_CREATE_EVENT _IOWR('N', 0x87, struct ntsync_event_args)
|
||||
#define NTSYNC_IOC_CREATE_MUTEX _IOW ('N', 0x84, struct ntsync_mutex_args)
|
||||
+#define NTSYNC_IOC_CREATE_EVENT _IOW ('N', 0x87, struct ntsync_event_args)
|
||||
|
||||
#define NTSYNC_IOC_SEM_POST _IOWR('N', 0x81, __u32)
|
||||
#define NTSYNC_IOC_SEM_RELEASE _IOWR('N', 0x81, __u32)
|
||||
#define NTSYNC_IOC_MUTEX_UNLOCK _IOWR('N', 0x85, struct ntsync_mutex_args)
|
@@ -1,6 +1,6 @@
|
||||
From a6f107f17a976008b85c3e269bf4196e595d3f52 Mon Sep 17 00:00:00 2001
|
||||
From bf60db9cfeccc8f92636b6dcf2eccd7fcd8d84f3 Mon Sep 17 00:00:00 2001
|
||||
From: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
Date: Sun, 19 May 2024 15:24:33 -0500
|
||||
Date: Fri, 13 Dec 2024 13:34:50 -0600
|
||||
Subject: ntsync: Introduce NTSYNC_IOC_EVENT_SET.
|
||||
|
||||
This corresponds to the NT syscall NtSetEvent().
|
||||
@@ -58,8 +58,8 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
}
|
||||
--- a/include/uapi/linux/ntsync.h
|
||||
+++ b/include/uapi/linux/ntsync.h
|
||||
@@ -51,5 +51,6 @@ struct ntsync_wait_args {
|
||||
#define NTSYNC_IOC_SEM_POST _IOWR('N', 0x81, __u32)
|
||||
@@ -48,5 +48,6 @@ struct ntsync_wait_args {
|
||||
#define NTSYNC_IOC_SEM_RELEASE _IOWR('N', 0x81, __u32)
|
||||
#define NTSYNC_IOC_MUTEX_UNLOCK _IOWR('N', 0x85, struct ntsync_mutex_args)
|
||||
#define NTSYNC_IOC_MUTEX_KILL _IOW ('N', 0x86, __u32)
|
||||
+#define NTSYNC_IOC_EVENT_SET _IOR ('N', 0x88, __u32)
|
@@ -1,6 +1,6 @@
|
||||
From aa3ebb5870eb9ed259aba2ed4e07e9993e6cd978 Mon Sep 17 00:00:00 2001
|
||||
From f2de3c99a840cac45446515dd268cb9d64f9f892 Mon Sep 17 00:00:00 2001
|
||||
From: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
Date: Sun, 19 May 2024 15:24:34 -0500
|
||||
Date: Fri, 13 Dec 2024 13:34:51 -0600
|
||||
Subject: ntsync: Introduce NTSYNC_IOC_EVENT_RESET.
|
||||
|
||||
This corresponds to the NT syscall NtResetEvent().
|
||||
@@ -55,7 +55,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
}
|
||||
--- a/include/uapi/linux/ntsync.h
|
||||
+++ b/include/uapi/linux/ntsync.h
|
||||
@@ -52,5 +52,6 @@ struct ntsync_wait_args {
|
||||
@@ -49,5 +49,6 @@ struct ntsync_wait_args {
|
||||
#define NTSYNC_IOC_MUTEX_UNLOCK _IOWR('N', 0x85, struct ntsync_mutex_args)
|
||||
#define NTSYNC_IOC_MUTEX_KILL _IOW ('N', 0x86, __u32)
|
||||
#define NTSYNC_IOC_EVENT_SET _IOR ('N', 0x88, __u32)
|
@@ -1,6 +1,6 @@
|
||||
From 99bca5d776a3011214041c42107a210fe315a35e Mon Sep 17 00:00:00 2001
|
||||
From 50c791dde217f9fdc1785de77fa2ae888d6bdb4e Mon Sep 17 00:00:00 2001
|
||||
From: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
Date: Sun, 19 May 2024 15:24:35 -0500
|
||||
Date: Fri, 13 Dec 2024 13:34:52 -0600
|
||||
Subject: ntsync: Introduce NTSYNC_IOC_EVENT_PULSE.
|
||||
|
||||
This corresponds to the NT syscall NtPulseEvent().
|
||||
@@ -51,7 +51,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
}
|
||||
--- a/include/uapi/linux/ntsync.h
|
||||
+++ b/include/uapi/linux/ntsync.h
|
||||
@@ -53,5 +53,6 @@ struct ntsync_wait_args {
|
||||
@@ -50,5 +50,6 @@ struct ntsync_wait_args {
|
||||
#define NTSYNC_IOC_MUTEX_KILL _IOW ('N', 0x86, __u32)
|
||||
#define NTSYNC_IOC_EVENT_SET _IOR ('N', 0x88, __u32)
|
||||
#define NTSYNC_IOC_EVENT_RESET _IOR ('N', 0x89, __u32)
|
@@ -1,6 +1,6 @@
|
||||
From 1ef0ea672662bd19e7c6a4eac1067d11e50844b2 Mon Sep 17 00:00:00 2001
|
||||
From 248013d9877d47dc5219344268c10b62de1f52f2 Mon Sep 17 00:00:00 2001
|
||||
From: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
Date: Sun, 19 May 2024 15:24:36 -0500
|
||||
Date: Fri, 13 Dec 2024 13:34:53 -0600
|
||||
Subject: ntsync: Introduce NTSYNC_IOC_SEM_READ.
|
||||
|
||||
This corresponds to the NT syscall NtQuerySemaphore().
|
||||
@@ -9,13 +9,13 @@ This returns the current count and maximum count of the semaphore.
|
||||
|
||||
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
---
|
||||
drivers/misc/ntsync.c | 26 ++++++++++++++++++++++++++
|
||||
drivers/misc/ntsync.c | 24 ++++++++++++++++++++++++
|
||||
include/uapi/linux/ntsync.h | 1 +
|
||||
2 files changed, 27 insertions(+)
|
||||
2 files changed, 25 insertions(+)
|
||||
|
||||
--- a/drivers/misc/ntsync.c
|
||||
+++ b/drivers/misc/ntsync.c
|
||||
@@ -583,6 +583,30 @@ static int ntsync_event_reset(struct nts
|
||||
@@ -583,6 +583,28 @@ static int ntsync_event_reset(struct nts
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -29,8 +29,6 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
+ if (sem->type != NTSYNC_TYPE_SEM)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ args.sem = 0;
|
||||
+
|
||||
+ all = ntsync_lock_obj(dev, sem);
|
||||
+
|
||||
+ args.count = sem->u.sem.count;
|
||||
@@ -46,10 +44,10 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
static int ntsync_obj_release(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct ntsync_obj *obj = file->private_data;
|
||||
@@ -602,6 +626,8 @@ static long ntsync_obj_ioctl(struct file
|
||||
@@ -602,6 +624,8 @@ static long ntsync_obj_ioctl(struct file
|
||||
switch (cmd) {
|
||||
case NTSYNC_IOC_SEM_POST:
|
||||
return ntsync_sem_post(obj, argp);
|
||||
case NTSYNC_IOC_SEM_RELEASE:
|
||||
return ntsync_sem_release(obj, argp);
|
||||
+ case NTSYNC_IOC_SEM_READ:
|
||||
+ return ntsync_sem_read(obj, argp);
|
||||
case NTSYNC_IOC_MUTEX_UNLOCK:
|
||||
@@ -57,7 +55,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
case NTSYNC_IOC_MUTEX_KILL:
|
||||
--- a/include/uapi/linux/ntsync.h
|
||||
+++ b/include/uapi/linux/ntsync.h
|
||||
@@ -54,5 +54,6 @@ struct ntsync_wait_args {
|
||||
@@ -51,5 +51,6 @@ struct ntsync_wait_args {
|
||||
#define NTSYNC_IOC_EVENT_SET _IOR ('N', 0x88, __u32)
|
||||
#define NTSYNC_IOC_EVENT_RESET _IOR ('N', 0x89, __u32)
|
||||
#define NTSYNC_IOC_EVENT_PULSE _IOR ('N', 0x8a, __u32)
|
@@ -1,6 +1,6 @@
|
||||
From 7891b7d15abd12975aebb955821fbc43353b45d6 Mon Sep 17 00:00:00 2001
|
||||
From 8fc7a993fd8bc6b1a09b4b965bee7d16bb2156cc Mon Sep 17 00:00:00 2001
|
||||
From: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
Date: Sun, 19 May 2024 15:24:37 -0500
|
||||
Date: Fri, 13 Dec 2024 13:34:54 -0600
|
||||
Subject: ntsync: Introduce NTSYNC_IOC_MUTEX_READ.
|
||||
|
||||
This corresponds to the NT syscall NtQueryMutant().
|
||||
@@ -9,13 +9,13 @@ This returns the recursion count, owner, and abandoned state of the mutex.
|
||||
|
||||
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
---
|
||||
drivers/misc/ntsync.c | 28 ++++++++++++++++++++++++++++
|
||||
drivers/misc/ntsync.c | 26 ++++++++++++++++++++++++++
|
||||
include/uapi/linux/ntsync.h | 1 +
|
||||
2 files changed, 29 insertions(+)
|
||||
2 files changed, 27 insertions(+)
|
||||
|
||||
--- a/drivers/misc/ntsync.c
|
||||
+++ b/drivers/misc/ntsync.c
|
||||
@@ -607,6 +607,32 @@ static int ntsync_sem_read(struct ntsync
|
||||
@@ -605,6 +605,30 @@ static int ntsync_sem_read(struct ntsync
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -30,8 +30,6 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
+ if (mutex->type != NTSYNC_TYPE_MUTEX)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ args.mutex = 0;
|
||||
+
|
||||
+ all = ntsync_lock_obj(dev, mutex);
|
||||
+
|
||||
+ args.count = mutex->u.mutex.count;
|
||||
@@ -48,7 +46,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
static int ntsync_obj_release(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct ntsync_obj *obj = file->private_data;
|
||||
@@ -632,6 +658,8 @@ static long ntsync_obj_ioctl(struct file
|
||||
@@ -630,6 +654,8 @@ static long ntsync_obj_ioctl(struct file
|
||||
return ntsync_mutex_unlock(obj, argp);
|
||||
case NTSYNC_IOC_MUTEX_KILL:
|
||||
return ntsync_mutex_kill(obj, argp);
|
||||
@@ -59,7 +57,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
case NTSYNC_IOC_EVENT_RESET:
|
||||
--- a/include/uapi/linux/ntsync.h
|
||||
+++ b/include/uapi/linux/ntsync.h
|
||||
@@ -55,5 +55,6 @@ struct ntsync_wait_args {
|
||||
@@ -52,5 +52,6 @@ struct ntsync_wait_args {
|
||||
#define NTSYNC_IOC_EVENT_RESET _IOR ('N', 0x89, __u32)
|
||||
#define NTSYNC_IOC_EVENT_PULSE _IOR ('N', 0x8a, __u32)
|
||||
#define NTSYNC_IOC_SEM_READ _IOR ('N', 0x8b, struct ntsync_sem_args)
|
@@ -1,6 +1,6 @@
|
||||
From 35ff252f99aa4002e0c2ecef37314a422969791b Mon Sep 17 00:00:00 2001
|
||||
From aed34cc9c28dba5e3735d7c59e1970a32eefc5f4 Mon Sep 17 00:00:00 2001
|
||||
From: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
Date: Sun, 19 May 2024 15:24:38 -0500
|
||||
Date: Fri, 13 Dec 2024 13:34:55 -0600
|
||||
Subject: ntsync: Introduce NTSYNC_IOC_EVENT_READ.
|
||||
|
||||
This corresponds to the NT syscall NtQueryEvent().
|
||||
@@ -9,13 +9,13 @@ This returns the signaled state of the event and whether it is manual-reset.
|
||||
|
||||
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
---
|
||||
drivers/misc/ntsync.c | 26 ++++++++++++++++++++++++++
|
||||
drivers/misc/ntsync.c | 24 ++++++++++++++++++++++++
|
||||
include/uapi/linux/ntsync.h | 1 +
|
||||
2 files changed, 27 insertions(+)
|
||||
2 files changed, 25 insertions(+)
|
||||
|
||||
--- a/drivers/misc/ntsync.c
|
||||
+++ b/drivers/misc/ntsync.c
|
||||
@@ -633,6 +633,30 @@ static int ntsync_mutex_read(struct ntsy
|
||||
@@ -629,6 +629,28 @@ static int ntsync_mutex_read(struct ntsy
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -29,8 +29,6 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
+ if (event->type != NTSYNC_TYPE_EVENT)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ args.event = 0;
|
||||
+
|
||||
+ all = ntsync_lock_obj(dev, event);
|
||||
+
|
||||
+ args.manual = event->u.event.manual;
|
||||
@@ -46,7 +44,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
static int ntsync_obj_release(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct ntsync_obj *obj = file->private_data;
|
||||
@@ -666,6 +690,8 @@ static long ntsync_obj_ioctl(struct file
|
||||
@@ -662,6 +684,8 @@ static long ntsync_obj_ioctl(struct file
|
||||
return ntsync_event_reset(obj, argp);
|
||||
case NTSYNC_IOC_EVENT_PULSE:
|
||||
return ntsync_event_set(obj, argp, true);
|
||||
@@ -57,7 +55,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
}
|
||||
--- a/include/uapi/linux/ntsync.h
|
||||
+++ b/include/uapi/linux/ntsync.h
|
||||
@@ -56,5 +56,6 @@ struct ntsync_wait_args {
|
||||
@@ -53,5 +53,6 @@ struct ntsync_wait_args {
|
||||
#define NTSYNC_IOC_EVENT_PULSE _IOR ('N', 0x8a, __u32)
|
||||
#define NTSYNC_IOC_SEM_READ _IOR ('N', 0x8b, struct ntsync_sem_args)
|
||||
#define NTSYNC_IOC_MUTEX_READ _IOR ('N', 0x8c, struct ntsync_mutex_args)
|
@@ -1,6 +1,6 @@
|
||||
From 2c391d57d1393cd46bf8bab08232ddc3dd32d5e5 Mon Sep 17 00:00:00 2001
|
||||
From 361a7fb848ba9cac87855cb68f9ab000ed1027be Mon Sep 17 00:00:00 2001
|
||||
From: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
Date: Sun, 19 May 2024 15:24:39 -0500
|
||||
Date: Fri, 13 Dec 2024 13:34:56 -0600
|
||||
Subject: ntsync: Introduce alertable waits.
|
||||
|
||||
NT waits can optionally be made "alertable". This is a special channel for
|
||||
@@ -21,7 +21,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
|
||||
--- a/drivers/misc/ntsync.c
|
||||
+++ b/drivers/misc/ntsync.c
|
||||
@@ -884,22 +884,29 @@ static int setup_wait(struct ntsync_devi
|
||||
@@ -869,22 +869,29 @@ static int setup_wait(struct ntsync_devi
|
||||
const struct ntsync_wait_args *args, bool all,
|
||||
struct ntsync_q **ret_q)
|
||||
{
|
||||
@@ -54,7 +54,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
if (!q)
|
||||
return -ENOMEM;
|
||||
q->task = current;
|
||||
@@ -909,7 +916,7 @@ static int setup_wait(struct ntsync_devi
|
||||
@@ -894,7 +901,7 @@ static int setup_wait(struct ntsync_devi
|
||||
q->ownerdead = false;
|
||||
q->count = count;
|
||||
|
||||
@@ -63,7 +63,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
struct ntsync_q_entry *entry = &q->entries[i];
|
||||
struct ntsync_obj *obj = get_obj(dev, fds[i]);
|
||||
|
||||
@@ -959,10 +966,10 @@ static void try_wake_any_obj(struct ntsy
|
||||
@@ -944,10 +951,10 @@ static void try_wake_any_obj(struct ntsy
|
||||
static int ntsync_wait_any(struct ntsync_device *dev, void __user *argp)
|
||||
{
|
||||
struct ntsync_wait_args args;
|
||||
@@ -75,7 +75,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
int ret;
|
||||
|
||||
if (copy_from_user(&args, argp, sizeof(args)))
|
||||
@@ -972,9 +979,13 @@ static int ntsync_wait_any(struct ntsync
|
||||
@@ -957,9 +964,13 @@ static int ntsync_wait_any(struct ntsync
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
@@ -90,7 +90,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
struct ntsync_q_entry *entry = &q->entries[i];
|
||||
struct ntsync_obj *obj = entry->obj;
|
||||
|
||||
@@ -983,9 +994,15 @@ static int ntsync_wait_any(struct ntsync
|
||||
@@ -968,9 +979,15 @@ static int ntsync_wait_any(struct ntsync
|
||||
ntsync_unlock_obj(dev, obj, all);
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
struct ntsync_obj *obj = q->entries[i].obj;
|
||||
|
||||
if (atomic_read(&q->signaled) != -1)
|
||||
@@ -1002,7 +1019,7 @@ static int ntsync_wait_any(struct ntsync
|
||||
@@ -987,7 +1004,7 @@ static int ntsync_wait_any(struct ntsync
|
||||
|
||||
/* and finally, unqueue */
|
||||
|
||||
@@ -117,7 +117,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
struct ntsync_q_entry *entry = &q->entries[i];
|
||||
struct ntsync_obj *obj = entry->obj;
|
||||
|
||||
@@ -1062,6 +1079,14 @@ static int ntsync_wait_all(struct ntsync
|
||||
@@ -1047,6 +1064,14 @@ static int ntsync_wait_all(struct ntsync
|
||||
*/
|
||||
list_add_tail(&entry->node, &obj->all_waiters);
|
||||
}
|
||||
@@ -132,7 +132,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
|
||||
/* check if we are already signaled */
|
||||
|
||||
@@ -1069,6 +1094,21 @@ static int ntsync_wait_all(struct ntsync
|
||||
@@ -1054,6 +1079,21 @@ static int ntsync_wait_all(struct ntsync
|
||||
|
||||
mutex_unlock(&dev->wait_all_lock);
|
||||
|
||||
@@ -154,7 +154,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
/* sleep */
|
||||
|
||||
ret = ntsync_schedule(q, &args);
|
||||
@@ -1094,6 +1134,18 @@ static int ntsync_wait_all(struct ntsync
|
||||
@@ -1079,6 +1119,18 @@ static int ntsync_wait_all(struct ntsync
|
||||
|
||||
mutex_unlock(&dev->wait_all_lock);
|
||||
|
||||
@@ -175,7 +175,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
struct ntsync_wait_args __user *user_args = argp;
|
||||
--- a/include/uapi/linux/ntsync.h
|
||||
+++ b/include/uapi/linux/ntsync.h
|
||||
@@ -37,7 +37,8 @@ struct ntsync_wait_args {
|
||||
@@ -34,7 +34,8 @@ struct ntsync_wait_args {
|
||||
__u32 index;
|
||||
__u32 flags;
|
||||
__u32 owner;
|
@@ -1,6 +1,6 @@
|
||||
From 8d87043cd76368bb9996ba541d12e40cbb4201e5 Mon Sep 17 00:00:00 2001
|
||||
From b240b27e5348d38acbc4a12f1dc762dd1845f391 Mon Sep 17 00:00:00 2001
|
||||
From: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
Date: Sun, 19 May 2024 15:24:52 -0500
|
||||
Date: Fri, 13 Dec 2024 13:35:09 -0600
|
||||
Subject: maintainers: Add an entry for ntsync.
|
||||
|
||||
Add myself as maintainer, supported by CodeWeavers.
|
@@ -1,6 +1,6 @@
|
||||
From 4cb25d42d38f1e0b144b084674591b70afa60bb0 Mon Sep 17 00:00:00 2001
|
||||
From 733e310bb840117593a0eb4726fa63b34fea9cc3 Mon Sep 17 00:00:00 2001
|
||||
From: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
Date: Sun, 19 May 2024 15:24:53 -0500
|
||||
Date: Fri, 13 Dec 2024 13:35:10 -0600
|
||||
Subject: docs: ntsync: Add documentation for the ntsync uAPI.
|
||||
|
||||
Add an overall explanation of the driver architecture, and complete and precise
|
||||
@@ -9,8 +9,8 @@ specification for its intended behaviour.
|
||||
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
---
|
||||
Documentation/userspace-api/index.rst | 1 +
|
||||
Documentation/userspace-api/ntsync.rst | 398 +++++++++++++++++++++++++
|
||||
2 files changed, 399 insertions(+)
|
||||
Documentation/userspace-api/ntsync.rst | 385 +++++++++++++++++++++++++
|
||||
2 files changed, 386 insertions(+)
|
||||
create mode 100644 Documentation/userspace-api/ntsync.rst
|
||||
|
||||
--- a/Documentation/userspace-api/index.rst
|
||||
@@ -25,7 +25,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
|
||||
--- /dev/null
|
||||
+++ b/Documentation/userspace-api/ntsync.rst
|
||||
@@ -0,0 +1,398 @@
|
||||
@@ -0,0 +1,385 @@
|
||||
+===================================
|
||||
+NT synchronization primitive driver
|
||||
+===================================
|
||||
@@ -101,19 +101,16 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
+structures used in ioctl calls::
|
||||
+
|
||||
+ struct ntsync_sem_args {
|
||||
+ __u32 sem;
|
||||
+ __u32 count;
|
||||
+ __u32 max;
|
||||
+ };
|
||||
+
|
||||
+ struct ntsync_mutex_args {
|
||||
+ __u32 mutex;
|
||||
+ __u32 owner;
|
||||
+ __u32 count;
|
||||
+ };
|
||||
+
|
||||
+ struct ntsync_event_args {
|
||||
+ __u32 event;
|
||||
+ __u32 signaled;
|
||||
+ __u32 manual;
|
||||
+ };
|
||||
@@ -130,7 +127,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
+ };
|
||||
+
|
||||
+Depending on the ioctl, members of the structure may be used as input,
|
||||
+output, or not at all. All ioctls return 0 on success.
|
||||
+output, or not at all.
|
||||
+
|
||||
+The ioctls on the device file are as follows:
|
||||
+
|
||||
@@ -141,14 +138,13 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
+
|
||||
+ .. list-table::
|
||||
+
|
||||
+ * - ``sem``
|
||||
+ - On output, contains a file descriptor to the created semaphore.
|
||||
+ * - ``count``
|
||||
+ - Initial count of the semaphore.
|
||||
+ * - ``max``
|
||||
+ - Maximum count of the semaphore.
|
||||
+
|
||||
+ Fails with ``EINVAL`` if ``count`` is greater than ``max``.
|
||||
+ On success, returns a file descriptor the created semaphore.
|
||||
+
|
||||
+.. c:macro:: NTSYNC_IOC_CREATE_MUTEX
|
||||
+
|
||||
@@ -157,8 +153,6 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
+
|
||||
+ .. list-table::
|
||||
+
|
||||
+ * - ``mutex``
|
||||
+ - On output, contains a file descriptor to the created mutex.
|
||||
+ * - ``count``
|
||||
+ - Initial recursion count of the mutex.
|
||||
+ * - ``owner``
|
||||
@@ -166,6 +160,7 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
+
|
||||
+ If ``owner`` is nonzero and ``count`` is zero, or if ``owner`` is
|
||||
+ zero and ``count`` is nonzero, the function fails with ``EINVAL``.
|
||||
+ On success, returns a file descriptor the created mutex.
|
||||
+
|
||||
+.. c:macro:: NTSYNC_IOC_CREATE_EVENT
|
||||
+
|
||||
@@ -174,8 +169,6 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
+
|
||||
+ .. list-table::
|
||||
+
|
||||
+ * - ``event``
|
||||
+ - On output, contains a file descriptor to the created event.
|
||||
+ * - ``signaled``
|
||||
+ - If nonzero, the event is initially signaled, otherwise
|
||||
+ nonsignaled.
|
||||
@@ -183,6 +176,8 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
+ - If nonzero, the event is a manual-reset event, otherwise
|
||||
+ auto-reset.
|
||||
+
|
||||
+ On success, returns a file descriptor the created event.
|
||||
+
|
||||
+The ioctls on the individual objects are as follows:
|
||||
+
|
||||
+.. c:macro:: NTSYNC_IOC_SEM_POST
|
||||
@@ -205,8 +200,6 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
+
|
||||
+ .. list-table::
|
||||
+
|
||||
+ * - ``mutex``
|
||||
+ - Ignored.
|
||||
+ * - ``owner``
|
||||
+ - Specifies the owner trying to release this mutex.
|
||||
+ * - ``count``
|
||||
@@ -255,8 +248,6 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
+
|
||||
+ .. list-table::
|
||||
+
|
||||
+ * - ``sem``
|
||||
+ - Ignored.
|
||||
+ * - ``count``
|
||||
+ - On output, contains the current count of the semaphore.
|
||||
+ * - ``max``
|
||||
@@ -269,8 +260,6 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
+
|
||||
+ .. list-table::
|
||||
+
|
||||
+ * - ``mutex``
|
||||
+ - Ignored.
|
||||
+ * - ``owner``
|
||||
+ - On output, contains the current owner of the mutex, or zero
|
||||
+ if the mutex is not currently owned.
|
||||
@@ -288,8 +277,6 @@ Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
+
|
||||
+ .. list-table::
|
||||
+
|
||||
+ * - ``event``
|
||||
+ - Ignored.
|
||||
+ * - ``signaled``
|
||||
+ - On output, contains the current state of the event.
|
||||
+ * - ``manual``
|
25
debian/patches/misc-ntsync7/0018-ntsync-No-longer-depend-on-BROKEN.patch
vendored
Normal file
25
debian/patches/misc-ntsync7/0018-ntsync-No-longer-depend-on-BROKEN.patch
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
From 4871bb89577d78a3d55b44e47c3a4f677dbdc89b Mon Sep 17 00:00:00 2001
|
||||
From: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
Date: Fri, 13 Dec 2024 13:35:11 -0600
|
||||
Subject: ntsync: No longer depend on BROKEN.
|
||||
|
||||
f5b335dc025cfee90957efa90dc72fada0d5abb4 ("misc: ntsync: mark driver as "broken"
|
||||
to prevent from building") was committed to avoid the driver being used while
|
||||
only part of its functionality was released. Since the rest of the functionality
|
||||
has now been committed, revert this.
|
||||
|
||||
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
|
||||
---
|
||||
drivers/misc/Kconfig | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
--- a/drivers/misc/Kconfig
|
||||
+++ b/drivers/misc/Kconfig
|
||||
@@ -517,7 +517,6 @@ config OPEN_DICE
|
||||
|
||||
config NTSYNC
|
||||
tristate "NT synchronization primitive emulation"
|
||||
- depends on BROKEN
|
||||
help
|
||||
This module provides kernel support for emulation of Windows NT
|
||||
synchronization primitives. It is not a hardware driver.
|
@@ -13,7 +13,7 @@ dependency on CONFIG_ARC and adds RUSTFLAGS.
|
||||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -812,6 +812,9 @@ KBUILD_CFLAGS += -fno-delete-null-pointe
|
||||
@@ -813,6 +813,9 @@ KBUILD_CFLAGS += -fno-delete-null-pointe
|
||||
ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
|
||||
KBUILD_CFLAGS += -O2
|
||||
KBUILD_RUSTFLAGS += -Copt-level=2
|
||||
|
@@ -1,6 +1,6 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -820,6 +820,10 @@ KBUILD_CFLAGS += -Os
|
||||
@@ -821,6 +821,10 @@ KBUILD_CFLAGS += -Os
|
||||
KBUILD_RUSTFLAGS += -Copt-level=s
|
||||
endif
|
||||
|
||||
|
@@ -11,7 +11,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
|
||||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -824,6 +824,13 @@ ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
|
||||
@@ -825,6 +825,13 @@ ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
|
||||
KBUILD_CFLAGS += $(call cc-option,-fivopts)
|
||||
endif
|
||||
|
||||
|
24
debian/patches/mixed-arch/0007-PF-kbuild-6.12-adopt-proposed-upstream-change-for-gener.patch
vendored
Normal file
24
debian/patches/mixed-arch/0007-PF-kbuild-6.12-adopt-proposed-upstream-change-for-gener.patch
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
From 578cb97f41beb5d2dde81b8a4c1db6e01e8bcc6a Mon Sep 17 00:00:00 2001
|
||||
From: Oleksandr Natalenko <oleksandr@natalenko.name>
|
||||
Date: Wed, 11 Dec 2024 08:50:50 +0100
|
||||
Subject: kbuild-6.12: adopt proposed upstream change for generic CPUs
|
||||
|
||||
Link: https://lore.kernel.org/lkml/20241210144945.2325330-4-arnd@kernel.org/
|
||||
Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name>
|
||||
---
|
||||
arch/x86/Makefile | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/arch/x86/Makefile
|
||||
+++ b/arch/x86/Makefile
|
||||
@@ -184,8 +184,8 @@ else
|
||||
cflags-$(CONFIG_MCORE2) += -march=core2
|
||||
cflags-$(CONFIG_MATOM) += -march=bonnell
|
||||
ifeq ($(CONFIG_X86_64_VERSION),1)
|
||||
- cflags-$(CONFIG_GENERIC_CPU) += -mtune=generic
|
||||
- rustflags-$(CONFIG_GENERIC_CPU) += -Ztune-cpu=generic
|
||||
+ cflags-$(CONFIG_GENERIC_CPU) += -march=x86-64 -mtune=generic
|
||||
+ rustflags-$(CONFIG_GENERIC_CPU) += -Ctarget-cpu=x86-64 -Ztune-cpu=generic
|
||||
else
|
||||
cflags-$(CONFIG_GENERIC_CPU) += -march=x86-64-v$(CONFIG_X86_64_VERSION)
|
||||
rustflags-$(CONFIG_GENERIC_CPU) += -Ctarget-cpu=x86-64-v$(CONFIG_X86_64_VERSION)
|
@@ -142,7 +142,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
|
||||
* and hopefully then we'll have sufficient space.
|
||||
--- a/net/ipv4/tcp_ipv4.c
|
||||
+++ b/net/ipv4/tcp_ipv4.c
|
||||
@@ -3524,6 +3524,7 @@ static int __net_init tcp_sk_init(struct
|
||||
@@ -3525,6 +3525,7 @@ static int __net_init tcp_sk_init(struct
|
||||
|
||||
net->ipv4.sysctl_tcp_syn_linear_timeouts = 4;
|
||||
net->ipv4.sysctl_tcp_shrink_window = 0;
|
||||
|
@@ -180,7 +180,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
|
||||
/*
|
||||
* Some NVIDIA GPU devices do not work with bus reset, SBR needs to be
|
||||
* prevented for those affected devices.
|
||||
@@ -5168,6 +5268,8 @@ static const struct pci_dev_acs_enabled
|
||||
@@ -5171,6 +5271,8 @@ static const struct pci_dev_acs_enabled
|
||||
{ PCI_VENDOR_ID_ZHAOXIN, PCI_ANY_ID, pci_quirk_zhaoxin_pcie_ports_acs },
|
||||
/* Wangxun nics */
|
||||
{ PCI_VENDOR_ID_WANGXUN, PCI_ANY_ID, pci_quirk_wangxun_nic_acs },
|
||||
|
@@ -12,7 +12,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
|
||||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -996,15 +996,8 @@ export CC_FLAGS_FPU
|
||||
@@ -997,15 +997,8 @@ export CC_FLAGS_FPU
|
||||
export CC_FLAGS_NO_FPU
|
||||
|
||||
ifneq ($(CONFIG_FUNCTION_ALIGNMENT),0)
|
||||
|
@@ -11,11 +11,11 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
|
||||
|
||||
--- a/scripts/setlocalversion
|
||||
+++ b/scripts/setlocalversion
|
||||
@@ -92,7 +92,6 @@ scm_version()
|
||||
@@ -113,7 +113,6 @@ scm_version()
|
||||
# If only the short version is requested, don't bother
|
||||
# running further git commands
|
||||
if $short; then
|
||||
- echo "+"
|
||||
return
|
||||
fi
|
||||
# If we are past the tagged commit, we pretty print it.
|
||||
|
||||
|
@@ -11,7 +11,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
|
||||
|
||||
--- a/scripts/setlocalversion
|
||||
+++ b/scripts/setlocalversion
|
||||
@@ -182,4 +182,4 @@ elif [ "${LOCALVERSION+set}" != "set" ];
|
||||
@@ -204,4 +204,4 @@ elif [ "${LOCALVERSION+set}" != "set" ];
|
||||
scm_version="$(scm_version --short)"
|
||||
fi
|
||||
|
||||
|
@@ -15,7 +15,7 @@ Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
|
||||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1018,11 +1018,6 @@ KBUILD_CFLAGS += -fno-strict-overflow
|
||||
@@ -1019,11 +1019,6 @@ KBUILD_CFLAGS += -fno-strict-overflow
|
||||
# Make sure -fstack-check isn't enabled (like gentoo apparently did)
|
||||
KBUILD_CFLAGS += -fno-stack-check
|
||||
|
||||
|
@@ -49,7 +49,7 @@ Subject: ZEN: drm/amdgpu/pm: Allow override of min_power_limit with
|
||||
*/
|
||||
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
|
||||
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
|
||||
@@ -3272,6 +3272,9 @@ static ssize_t amdgpu_hwmon_show_power_c
|
||||
@@ -3276,6 +3276,9 @@ static ssize_t amdgpu_hwmon_show_power_c
|
||||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
@@ -61,7 +61,7 @@ Subject: ZEN: drm/amdgpu/pm: Allow override of min_power_limit with
|
||||
|
||||
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
|
||||
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
|
||||
@@ -2779,7 +2779,10 @@ int smu_get_power_limit(void *handle,
|
||||
@@ -2792,7 +2792,10 @@ int smu_get_power_limit(void *handle,
|
||||
*limit = smu->max_power_limit;
|
||||
break;
|
||||
case SMU_PPT_LIMIT_MIN:
|
||||
@@ -73,7 +73,7 @@ Subject: ZEN: drm/amdgpu/pm: Allow override of min_power_limit with
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
@@ -2803,7 +2806,14 @@ static int smu_set_power_limit(void *han
|
||||
@@ -2816,7 +2819,14 @@ static int smu_set_power_limit(void *han
|
||||
if (smu->ppt_funcs->set_power_limit)
|
||||
return smu->ppt_funcs->set_power_limit(smu, limit_type, limit);
|
||||
|
||||
|
@@ -0,0 +1,22 @@
|
||||
From a31b09c511dd58e5032a3c941638207281b20ce4 Mon Sep 17 00:00:00 2001
|
||||
From: Steven Barrett <steven@liquorix.net>
|
||||
Date: Sat, 14 Dec 2024 11:23:18 -0600
|
||||
Subject: ZEN: kernel/Kconfig.preempt: Remove EXPERT conditional on PREEMPT_RT
|
||||
|
||||
Allow users to select PREEMPT_RT without requiring to configure all
|
||||
items hidden by enabling CONFIG_EXPERT.
|
||||
---
|
||||
kernel/Kconfig.preempt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/kernel/Kconfig.preempt
|
||||
+++ b/kernel/Kconfig.preempt
|
||||
@@ -69,7 +69,7 @@ config PREEMPT
|
||||
|
||||
config PREEMPT_RT
|
||||
bool "Fully Preemptible Kernel (Real-Time)"
|
||||
- depends on EXPERT && ARCH_SUPPORTS_RT
|
||||
+ depends on ARCH_SUPPORTS_RT
|
||||
select PREEMPTION
|
||||
help
|
||||
This option turns the kernel into a real-time kernel by replacing
|
36
debian/patches/series
vendored
36
debian/patches/series
vendored
@@ -122,6 +122,7 @@ mixed-arch/0003-krd-adjust-CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3.patch
|
||||
mixed-arch/0004-XANMOD-x86-build-Prevent-generating-avx2-and-avx512-.patch
|
||||
mixed-arch/0005-krd-adjust-KBUILD_CFLAGS-fno-tree-vectorize.patch
|
||||
mixed-arch/0006-XANMOD-kbuild-Add-GCC-SMS-based-modulo-scheduling-fl.patch
|
||||
mixed-arch/0007-PF-kbuild-6.12-adopt-proposed-upstream-change-for-gener.patch
|
||||
|
||||
misc-bbr3/0001-net-tcp_bbr-broaden-app-limited-rate-sample-detectio.patch
|
||||
misc-bbr3/0002-net-tcp_bbr-v2-shrink-delivered_mstamp-first_tx_msta.patch
|
||||
@@ -143,22 +144,24 @@ misc-bbr3/0017-net-tcp_bbr-v3-ensure-ECN-enabled-BBR-flows-set-ECT-.patch
|
||||
misc-bbr3/0018-tcp-export-TCPI_OPT_ECN_LOW-in-tcp_info-tcpi_options.patch
|
||||
misc-bbr3/0019-x86-cfi-bpf-Add-tso_segs-and-skb_marked_lost-to-bpf_.patch
|
||||
|
||||
misc-ntsync5/0001-ntsync-Introduce-NTSYNC_IOC_WAIT_ANY.patch
|
||||
misc-ntsync5/0002-ntsync-Introduce-NTSYNC_IOC_WAIT_ALL.patch
|
||||
misc-ntsync5/0003-ntsync-Introduce-NTSYNC_IOC_CREATE_MUTEX.patch
|
||||
misc-ntsync5/0004-ntsync-Introduce-NTSYNC_IOC_MUTEX_UNLOCK.patch
|
||||
misc-ntsync5/0005-ntsync-Introduce-NTSYNC_IOC_MUTEX_KILL.patch
|
||||
misc-ntsync5/0006-ntsync-Introduce-NTSYNC_IOC_CREATE_EVENT.patch
|
||||
misc-ntsync5/0007-ntsync-Introduce-NTSYNC_IOC_EVENT_SET.patch
|
||||
misc-ntsync5/0008-ntsync-Introduce-NTSYNC_IOC_EVENT_RESET.patch
|
||||
misc-ntsync5/0009-ntsync-Introduce-NTSYNC_IOC_EVENT_PULSE.patch
|
||||
misc-ntsync5/0010-ntsync-Introduce-NTSYNC_IOC_SEM_READ.patch
|
||||
misc-ntsync5/0011-ntsync-Introduce-NTSYNC_IOC_MUTEX_READ.patch
|
||||
misc-ntsync5/0012-ntsync-Introduce-NTSYNC_IOC_EVENT_READ.patch
|
||||
misc-ntsync5/0013-ntsync-Introduce-alertable-waits.patch
|
||||
misc-ntsync5/0014-maintainers-Add-an-entry-for-ntsync.patch
|
||||
misc-ntsync5/0015-docs-ntsync-Add-documentation-for-the-ntsync-uAPI.patch
|
||||
misc-ntsync5/0016-Revert-misc-ntsync-mark-driver-as-broken-to-prevent-.patch
|
||||
misc-ntsync7/0001-ntsync-Return-the-fd-from-NTSYNC_IOC_CREATE_SEM.patch
|
||||
misc-ntsync7/0002-ntsync-Rename-NTSYNC_IOC_SEM_POST-to-NTSYNC_IOC_SEM_.patch
|
||||
misc-ntsync7/0003-ntsync-Introduce-NTSYNC_IOC_WAIT_ANY.patch
|
||||
misc-ntsync7/0004-ntsync-Introduce-NTSYNC_IOC_WAIT_ALL.patch
|
||||
misc-ntsync7/0005-ntsync-Introduce-NTSYNC_IOC_CREATE_MUTEX.patch
|
||||
misc-ntsync7/0006-ntsync-Introduce-NTSYNC_IOC_MUTEX_UNLOCK.patch
|
||||
misc-ntsync7/0007-ntsync-Introduce-NTSYNC_IOC_MUTEX_KILL.patch
|
||||
misc-ntsync7/0008-ntsync-Introduce-NTSYNC_IOC_CREATE_EVENT.patch
|
||||
misc-ntsync7/0009-ntsync-Introduce-NTSYNC_IOC_EVENT_SET.patch
|
||||
misc-ntsync7/0010-ntsync-Introduce-NTSYNC_IOC_EVENT_RESET.patch
|
||||
misc-ntsync7/0011-ntsync-Introduce-NTSYNC_IOC_EVENT_PULSE.patch
|
||||
misc-ntsync7/0012-ntsync-Introduce-NTSYNC_IOC_SEM_READ.patch
|
||||
misc-ntsync7/0013-ntsync-Introduce-NTSYNC_IOC_MUTEX_READ.patch
|
||||
misc-ntsync7/0014-ntsync-Introduce-NTSYNC_IOC_EVENT_READ.patch
|
||||
misc-ntsync7/0015-ntsync-Introduce-alertable-waits.patch
|
||||
misc-ntsync7/0016-maintainers-Add-an-entry-for-ntsync.patch
|
||||
misc-ntsync7/0017-docs-ntsync-Add-documentation-for-the-ntsync-uAPI.patch
|
||||
misc-ntsync7/0018-ntsync-No-longer-depend-on-BROKEN.patch
|
||||
|
||||
misc-openwrt/0001-mac80211-ignore-AP-power-level-when-tx-power-type-is.patch
|
||||
|
||||
@@ -298,6 +301,7 @@ patchset-zen/sauce/0020-ZEN-INTERACTIVE-dm-crypt-Disable-workqueues-for-cryp.pat
|
||||
patchset-zen/sauce/0021-ZEN-INTERACTIVE-mm-swap-Disable-swap-in-readahead.patch
|
||||
patchset-zen/sauce/0022-ZEN-INTERACTIVE-Document-PDS-BMQ-configuration.patch
|
||||
patchset-zen/sauce/0023-ZEN-ahci-Disable-staggered-spinup-by-default.patch
|
||||
patchset-zen/sauce/0024-ZEN-kernel-Kconfig.preempt-Remove-EXPERT-conditional.patch
|
||||
|
||||
patchset-pf/fixes/0001-arch-Kconfig-Default-to-maximum-amount-of-ASLR-bits.patch
|
||||
patchset-pf/fixes/0002-drivers-firmware-skip-simpledrm-if-nvidia-drm.modese.patch
|
||||
|
Reference in New Issue
Block a user