sysctl

Disable and re-enable address space layout randomization only for myself

。_饼干妹妹 提交于 2019-11-27 04:14:58
I would like to disable address space layout randomization (ASLR) on my system (Ubuntu Gnu/Linux 2.6.32-41-server), but, if I use sysctl -w kernel.randomize_va_space=0 the change would affect all users on the system, I presume. (Is this true?) How can I limit the effects of disabling ASLR to myself as a user only, or only to the shell session in which I invoke the command to disable? BTW, I see that my system's current (default) setting is sysctl -w kernel.randomize_va_space=0 Why 2 and not 1 or 3? Where can I find documentation about the numerical values of /proc/sys settings, their ranges,

Detect which app is currently running on iOS using sysctl

喜夏-厌秋 提交于 2019-11-27 01:02:58
问题 I have currently implemented a simple activity monitor to watch all running processes on iOS. To retrieve a list of all running processes, I do this: size_t size; struct kinfo_proc *procs = NULL; int status; NSMutableArray *killedProcesses = [[NSMutableArray alloc] init]; int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_ALL, 0 }; status = sysctl(mib, 4, NULL, &size, NULL, 0); procs = malloc(size); status = sysctl(mib, 4, procs, &size, NULL, 0); // now, we have a nice list of processes And if I

Refresh net.core.somaxcomm (or any sysctl property) for docker containers

夙愿已清 提交于 2019-11-27 00:47:03
问题 I am trying to change net.core.somaxconn for docker container to be able to have larger queue of requests for my web application. On OS, outside docker, I first modify the property successfully: $ cat /proc/sys/net/core/somaxconn 128 $ sudo sysctl -w net.core.somaxconn=1024 net.core.somaxconn = 1024 $ cat /proc/sys/net/core/somaxconn 1024 But then I don't know how to propagate that change into docker. I've tried: Also editing /etc/sysctl.conf (in hope of docker reading that file on container

Disable and re-enable address space layout randomization only for myself

核能气质少年 提交于 2019-11-26 11:08:26
问题 I would like to disable address space layout randomization (ASLR) on my system (Ubuntu Gnu/Linux 2.6.32-41-server), but, if I use sysctl -w kernel.randomize_va_space=0 the change would affect all users on the system, I presume. (Is this true?) How can I limit the effects of disabling ASLR to myself as a user only, or only to the shell session in which I invoke the command to disable? BTW, I see that my system\'s current (default) setting is sysctl -w kernel.randomize_va_space=0 Why 2 and not