This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Memory lock executable at load time


Corey Minyard <minyard@acm.org> writes:

> @@ -1357,6 +1457,12 @@
>  	  if (!__libc_enable_secure
>  	      && memcmp (&envline[3], "ORIGIN_PATH", 11) == 0)
>  	    _dl_origin_path = &envline[15];
> +
> +	  if (memcmp (&envline[3], "LOCK_MEMORY", 11) == 0)
> +	    if (strcmp(&envline[15], "MLOCK") == 0)
> +	      _dl_locked_load_mode = (RTLD_LOCK_LIB_PAGES | RTLD_LOCK_MLOCK);
> +	    else if (strcmp(&envline[15], "READ") == 0)
> +	      _dl_locked_load_mode = (RTLD_LOCK_LIB_PAGES | RTLD_LOCK_READ);
>  	  break;

The mlock() feature should be guarded by !__libc_enable_secure, too,
shouldn't it?

-- 
Florian Weimer 	                  Weimer@CERT.Uni-Stuttgart.DE
University of Stuttgart           http://CERT.Uni-Stuttgart.DE/people/fw/
RUS-CERT                          +49-711-685-5973/fax +49-711-685-5898


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]