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: <20190822153212.GU22020@lenoir>
Date:   Thu, 22 Aug 2019 17:32:13 +0200
From:   Frederic Weisbecker <frederic@...nel.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Oleg Nesterov <oleg@...hat.com>,
        Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        John Stultz <john.stultz@...aro.org>,
        Anna-Maria Behnsen <anna-maria@...utronix.de>,
        Christoph Hellwig <hch@....de>
Subject: Re: [patch V2 17/38] posix-cpu-timers: Create a container struct

On Wed, Aug 21, 2019 at 09:09:04PM +0200, Thomas Gleixner wrote:
> --- a/include/linux/posix-timers.h
> +++ b/include/linux/posix-timers.h
> @@ -62,6 +62,40 @@ static inline int clockid_to_fd(const cl
>  	return ~(clk >> 3);
>  }

Shouldn't you start the #ifdef CONFIG_POSIX_TIMERS here?
Because you're redefining struct posix_cputimers otherwise.

> +/**
> + * posix_cputimers - Container for posix CPU timer related data
> + * @cpu_timers:		List heads to queue posix CPU timers
> + *
> + * Used in task_struct and signal_struct
> + */
> +struct posix_cputimers {
> +	struct list_head	cpu_timers[CPUCLOCK_MAX];
> +};
> +
> +static inline void posix_cputimers_init(struct posix_cputimers *pct)
> +{
> +	INIT_LIST_HEAD(&pct->cpu_timers[0]);
> +	INIT_LIST_HEAD(&pct->cpu_timers[1]);
> +	INIT_LIST_HEAD(&pct->cpu_timers[2]);
> +}
> +
> +#ifdef CONFIG_POSIX_TIMERS
> +/* Init task static initializer */
> +#define INIT_CPU_TIMERLISTS(c)	{					\
> +	LIST_HEAD_INIT(c.cpu_timers[0]),				\
> +	LIST_HEAD_INIT(c.cpu_timers[1]),				\
> +	LIST_HEAD_INIT(c.cpu_timers[2]),				\
> +}
> +
> +#define INIT_CPU_TIMERS(s)						\
> +	.posix_cputimers = {						\
> +		.cpu_timers = INIT_CPU_TIMERLISTS(s.posix_cputimers),	\
> +	},
> +#else
> +struct posix_cputimers { };
> +#define INIT_CPU_TIMERS(s)
> +#endif
> +

Other than that:

Reviewed-by: Frederic Weisbecker <frederic@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ