Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 12 Feb 2019 09:20:34 +0200
From: Igor Stoppa <>
To: Matthew Wilcox <>
Cc: Igor Stoppa <>,
 Andy Lutomirski <>, Nadav Amit <>,
 Peter Zijlstra <>, Kees Cook <>,
 Dave Hansen <>,
 Mimi Zohar <>,
 Thiago Jung Bauermann <>,
 Ahmed Soliman <>,,,,
Subject: Re: [RFC PATCH v4 01/12] __wr_after_init: Core and default arch

On 12/02/2019 04:39, Matthew Wilcox wrote:
> On Tue, Feb 12, 2019 at 01:27:38AM +0200, Igor Stoppa wrote:
>> +#ifndef CONFIG_PRMEM
> [...]
>> +#else
>> +
>> +#include <linux/mm.h>
> It's a mistake to do conditional includes like this.  That way you see
> include loops with some configs and not others.  Our headers are already
> so messy, better to just include mm.h unconditionally.


Can I still do the following, in prmem.c ?

+#include <asm/prmem.h>
+struct wr_state {
+       struct mm_struct *prev;

It's still a conditional include, but it's in a C file, it shouldn't 
cause any chance of loops.

The alternative is that each arch supporting prmem must have a 
(probably) empty asm/prmem.h header.

I did some reasearch about telling the compiler to include a header only 
if it exists, but it doesn't seem to be a gcc feature.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.