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]
Date:	Wed, 8 Jul 2009 12:51:26 +0800
From:	Amerigo Wang <xiyou.wangcong@...il.com>
To:	Kees Cook <kees.cook@...onical.com>
Cc:	linux-kernel@...r.kernel.org, Neil Horman <nhorman@...driver.com>
Subject: Re: [PATCH] proc: fix reported unit for RLIMIT_CPU

On Tue, Jul 07, 2009 at 09:23:32PM -0700, Kees Cook wrote:
>/proc/$pid/limits should show RLIMIT_CPU as seconds, which is the unit
>used in kernel/posix-cpu-timers.c:
>
>        unsigned long psecs = cputime_to_secs(ptime);
>        ...
>        if (psecs >= sig->rlim[RLIMIT_CPU].rlim_max) {
>                ...
>                __group_send_sig_info(SIGKILL, SEND_SIG_PRIV, tsk);
>
>Signed-off-by: Kees Cook <kees.cook@...onical.com>


Acked-by: WANG Cong <xiyou.wangcong@...il.com>

>---
> fs/proc/base.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>diff --git a/fs/proc/base.c b/fs/proc/base.c
>index 3ce5ae9..5891360 100644
>--- a/fs/proc/base.c
>+++ b/fs/proc/base.c
>@@ -461,7 +461,7 @@ struct limit_names {
> };
> 
> static const struct limit_names lnames[RLIM_NLIMITS] = {
>-	[RLIMIT_CPU] = {"Max cpu time", "ms"},
>+	[RLIMIT_CPU] = {"Max cpu time", "seconds"},
> 	[RLIMIT_FSIZE] = {"Max file size", "bytes"},
> 	[RLIMIT_DATA] = {"Max data size", "bytes"},
> 	[RLIMIT_STACK] = {"Max stack size", "bytes"},
>-- 
>1.6.3.3
>
>-- 
>Kees Cook
>Ubuntu Security Team
>--
>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/
--
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