[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080520212735.GA13319@c2.user-mode-linux.org>
Date: Tue, 20 May 2008 17:27:35 -0400
From: Jeff Dike <jdike@...toit.com>
To: Tom Spink <tspink@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: UML fails to locate address space
On Tue, May 20, 2008 at 08:42:54PM +0100, Tom Spink wrote:
> And this is what I did:
Looks OK, but I need a Signed-off-by.
Some style comments, which I can take care of if you don't feel like it:
there's only one use of PROC_MMAP_MIN_ADDR, so you might as
well inline the filename
the stat is unnecessary - open failing will tell you what you
need to know
the strtoul needs some error checking
I'd change the mmap_min_addr[8] to [sizeof("12345678")] to
make it clear what's expected to fit into it
On a less-stylistic note, this thing does have to work in the absence
of /proc since UML is commonly run inside chroot. So, I'm thinking we
still need the loop looking for the bottom of the address space in
this case. And, if you have it, you might as well use it, as that's
less code, and it makes sure the loop is exercised. That grieves me a
little, as I'd like to just read mmap_min_addr and be done with it in
the normal case.
Jeff
--
Work email - jdike at linux dot intel dot com
--
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