The source for the Linux kernel used in Windows Subsystem for Linux 2 (WSL2)
Перейти к файлу
Martin KaFai Lau b16d9aa4c2 bpf: Add BPF_PROG_GET_FD_BY_ID
Add BPF_PROG_GET_FD_BY_ID command to allow user to get a fd
from a bpf_prog's ID.

bpf_prog_inc_not_zero() is added and is called with prog_idr_lock
held.

__bpf_prog_put() is also added which has the 'bool do_idr_lock'
param to decide if the prog_idr_lock should be acquired when
freeing the prog->id.

In the error path of bpf_prog_inc_not_zero(), it may have to
call __bpf_prog_put(map, false) which does not need
to take the prog_idr_lock when freeing the prog->id.

It is currently limited to CAP_SYS_ADMIN which we can
consider to lift it in followup patches.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Alexei Starovoitov <ast@fb.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-06 15:41:23 -04:00
Documentation net: phy: Delete unused function phy_ethtool_gset 2017-06-06 15:12:28 -04:00
arch arm64: defconfig: Enable dwmac-sun8i driver on defconfig 2017-06-01 14:53:09 -04:00
block Merge branch 'nvme-4.12' of git://git.infradead.org/nvme into for-linus 2017-05-26 09:11:19 -06:00
certs
crypto crypto: skcipher - Add missing API setkey checks 2017-05-18 13:04:05 +08:00
drivers cxgb4: implement ndo_set_vf_rate() 2017-06-06 15:17:10 -04:00
firmware
fs Changed since last update: 2017-05-26 12:13:08 -07:00
include bpf: Add BPF_PROG_GET_FD_BY_ID 2017-06-06 15:41:23 -04:00
init
ipc
kernel bpf: Add BPF_PROG_GET_FD_BY_ID 2017-06-06 15:41:23 -04:00
lib bpf: fix stack_depth usage by test_bpf.ko 2017-05-31 19:29:48 -04:00
mm mm: vmscan: scan until it finds eligible pages 2017-05-12 15:57:16 -07:00
net net: sched: introduce a TRAP control action 2017-06-06 12:45:23 -04:00
samples samples/bpf: add tests for more perf event types 2017-06-04 21:58:15 -04:00
scripts DeviceTree fixes for 4.12-rc: 2017-05-19 15:03:24 -07:00
security
sound sound fixes for 4.12-rc3 2017-05-26 09:03:09 -07:00
tools bpf: update perf event helper functions documentation 2017-06-04 21:58:16 -04:00
usr
virt KVM: arm/arm64: Hold slots_lock when unregistering kvm io bus devices 2017-05-18 11:18:16 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap power supply and reset changes for the v4.12 series (part 2) 2017-05-12 12:02:21 -07:00
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS i40e/i40evf: create and use new unified header file 2017-06-01 14:04:42 -07:00
Makefile Linux 4.12-rc2 2017-05-21 19:30:23 -07:00
README

README

Linux kernel
============

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.