Messages in this thread | | | Date | Tue, 18 Jan 2005 23:11:43 -0800 | From | Chris Wright <> | Subject | Re: [RFC][PATCH] /proc/<pid>/rlimit |
| |
* Bill Rugolsky Jr. (brugolsky@telemetry-investments.com) wrote: > This patch against 2.6.11-rc1-bk6 adds /proc/<pid>/rlimit to export > per-process resource limit settings. It was written to help analyze > daemon core dump size settings, but may be more generally useful. > Tested on 2.6.10. Sample output:
I can certainly see how it could be useful for debugging. Perhaps it should be available to only oneself (like getrlimit restriction) or CAP_SYS_RESOURCE processes? (Though, I'm not sure how useful the data would be to a malicious user). Also, since the format is both arch dependent and release dependent I guess it's not ideal for anything that depends on the format.
> +const char * const rlim_name[RLIM_NLIMITS] = { > +#ifdef RLIMIT_CPU > + [RLIMIT_CPU] = "cpu", > +#endif
BTW, when I went through the resource.h files, I didn't notice any that leftout rlimits, it was only about ordering. So I don't think those ifdefs are necessary.
thanks, -chris -- Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |