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: <cd9590e5-5a0a-7ee4-a214-2ddbe00ee572@c-s.fr>
Date:   Thu, 4 Oct 2018 10:32:40 +0200
From:   Christophe LEROY <christophe.leroy@....fr>
To:     "Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>,
        Nicholas Piggin <npiggin@...il.com>
Cc:     Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>,
        Michael Ellerman <mpe@...erman.id.au>,
        aneesh.kumar@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
        linuxppc-dev@...ts.ozlabs.org
Subject: Re: [RFC PATCH v3 1/7] book3s/64: avoid circular header inclusion in
 mmu-hash.h



Le 04/10/2018 à 10:23, Aneesh Kumar K.V a écrit :
> On 10/4/18 1:50 PM, Christophe LEROY wrote:
>>
>>
>> Le 03/10/2018 à 06:24, Nicholas Piggin a écrit :
>>> On Mon,  1 Oct 2018 12:30:19 +0000 (UTC)
>>> Christophe Leroy <christophe.leroy@....fr> wrote:
>>>
>>>> When activating CONFIG_THREAD_INFO_IN_TASK, linux/sched.h
>>>> includes asm/current.h. This generates a circular dependency.
>>>> To avoid that, asm/processor.h shall not be included in mmu-hash.h
>>>>
>>>> In order to do that, this patch moves into a new header called
>>>> asm/task_size.h the information from asm/processor.h requires by
>>>> mmu-hash.h
>>>
>>> Doesn't look like you use this header in 32-bit code. Put task_size.h
>>> in asm/64/ maybe?
>>
>> There is no asm/64/ dir at the time being, only book3s/64/ and nohash/64/
>>
>> I'm thinking about leaving it in asm/ but renaming it task_size_user64.h
>>
> 
> Quiet a lot of that is book3s 64 specifi because we have there.
> 
> #if defined(CONFIG_PPC_BOOK3S_64) && defined(CONFIG_PPC_64K_PAGES)
> /*
>   * Max value currently used:
>   */

We have an #if / #else

#if defined(CONFIG_PPC_BOOK3S_64) && defined(CONFIG_PPC_64K_PAGES)
/*
  * Max value currently used:
  */
#define TASK_SIZE_USER64		TASK_SIZE_4PB
#define DEFAULT_MAP_WINDOW_USER64	TASK_SIZE_128TB
#define TASK_CONTEXT_SIZE		TASK_SIZE_512TB

#else

#define TASK_SIZE_USER64		TASK_SIZE_64TB
#define DEFAULT_MAP_WINDOW_USER64	TASK_SIZE_64TB
/*
  * We don't need to allocate extended context ids for 4K page size, because
  * we limit the max effective address on this config to 64TB.
  */
#define TASK_CONTEXT_SIZE		TASK_SIZE_64TB
#endif

And processor .h derives several other consts applying to both BOOK3S64 
et BOOK3E64 from that.


And arch/powerpc/mm/pgtable-book3e.c has:

	BUILD_BUG_ON(TASK_SIZE_USER64 > PGTABLE_RANGE);


Christophe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ