Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/uipc_shm.c
Show First 20 Lines • Show All 1,061 Lines • ▼ Show 20 Lines | #endif | ||||
if ((flags & O_ACCMODE) != O_RDONLY && (flags & O_ACCMODE) != O_RDWR) | if ((flags & O_ACCMODE) != O_RDONLY && (flags & O_ACCMODE) != O_RDWR) | ||||
return (EINVAL); | return (EINVAL); | ||||
if ((flags & ~(O_ACCMODE | O_CREAT | O_EXCL | O_TRUNC | O_CLOEXEC)) != 0) | if ((flags & ~(O_ACCMODE | O_CREAT | O_EXCL | O_TRUNC | O_CLOEXEC)) != 0) | ||||
return (EINVAL); | return (EINVAL); | ||||
largepage = (shmflags & SHM_LARGEPAGE) != 0; | largepage = (shmflags & SHM_LARGEPAGE) != 0; | ||||
#if !defined(__amd64__) | if (largepage && !PMAP_HAS_LARGEPAGES) | ||||
if (largepage) | |||||
return (ENOTTY); | return (ENOTTY); | ||||
#endif | |||||
/* | /* | ||||
* Currently only F_SEAL_SEAL may be set when creating or opening shmfd. | * Currently only F_SEAL_SEAL may be set when creating or opening shmfd. | ||||
* If the decision is made later to allow additional seals, care must be | * If the decision is made later to allow additional seals, care must be | ||||
* taken below to ensure that the seals are properly set if the shmfd | * taken below to ensure that the seals are properly set if the shmfd | ||||
* already existed -- this currently assumes that only F_SEAL_SEAL can | * already existed -- this currently assumes that only F_SEAL_SEAL can | ||||
* be set and doesn't take further precautions to ensure the validity of | * be set and doesn't take further precautions to ensure the validity of | ||||
* the seals being added with respect to current mappings. | * the seals being added with respect to current mappings. | ||||
▲ Show 20 Lines • Show All 900 Lines • Show Last 20 Lines |