lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fbdea234-b8cf-7ac7-7c26-b593cb7f5427@kernel.dk>
Date:   Fri, 14 Jul 2023 14:16:06 -0600
From:   Jens Axboe <axboe@...nel.dk>
To:     Christian Brauner <brauner@...nel.org>
Cc:     io-uring@...r.kernel.org, linux-kernel@...r.kernel.org,
        arnd@...db.de
Subject: Re: [PATCH 4/5] exit: add internal include file with helpers

On 7/14/23 9:38?AM, Christian Brauner wrote:
>> diff --git a/kernel/exit.h b/kernel/exit.h
>> new file mode 100644
>> index 000000000000..f10207ba1341
>> --- /dev/null
>> +++ b/kernel/exit.h
>> @@ -0,0 +1,30 @@
>> +// SPDX-License-Identifier: GPL-2.0-only
>> +#ifndef LINUX_WAITID_H
>> +#define LINUX_WAITID_H
>> +
>> +struct waitid_info {
>> +	pid_t pid;
>> +	uid_t uid;
>> +	int status;
>> +	int cause;
>> +};
>> +
>> +struct wait_opts {
>> +	enum pid_type		wo_type;
>> +	int			wo_flags;
>> +	struct pid		*wo_pid;
>> +
>> +	struct waitid_info	*wo_info;
>> +	int			wo_stat;
>> +	struct rusage		*wo_rusage;
>> +
>> +	wait_queue_entry_t		child_wait;
>> +	int			notask_error;
>> +};
>> +
>> +bool pid_child_should_wake(struct wait_opts *wo, struct task_struct *p);
>> +long __do_wait(struct wait_opts *wo);
>> +int kernel_waitid_prepare(struct wait_opts *wo, int which, pid_t upid,
>> +			  struct waitid_info *infop, int options,
>> +			  struct rusage *ru, unsigned int *f_flags);
> 
> I know this isn't your mess obviously but could you try and see whether
> you can expose a nicer, dedicated struct and helper suited to io_uring's
> needs instead of exposing the messy kernel/exit.c format?

>From a quick look, I think the wait_opts is pretty much what we need,
not much to cut from that. For waitid_info, we can make do with just a
forward declaration, we don't need the whole thing.

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ