Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20272c89 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'proc' of git://git.kernel.org/pub/scm/linux/kernel/git/adobriyan/proc:
  proc: remove kernel.maps_protect
  proc: remove now unneeded ADDBUF macro
  [PATCH] proc: show personality via /proc/pid/personality
  [PATCH] signal, procfs: some lock_task_sighand() users do not need rcu_read_lock()
  proc: move PROC_PAGE_MONITOR to fs/proc/Kconfig
  proc: make grab_header() static
  proc: remove unused get_dma_list()
  proc: remove dummy vmcore_open()
  proc: proc_sys_root tweak
  proc: fix return value of proc_reg_open() in "too late" case

Fixed up trivial conflict in removed file arch/sparc/include/asm/dma_32.h
parents 8d71ff0b 3bbfe059
Loading
Loading
Loading
Loading
+0 −7
Original line number Original line Diff line number Diff line
@@ -1331,13 +1331,6 @@ determine whether or not they are still functioning properly.
Because the NMI watchdog shares registers with oprofile, by disabling the NMI
Because the NMI watchdog shares registers with oprofile, by disabling the NMI
watchdog, oprofile may have more registers to utilize.
watchdog, oprofile may have more registers to utilize.


maps_protect
------------

Enables/Disables the protection of the per-process proc entries "maps" and
"smaps".  When enabled, the contents of these files are visible only to
readers that are allowed to ptrace() the given process.

msgmni
msgmni
------
------


+0 −17
Original line number Original line Diff line number Diff line
@@ -25,23 +25,6 @@ EXPORT_SYMBOL(dma_spin_lock);


static dma_t dma_chan[MAX_DMA_CHANNELS];
static dma_t dma_chan[MAX_DMA_CHANNELS];


/*
 * Get dma list for /proc/dma
 */
int get_dma_list(char *buf)
{
	dma_t *dma;
	char *p = buf;
	int i;

	for (i = 0, dma = dma_chan; i < MAX_DMA_CHANNELS; i++, dma++)
		if (dma->lock)
			p += sprintf(p, "%2d: %14s %s\n", i,
				     dma->d_ops->type, dma->device_id);

	return p - buf;
}

/*
/*
 * Request DMA channel
 * Request DMA channel
 *
 *
+10 −0
Original line number Original line Diff line number Diff line
@@ -57,3 +57,13 @@ config PROC_SYSCTL
	  As it is generally a good thing, you should say Y here unless
	  As it is generally a good thing, you should say Y here unless
	  building a kernel for install/rescue disks or your system is very
	  building a kernel for install/rescue disks or your system is very
	  limited in memory.
	  limited in memory.

config PROC_PAGE_MONITOR
 	default y
	depends on PROC_FS && MMU
	bool "Enable /proc page monitoring" if EMBEDDED
 	help
	  Various /proc files exist to monitor process memory utilization:
	  /proc/pid/smaps, /proc/pid/clear_refs, /proc/pid/pagemap,
	  /proc/kpagecount, and /proc/kpageflags. Disabling these
          interfaces will reduce the size of the kernel by approximately 4kb.
+0 −7
Original line number Original line Diff line number Diff line
@@ -86,11 +86,6 @@
#include <asm/processor.h>
#include <asm/processor.h>
#include "internal.h"
#include "internal.h"


/* Gcc optimizes away "strlen(x)" for constant x */
#define ADDBUF(buffer, string) \
do { memcpy(buffer, string, strlen(string)); \
     buffer += strlen(string); } while (0)

static inline void task_name(struct seq_file *m, struct task_struct *p)
static inline void task_name(struct seq_file *m, struct task_struct *p)
{
{
	int i;
	int i;
@@ -261,7 +256,6 @@ static inline void task_sig(struct seq_file *m, struct task_struct *p)
	sigemptyset(&ignored);
	sigemptyset(&ignored);
	sigemptyset(&caught);
	sigemptyset(&caught);


	rcu_read_lock();
	if (lock_task_sighand(p, &flags)) {
	if (lock_task_sighand(p, &flags)) {
		pending = p->pending.signal;
		pending = p->pending.signal;
		shpending = p->signal->shared_pending.signal;
		shpending = p->signal->shared_pending.signal;
@@ -272,7 +266,6 @@ static inline void task_sig(struct seq_file *m, struct task_struct *p)
		qlim = p->signal->rlim[RLIMIT_SIGPENDING].rlim_cur;
		qlim = p->signal->rlim[RLIMIT_SIGPENDING].rlim_cur;
		unlock_task_sighand(p, &flags);
		unlock_task_sighand(p, &flags);
	}
	}
	rcu_read_unlock();


	seq_printf(m, "Threads:\t%d\n", num_threads);
	seq_printf(m, "Threads:\t%d\n", num_threads);
	seq_printf(m, "SigQ:\t%lu/%lu\n", qsize, qlim);
	seq_printf(m, "SigQ:\t%lu/%lu\n", qsize, qlim);
+10 −11
Original line number Original line Diff line number Diff line
@@ -148,9 +148,6 @@ static unsigned int pid_entry_count_dirs(const struct pid_entry *entries,
	return count;
	return count;
}
}


int maps_protect;
EXPORT_SYMBOL(maps_protect);

static struct fs_struct *get_fs_struct(struct task_struct *task)
static struct fs_struct *get_fs_struct(struct task_struct *task)
{
{
	struct fs_struct *fs;
	struct fs_struct *fs;
@@ -164,7 +161,6 @@ static struct fs_struct *get_fs_struct(struct task_struct *task)


static int get_nr_threads(struct task_struct *tsk)
static int get_nr_threads(struct task_struct *tsk)
{
{
	/* Must be called with the rcu_read_lock held */
	unsigned long flags;
	unsigned long flags;
	int count = 0;
	int count = 0;


@@ -471,14 +467,10 @@ static int proc_pid_limits(struct task_struct *task, char *buffer)


	struct rlimit rlim[RLIM_NLIMITS];
	struct rlimit rlim[RLIM_NLIMITS];


	rcu_read_lock();
	if (!lock_task_sighand(task, &flags))
	if (!lock_task_sighand(task,&flags)) {
		rcu_read_unlock();
		return 0;
		return 0;
	}
	memcpy(rlim, task->signal->rlim, sizeof(struct rlimit) * RLIM_NLIMITS);
	memcpy(rlim, task->signal->rlim, sizeof(struct rlimit) * RLIM_NLIMITS);
	unlock_task_sighand(task, &flags);
	unlock_task_sighand(task, &flags);
	rcu_read_unlock();


	/*
	/*
	 * print the file header
	 * print the file header
@@ -2443,6 +2435,13 @@ static int proc_tgid_io_accounting(struct task_struct *task, char *buffer)
}
}
#endif /* CONFIG_TASK_IO_ACCOUNTING */
#endif /* CONFIG_TASK_IO_ACCOUNTING */


static int proc_pid_personality(struct seq_file *m, struct pid_namespace *ns,
				struct pid *pid, struct task_struct *task)
{
	seq_printf(m, "%08x\n", task->personality);
	return 0;
}

/*
/*
 * Thread groups
 * Thread groups
 */
 */
@@ -2459,6 +2458,7 @@ static const struct pid_entry tgid_base_stuff[] = {
	REG("environ",    S_IRUSR, environ),
	REG("environ",    S_IRUSR, environ),
	INF("auxv",       S_IRUSR, pid_auxv),
	INF("auxv",       S_IRUSR, pid_auxv),
	ONE("status",     S_IRUGO, pid_status),
	ONE("status",     S_IRUGO, pid_status),
	ONE("personality", S_IRUSR, pid_personality),
	INF("limits",	  S_IRUSR, pid_limits),
	INF("limits",	  S_IRUSR, pid_limits),
#ifdef CONFIG_SCHED_DEBUG
#ifdef CONFIG_SCHED_DEBUG
	REG("sched",      S_IRUGO|S_IWUSR, pid_sched),
	REG("sched",      S_IRUGO|S_IWUSR, pid_sched),
@@ -2794,6 +2794,7 @@ static const struct pid_entry tid_base_stuff[] = {
	REG("environ",   S_IRUSR, environ),
	REG("environ",   S_IRUSR, environ),
	INF("auxv",      S_IRUSR, pid_auxv),
	INF("auxv",      S_IRUSR, pid_auxv),
	ONE("status",    S_IRUGO, pid_status),
	ONE("status",    S_IRUGO, pid_status),
	ONE("personality", S_IRUSR, pid_personality),
	INF("limits",	 S_IRUSR, pid_limits),
	INF("limits",	 S_IRUSR, pid_limits),
#ifdef CONFIG_SCHED_DEBUG
#ifdef CONFIG_SCHED_DEBUG
	REG("sched",     S_IRUGO|S_IWUSR, pid_sched),
	REG("sched",     S_IRUGO|S_IWUSR, pid_sched),
@@ -3088,9 +3089,7 @@ static int proc_task_getattr(struct vfsmount *mnt, struct dentry *dentry, struct
	generic_fillattr(inode, stat);
	generic_fillattr(inode, stat);


	if (p) {
	if (p) {
		rcu_read_lock();
		stat->nlink += get_nr_threads(p);
		stat->nlink += get_nr_threads(p);
		rcu_read_unlock();
		put_task_struct(p);
		put_task_struct(p);
	}
	}


Loading