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: <4A826785.4000509@kernel.org>
Date:	Wed, 12 Aug 2009 15:56:05 +0900
From:	Tejun Heo <tj@...nel.org>
To:	"Yu, Fenghua" <fenghua.yu@...el.com>
CC:	"Luck, Tony" <tony.luck@...el.com>,
	"'lkml'" <linux-kernel@...r.kernel.org>,
	"'linux-arch@...r.kernel.org'" <linux-arch@...r.kernel.org>,
	"'linux-ia64@...r.kernel.org'" <linux-ia64@...r.kernel.org>
Subject: Re: [RFC PATCH] ia64: convert to dynamic percpu allocator

Yu, Fenghua wrote:
>> Yu, Fenghua wrote:
>>
>>> After cloning from
>>> git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu.git, kernel
>>> built with CONFIG_DISCONTIGMEM=y boots ok.
>>>
>>> After pulling from review-ia64, kernel built with
>>> CONFIG_DISCONTIGMEM=y can not boot on ia64. After loading kernel and
>>> initrd, system hangs and doesn't show anything on serial port.
>> Heh, I didn't really expect it to work that easily either.  The code
>> builds but is completely untested (I can't test them).  Can you try to
>> track it down?  Serial console should be up and running at that point,
>> no?
>>
>> Thanks.
> 
> IA64 kernel boots hit this in mm/percpu.c
> BUG_ON(ai->unit_size < size_sum);
> ai->unit_size is PERCPU_PAGE_SIZE which is 64K on IA64. size_sum is
> relatively smaller than 64K.
> 
> Will you define PERCPU_DYNAMIC_RESERVE and PERCPU_MODULE_RESERVE as
> PAGE_SIZE or the bigger one between the current definition and
> PAGE_SIZE?

Hmmm...

* Is ai->reserved_size necessary for ia64?  This is necessary if
  there's linking range restriction when loading modules.
  ai->reserved_size guarantees that all static module percpu variables
  are allocated in the first chunk which will be in the linear address
  range and very close to __per_cpu_start.  If ai->reserved_size is
  not set, these areas are likely to end up high in the vmalloc area.

  For example, x86_64 assumes 32bit relocations should be enough to
  link module symbols and thus needs to set reserved_size but x86_32
  can link to the whole 32bit space and thus can leave reserved_size
  at zero.

* After determining the above, we can set ai->dyn_size to be

  ai->dyn_size = min(ai->unit_size - ai->static_size - ai->reserved_size,
		     PERCPU_DYNAMIC_RESERVE);

Would the above work?

> Even with the above PAGE_SIZE changes, the kernel still reports
> warning from 952: WARN_ON(chunk->immutable) and then panic.

Hah... strange.  Can you please attach full boot log?  This is
dicontig configuration, right?

Thanks.

-- 
tejun
--
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