lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1212183982.24826.55.camel@lappy.programming.kicks-ass.net>
Date:	Fri, 30 May 2008 23:46:22 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Clifford Wolf <clifford@...fford.at>
Cc:	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Add rlimits to /proc/<PID>/status

On Fri, 2008-05-30 at 22:11 +0200, Clifford Wolf wrote:
> Signed-off-by: Clifford Wolf <clifford@...fford.at>
> ---
>  fs/proc/array.c |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 57 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/proc/array.c b/fs/proc/array.c
> index 9e3b8c3..3cb2ad3 100644
> --- a/fs/proc/array.c
> +++ b/fs/proc/array.c
> @@ -242,6 +242,62 @@ static void collect_sigign_sigcatch(struct task_struct *p, sigset_t *ign,
>  	}
>  }
>  
> +static const char *rlim_names[RLIM_NLIMITS] = {
> +	[RLIMIT_CPU]        = "CPU",
> +	[RLIMIT_FSIZE]      = "FSize",
> +	[RLIMIT_DATA]       = "Data",
> +	[RLIMIT_STACK]      = "Stack",
> +	[RLIMIT_CORE]       = "Core",
> +	[RLIMIT_RSS]        = "RSS",
> +	[RLIMIT_NPROC]      = "NProc",
> +	[RLIMIT_NOFILE]     = "NoFile",
> +	[RLIMIT_MEMLOCK]    = "MemLock",
> +	[RLIMIT_AS]         = "AddrSpace",
> +	[RLIMIT_LOCKS]      = "Locks",
> +	[RLIMIT_SIGPENDING] = "SigPending",
> +	[RLIMIT_MSGQUEUE]   = "MsgQueue",
> +	[RLIMIT_NICE]       = "Nice",
> +	[RLIMIT_RTPRIO]     = "RTPrio",
> +	[RLIMIT_RTTIME]     = "RTTime"
> +};

fs/proc/base.c already has an array with strings in it

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ