linux/arch/ia64
Vincent Bernat d59577b6ff sk-filter: Add ability to lock a socket filter program
While a privileged program can open a raw socket, attach some
restrictive filter and drop its privileges (or send the socket to an
unprivileged program through some Unix socket), the filter can still
be removed or modified by the unprivileged program. This commit adds a
socket option to lock the filter (SO_LOCK_FILTER) preventing any
modification of a socket filter program.

This is similar to OpenBSD BIOCLOCK ioctl on bpf sockets, except even
root is not allowed change/drop the filter.

The state of the lock can be read with getsockopt(). No error is
triggered if the state is not changed. -EPERM is returned when a user
tries to remove the lock or to change/remove the filter while the lock
is active. The check is done directly in sk_attach_filter() and
sk_detach_filter() and does not affect only setsockopt() syscall.

Signed-off-by: Vincent Bernat <bernat@luffy.cx>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-17 03:21:25 -05:00
..
configs [IA64] defconfig: Remove CONFIG_MISC_DEVICES 2012-08-20 13:04:29 -07:00
dig Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
hp TTY: call tty_port_destroy in the rest of drivers 2012-11-15 17:20:58 -08:00
include sk-filter: Add ability to lock a socket filter program 2013-01-17 03:21:25 -05:00
kernel Driver core __dev* removal patches 2013-01-03 16:17:50 -08:00
kvm Merge tag 'kvm-3.8-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2012-12-13 15:31:08 -08:00
lib Fix common misspellings 2011-03-31 11:26:23 -03:00
mm IA64: drivers: remove __dev* attributes. 2013-01-03 15:57:13 -08:00
oprofile Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
pci IA64: drivers: remove __dev* attributes. 2013-01-03 15:57:13 -08:00
scripts
sn IA64: drivers: remove __dev* attributes. 2013-01-03 15:57:13 -08:00
uv
xen IA64: drivers: remove __dev* attributes. 2013-01-03 15:57:13 -08:00
Kconfig Bury the conditionals from kernel_thread/kernel_execve series 2012-12-19 18:07:38 -05:00
Kconfig.debug
Makefile
install.sh
module.lds