diff options
author | Bryan Cantrill <bryan@joyent.com> | 2012-03-21 05:55:53 +0000 |
---|---|---|
committer | Bryan Cantrill <bryan@joyent.com> | 2012-03-21 05:56:53 +0000 |
commit | d74480f2ad23e19d7340e7a8e2a8dbcb8de54cc7 (patch) | |
tree | cc9680551e863a75fba75de65b95974547c3fea3 /usr/src | |
parent | 068cc3827b33c5b4a2930f53c1c71e51c8bb3fb4 (diff) | |
download | illumos-joyent-d74480f2ad23e19d7340e7a8e2a8dbcb8de54cc7.tar.gz |
OS-1026 procfs and large file support won't co-exist
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/fs/proc/prcontrol.c | 6 | ||||
-rw-r--r-- | usr/src/uts/common/fs/proc/prdata.h | 5 | ||||
-rw-r--r-- | usr/src/uts/common/fs/proc/prvnops.c | 13 | ||||
-rw-r--r-- | usr/src/uts/common/sys/procfs.h | 4 |
4 files changed, 23 insertions, 5 deletions
diff --git a/usr/src/uts/common/fs/proc/prcontrol.c b/usr/src/uts/common/fs/proc/prcontrol.c index 55a48bb2cc..53709139cc 100644 --- a/usr/src/uts/common/fs/proc/prcontrol.c +++ b/usr/src/uts/common/fs/proc/prcontrol.c @@ -24,6 +24,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2012, Joyent, Inc. All rights reserved. + */ + #include <sys/types.h> #include <sys/uio.h> #include <sys/param.h> @@ -935,7 +939,7 @@ pr_control32(int32_t cmd, arg32_t *argp, prnode_t *pnp, cred_t *cr) case PCREAD: /* read from the address space */ case PCWRITE: /* write to the address space */ - if (PROCESS_NOT_32BIT(p)) + if (PROCESS_NOT_32BIT(p) || (pnp->pr_flags & PR_OFFMAX)) error = EOVERFLOW; else { enum uio_rw rw = (cmd == PCREAD)? UIO_READ : UIO_WRITE; diff --git a/usr/src/uts/common/fs/proc/prdata.h b/usr/src/uts/common/fs/proc/prdata.h index 1294421f9f..ce925778f2 100644 --- a/usr/src/uts/common/fs/proc/prdata.h +++ b/usr/src/uts/common/fs/proc/prdata.h @@ -23,6 +23,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2012, Joyent, Inc. All rights reserved. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ @@ -183,6 +187,7 @@ typedef struct prnode { #define PR_INVAL 0x01 /* vnode is invalidated */ #define PR_ISSELF 0x02 /* vnode is a self-open */ #define PR_AOUT 0x04 /* vnode is for an a.out path */ +#define PR_OFFMAX 0x08 /* vnode is a large file open */ /* * Conversion macros. diff --git a/usr/src/uts/common/fs/proc/prvnops.c b/usr/src/uts/common/fs/proc/prvnops.c index a3e95a60fc..7831c1f9ea 100644 --- a/usr/src/uts/common/fs/proc/prvnops.c +++ b/usr/src/uts/common/fs/proc/prvnops.c @@ -23,6 +23,10 @@ * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ +/* + * Copyright (c) 2012, Joyent, Inc. All rights reserved. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ @@ -337,6 +341,15 @@ propen(vnode_t **vpp, int flag, cred_t *cr, caller_context_t *ct) } /* + * If this is a large file open, indicate that in our flags -- some + * procfs structures are not off_t-neutral (e.g., priovec_t), and + * the open will need to be differentiated where 32-bit processes + * pass these structures across the user/kernel boundary. + */ + if (flag & FOFFMAX) + pnp->pr_flags |= PR_OFFMAX; + + /* * Do file-specific things. */ switch (type) { diff --git a/usr/src/uts/common/sys/procfs.h b/usr/src/uts/common/sys/procfs.h index b320836182..12a6925368 100644 --- a/usr/src/uts/common/sys/procfs.h +++ b/usr/src/uts/common/sys/procfs.h @@ -62,10 +62,6 @@ extern "C" { #include <sys/procfs_isa.h> #include <sys/priv.h> -#if !defined(_LP64) && _FILE_OFFSET_BITS == 64 -#error "Cannot use procfs in the large file compilation environment" -#endif - /* * System call interfaces for /proc. */ |