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: <20200622081635.GC577403@hirez.programming.kicks-ass.net>
Date:   Mon, 22 Jun 2020 10:16:35 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Kees Cook <keescook@...omium.org>,
        Guenter Roeck <linux@...ck-us.net>,
        Eric Biggers <ebiggers@...nel.org>, x86 <x86@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>
Subject: Re: [tip: sched/urgent] sched: Fix RANDSTRUCT build fail

On Mon, Jun 22, 2020 at 10:10:27AM +0200, Peter Zijlstra wrote:

> Instead of relying on BUG_ON() to ensure the various data structures
> line up, use a bunch of horrible unions.

>  struct irq_work {
> +	union {
> +		struct __call_single_node node;
> +		struct {
> +			struct llist_node llnode;
> +			atomic_t flags;
> +		};
> +	};
>  	void (*func)(struct irq_work *);
>  };

>  struct __call_single_data {
> +	union {
> +		struct __call_single_node node;
> +		struct {
> +			struct llist_node llist;
> +			unsigned int flags;
> +		};
> +	};
>  	smp_call_func_t func;
>  	void *info;
>  };

FWIW, I have 2 further patches, one for each of these structures to get
rid of the horrible union. They are somewhat larger and I was planning
to hold on to them for next round, but if you want them now, I can
certainly do that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ