Linus Torvalds wrote: > Actually, it should be pretty much as valid as using mremap - ie it works > on Linux. > > Especially if you use MAP_SHARED, you don't even need to mprotect > anything: you'll get a nice SIGBUS if you ever try to access past the last > page that maps the file. If you guarantee this (and test for this) it's fine with me. The POSIX spec explicitly leaves this undefined and requiring to use mremap() would be a nice way to work around this without allowing the introduction of undefined behavior into programs. I probably would prefer to use mremap() since this makes it clear what should happen but I can live with using the too-large mapping. -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
Attachment:
signature.asc
Description: OpenPGP digital signature
- Follow-Ups:
- Re: mremap() use is racy
- From: Linus Torvalds <[email protected]>
- Re: mremap() use is racy
- From: Hugh Dickins <[email protected]>
- Re: mremap() use is racy
- References:
- mremap() use is racy
- From: Ulrich Drepper <[email protected]>
- Re: mremap() use is racy
- From: Hugh Dickins <[email protected]>
- Re: mremap() use is racy
- From: Ulrich Drepper <[email protected]>
- Re: mremap() use is racy
- From: Linus Torvalds <[email protected]>
- mremap() use is racy
- Prev by Date: Initramfs and TMPFS!
- Next by Date: Re: [Alsa-devel] Re: [Alsa drivers] Creatives X-Fi chip
- Previous by thread: Re: mremap() use is racy
- Next by thread: Re: mremap() use is racy
- Index(es):