git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git]
/
fs
/
proc
/
base.c
diff --git
a/fs/proc/base.c
b/fs/proc/base.c
index
1ace83d
..
51be1ce
100644
(file)
--- a/
fs/proc/base.c
+++ b/
fs/proc/base.c
@@
-216,7
+216,7
@@
static struct mm_struct *mm_access(struct task_struct *task, unsigned int mode)
struct mm_struct *mm_for_maps(struct task_struct *task)
{
struct mm_struct *mm_for_maps(struct task_struct *task)
{
- return mm_access(task, PTRACE_MODE_READ);
+ return mm_access(task, PTRACE_MODE_READ
_FSCREDS
);
}
static int proc_pid_cmdline(struct task_struct *task, char * buffer)
}
static int proc_pid_cmdline(struct task_struct *task, char * buffer)
@@
-288,7
+288,7
@@
static int proc_pid_wchan(struct task_struct *task, char *buffer)
wchan = get_wchan(task);
if (lookup_symbol_name(wchan, symname) < 0)
wchan = get_wchan(task);
if (lookup_symbol_name(wchan, symname) < 0)
- if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ if (!ptrace_may_access(task, PTRACE_MODE_READ
_FSCREDS
))
return 0;
else
return sprintf(buffer, "%lu", wchan);
return 0;
else
return sprintf(buffer, "%lu", wchan);
@@
-302,7
+302,7
@@
static int lock_trace(struct task_struct *task)
int err = mutex_lock_killable(&task->signal->cred_guard_mutex);
if (err)
return err;
int err = mutex_lock_killable(&task->signal->cred_guard_mutex);
if (err)
return err;
- if (!ptrace_may_access(task, PTRACE_MODE_ATTACH)) {
+ if (!ptrace_may_access(task, PTRACE_MODE_ATTACH
_FSCREDS
)) {
mutex_unlock(&task->signal->cred_guard_mutex);
return -EPERM;
}
mutex_unlock(&task->signal->cred_guard_mutex);
return -EPERM;
}
@@
-544,7
+544,7
@@
static int proc_fd_access_allowed(struct inode *inode)
*/
task = get_proc_task(inode);
if (task) {
*/
task = get_proc_task(inode);
if (task) {
- allowed = ptrace_may_access(task, PTRACE_MODE_READ);
+ allowed = ptrace_may_access(task, PTRACE_MODE_READ
_FSCREDS
);
put_task_struct(task);
}
return allowed;
put_task_struct(task);
}
return allowed;
@@
-558,7
+558,7
@@
int proc_setattr(struct dentry *dentry, struct iattr *attr)
if (attr->ia_valid & ATTR_MODE)
return -EPERM;
if (attr->ia_valid & ATTR_MODE)
return -EPERM;
- error =
inode_change_ok(inode
, attr);
+ error =
setattr_prepare(dentry
, attr);
if (error)
return error;
if (error)
return error;
@@
-769,7
+769,7
@@
static int mem_open(struct inode* inode, struct file* file)
if (!task)
return -ESRCH;
if (!task)
return -ESRCH;
- mm = mm_access(task, PTRACE_MODE_ATTACH);
+ mm = mm_access(task, PTRACE_MODE_ATTACH
| PTRACE_MODE_FSCREDS
);
put_task_struct(task);
if (IS_ERR(mm))
put_task_struct(task);
if (IS_ERR(mm))
@@
-905,7
+905,8
@@
static ssize_t environ_read(struct file *file, char __user *buf,
mm = mm_for_maps(task);
ret = PTR_ERR(mm);
mm = mm_for_maps(task);
ret = PTR_ERR(mm);
- if (!mm || IS_ERR(mm))
+ /* Ensure the process spawned far enough to have an environment. */
+ if (!mm || IS_ERR(mm) || !mm->env_end)
goto out_free;
ret = 0;
goto out_free;
ret = 0;
@@
-1830,7
+1831,7
@@
static int proc_fd_info(struct inode *inode, struct path *path, char *info)
fdt = files_fdtable(files);
f_flags = file->f_flags & ~O_CLOEXEC;
fdt = files_fdtable(files);
f_flags = file->f_flags & ~O_CLOEXEC;
- if (
FD_ISSET(fd, fdt->close_on_exec
))
+ if (
close_on_exec(fd, fdt
))
f_flags |= O_CLOEXEC;
if (path) {
f_flags |= O_CLOEXEC;
if (path) {
@@
-2626,7
+2627,7
@@
static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
if (result)
return result;
if (result)
return result;
- if (!ptrace_may_access(task, PTRACE_MODE_READ)) {
+ if (!ptrace_may_access(task, PTRACE_MODE_READ
_FSCREDS
)) {
result = -EACCES;
goto out_unlock;
}
result = -EACCES;
goto out_unlock;
}
@@
-2715,6
+2716,7
@@
static const struct pid_entry tgid_base_stuff[] = {
ONE("stat", S_IRUGO, proc_tgid_stat),
ONE("statm", S_IRUGO, proc_pid_statm),
REG("maps", S_IRUGO, proc_maps_operations),
ONE("stat", S_IRUGO, proc_tgid_stat),
ONE("statm", S_IRUGO, proc_pid_statm),
REG("maps", S_IRUGO, proc_maps_operations),
+ REG("arm_maps", S_IRUGO, proc_armv7_maps_operations),
#ifdef CONFIG_NUMA
REG("numa_maps", S_IRUGO, proc_numa_maps_operations),
#endif
#ifdef CONFIG_NUMA
REG("numa_maps", S_IRUGO, proc_numa_maps_operations),
#endif
@@
-3061,6
+3063,7
@@
static const struct pid_entry tid_base_stuff[] = {
ONE("stat", S_IRUGO, proc_tid_stat),
ONE("statm", S_IRUGO, proc_pid_statm),
REG("maps", S_IRUGO, proc_maps_operations),
ONE("stat", S_IRUGO, proc_tid_stat),
ONE("statm", S_IRUGO, proc_pid_statm),
REG("maps", S_IRUGO, proc_maps_operations),
+ REG("arm_maps", S_IRUGO, proc_armv7_maps_operations),
#ifdef CONFIG_NUMA
REG("numa_maps", S_IRUGO, proc_numa_maps_operations),
#endif
#ifdef CONFIG_NUMA
REG("numa_maps", S_IRUGO, proc_numa_maps_operations),
#endif