Re: [PATCH, v3] shmat: introduce flag SHM_MAP_NOT_FIXED

From: Alan Cox
Date: Wed Oct 08 2008 - 05:00:13 EST


> > shmat giving an address
> > if error
> > shmat giving no address
> >
> > from user space.
>
> No you can't here because shmat() starts searching from the wrong
> start address.

If you are only hinting a desired address then that by the very meaning
of the word "hint" means you will accept a different one.

> The only way would be to search manually in /proc/self/maps
> and handle the races, but I hope you're not advocating that.

Gak, mmap a range to find a space and then shmat over the top of that.

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/