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]
Date:	Thu, 07 May 2009 12:54:39 +0100
From:	Richard Kennedy <richard@....demon.co.uk>
To:	Oleg Nesterov <oleg@...hat.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>,
	Roland McGrath <roland@...hat.com>,
	Vitaly Mayatskikh <vmayatsk@...hat.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/5] introduce "struct wait_opts" to simplify do_wait()
   pathes

Oleg Nesterov wrote:
> Introduce "struct wait_opts" which holds the parameters for misc helpers
> in do_wait() pathes.
> 
> This adds 13 lines to kernel/exit.c, but saves 256 bytes from .o and imho
> makes the code much more readable.
> 
> This patch temporary uglifies rusage/siginfo code a little bit, will be
> addressed by further cleanups.
> 
> Signed-off-by: Oleg Nesterov <oleg@...hat.com>
> Reviewed-by: Ingo Molnar <mingo@...e.hu>
> ---
> 
>  kernel/exit.c |  207 ++++++++++++++++++++++++++++++----------------------------
>  1 file changed, 110 insertions(+), 97 deletions(-)
> 
> --- PTRACE/kernel/exit.c~2_WOPTS	2009-05-07 04:32:08.000000000 +0200
> +++ PTRACE/kernel/exit.c	2009-05-07 04:37:49.000000000 +0200
> @@ -1076,6 +1076,18 @@ SYSCALL_DEFINE1(exit_group, int, error_c
>  	return 0;
>  }
>  
> +struct wait_opts {
> +	enum pid_type		wo_type;
> +	struct pid		*wo_pid;
> +	int			wo_flags;
> +
> +	struct siginfo __user	*wo_info;
> +	int __user		*wo_stat;
> +	struct rusage __user	*wo_rusage;
> +
> +	int			notask_error;
> +};
> +

Hi Oleg,
you can remove 8 bytes of alignment padding from wait_opts on 64bit
builds if you reorder it slightly.

struct wait_opts {
	enum pid_type 	wo_type;
	int 		wo_flags;
	struct pid	*wo_pid;
	...



regards
Richard

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ