From: Andrew Morton <akpm@osdl.org>
To: Arun Sharma <arun.sharma@google.com>
Cc: rohit.seth@intel.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Expose SHM_HUGETLB in shmctl(id, IPC_STAT, ...)
Date: Wed, 9 Nov 2005 22:22:23 -0800 [thread overview]
Message-ID: <20051109222223.538309e4.akpm@osdl.org> (raw)
In-Reply-To: <20051109184623.GA21636@sharma-home.net>
Arun Sharma <arun.sharma@google.com> wrote:
>
> Allow shmctl to find out if a shmid corresponds to a HUGETLB segment
>
> Signed-off-by: Arun Sharma <arun.sharma@google.com>
> Acked-by: Rohit Seth <rohit.seth@intel.com>
>
> --- a/ipc/shm.c Tue Nov 8 20:58:38 2005
> +++ b/ipc/shm.c Wed Nov 9 10:26:37 2005
> @@ -197,7 +197,7 @@
> return -ENOMEM;
>
> shp->shm_perm.key = key;
> - shp->shm_flags = (shmflg & S_IRWXUGO);
> + shp->shm_flags = (shmflg & (S_IRWXUGO | SHM_HUGETLB));
> shp->mlock_user = NULL;
>
> shp->shm_perm.security = NULL;
I dunno. The manpage says:
The highlighted fields in the member shm_perm can be set:
struct ipc_perm {
...
ushort mode; /* lower 9 bits of access modes */
...
};
So if an application used to do:
if (perm.mode == 0666)
it will now break, because we've gone and set bit 9 on hugetlb segments.
next prev parent reply other threads:[~2005-11-10 6:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-09 18:46 Arun Sharma
2005-11-10 6:22 ` Andrew Morton [this message]
2005-11-10 18:35 ` Arun Sharma
2005-11-10 19:59 ` Andrew Morton
2005-11-10 21:41 ` Arun Sharma
2005-11-10 22:06 ` Andrew Morton
2005-11-11 2:49 ` Arun Sharma
2005-11-11 3:12 ` Andrew Morton
2005-11-12 7:19 ` Michael Kerrisk
2005-11-12 7:38 ` Andrew Morton
2005-11-11 7:30 ` William Lee Irwin III
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051109222223.538309e4.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=arun.sharma@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rohit.seth@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®