linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* MMAP_MIN_ADDR problem/question
@ 2012-08-02  7:39 Marek Vasut
  2012-08-03 15:06 ` Wolfgang Denk
  2012-08-03 15:43 ` Russell King - ARM Linux
  0 siblings, 2 replies; 3+ messages in thread
From: Marek Vasut @ 2012-08-02  7:39 UTC (permalink / raw)
  To: linux-arm-kernel

Hi guys,

Me and a coleague of mine recently ran into the issue [1]. The problem is, that 
I set mmap_min_addr to 65536, making it unable for "su - user" command to work, 
it crashes with SIGKILL. I now at least see a solution (set it to 32768). Though 
I don't understand why. Can someone please exaplain me why it has to be 32768 an 
not more?

[1] http://ubuntu.5.n6.nabble.com/PATCH-DEFAULT-MMAP-MIN-ADDR-32768-for-arm-
td1604723.html

Thanks in advance!

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 3+ messages in thread

* MMAP_MIN_ADDR problem/question
  2012-08-02  7:39 MMAP_MIN_ADDR problem/question Marek Vasut
@ 2012-08-03 15:06 ` Wolfgang Denk
  2012-08-03 15:43 ` Russell King - ARM Linux
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2012-08-03 15:06 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Wolfram,

In message <201208020939.50225.marek.vasut@gmail.com> Marek Vasut wrote:
> 
> Me and a coleague of mine recently ran into the issue [1]. The problem is, that 
> I set mmap_min_addr to 65536, making it unable for "su - user" command to work, 
> it crashes with SIGKILL. I now at least see a solution (set it to 32768). Though 
> I don't understand why. Can someone please exaplain me why it has to be 32768 an 
> not more?
> 
> [1] http://ubuntu.5.n6.nabble.com/PATCH-DEFAULT-MMAP-MIN-ADDR-32768-for-arm-td1604723.html


It appears the problem was introduced with commit cde7c41 "ARM:
configs: add defconfig for mach-mxs" which sets the default for
CONFIG_DEFAULT_MMAP_MIN_ADDR for MXS systems to 64 k.

"security/Kconfig" has somewhat related documentation:

	config LSM_MMAP_MIN_ADDR
	...
		default 32768 if ARM
		default 65536
		...
		On arm and other archs it should not be higher than 32768.

The reason is that on ARM the text segment of applications gets mapped
to 32 k, which fails for non-root processes if MMAP_MIN_ADDR is higher.


Is there any specific reason why you set it to 64 k for MXS ?

Can you please check if non-root processes work for you with this
configuration?

Thanks.

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I used to be indecisive, now I'm not sure.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* MMAP_MIN_ADDR problem/question
  2012-08-02  7:39 MMAP_MIN_ADDR problem/question Marek Vasut
  2012-08-03 15:06 ` Wolfgang Denk
@ 2012-08-03 15:43 ` Russell King - ARM Linux
  1 sibling, 0 replies; 3+ messages in thread
From: Russell King - ARM Linux @ 2012-08-03 15:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Aug 02, 2012 at 09:39:50AM +0200, Marek Vasut wrote:
> Hi guys,
> 
> Me and a coleague of mine recently ran into the issue [1]. The problem is, that 
> I set mmap_min_addr to 65536, making it unable for "su - user" command to work, 
> it crashes with SIGKILL. I now at least see a solution (set it to 32768). Though 
> I don't understand why. Can someone please exaplain me why it has to be 32768 an 
> not more?
> 
> [1] http://ubuntu.5.n6.nabble.com/PATCH-DEFAULT-MMAP-MIN-ADDR-32768-for-arm-
> td1604723.html

Looks to me like there's a reading exercise for someone in the MXS
community who set the default to 64K.  The default in the Kconfig is
already appropriately chosen, so for the defconfig to have the 64K
value, someone must have _intentionally_ changed it without thinking
about what they were doing.

Just produce a patch to fix the defconfig.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-03 15:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-02  7:39 MMAP_MIN_ADDR problem/question Marek Vasut
2012-08-03 15:06 ` Wolfgang Denk
2012-08-03 15:43 ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).