mips default mlock limit fix
PATCH 1/1 mips default mlock limit fix
Mips RLIMIT_MEMLOCK incorrectly defaults to unlimited, it was confused with RLIMIT_NPROC. Found while consolidating resource.h headers.
===== include/asm-mips/resource.h 1.6 vs edited =====
include/asm-mips/resource.h +2 -2
@@ -53,8 +53,8 @@ { INR_OPEN, INR_OPEN }, \ { RLIM_INFINITY, RLIM_INFINITY }, \ { RLIM_INFINITY, RLIM_INFINITY }, \ - { MLOCK_LIMIT, MLOCK_LIMIT }, \ - { RLIM_INFINITY, RLIM_INFINITY }, \ + { 0, 0 }, \ + { MLOCK_LIMIT, MLOCK_LIMIT }, \ { RLIM_INFINITY, RLIM_INFINITY }, \ { MAX_SIGPENDING, MAX_SIGPENDING }, \ { MQ_BYTES_MAX, MQ_BYTES_MAX }, \
Quoted 2 lines · Chris Wright
Mips
RLIMIT_MEMLOCKincorrectly defaults to unlimited, it was confused withRLIMIT_NPROC. Found while consolidatingresource.hheaders.
Thanks, I applied a recent change off by one line. To avoid this I've changed the code to use named initializers, see
Ralf
Quoted 9 lines · * Ralf Baechle ([email protected]) wrote:
Quoted 2 lines · Chris Wright
Mips
RLIMIT_MEMLOCKincorrectly defaults to unlimited, it was confused withRLIMIT_NPROC. Found while consolidatingresource.hheaders.Thanks, I applied a recent change off by one line. To avoid this I've changed the code to use named initializers, see
That works too. I made a similar change in the consolidation patch. This was just meant to be a very simple stop gap fix, while the consolidation bits bake in -mm before they go to Linus. I prefer to leave it as is, only so I don't have to respin the patches, but it's not that big a deal. Either way, Linus should pick up one of the mips fixes.
thanks,
-chris
Signature · 1 line
Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net