Linux kernel source tree
Go to file
Maciej Żenczykowski 272e21ccc9 UPSTREAM: net: bpf: Make bpf_ktime_get_ns() available to non GPL programs
The entire implementation is in kernel/bpf/helpers.c:

BPF_CALL_0(bpf_ktime_get_ns) {
       /* NMI safe access to clock monotonic */
       return ktime_get_mono_fast_ns();
}

const struct bpf_func_proto bpf_ktime_get_ns_proto = {
       .func           = bpf_ktime_get_ns,
       .gpl_only       = false,
       .ret_type       = RET_INTEGER,
};

and this was presumably marked GPL due to kernel/time/timekeeping.c:
  EXPORT_SYMBOL_GPL(ktime_get_mono_fast_ns);

and while that may make sense for kernel modules (although even that
is doubtful), there is currently AFAICT no other source of time
available to ebpf.

Furthermore this is really just equivalent to clock_gettime(CLOCK_MONOTONIC)
which is exposed to userspace (via vdso even to make it performant)...

As such, I see no reason to keep the GPL restriction.
(In the future I'd like to have access to time from Apache licensed ebpf code)

Signed-off-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

(cherry picked from commit 082b57e3eb)
Change-Id: I76f763c64fcd56e7149f94625146486ba00db6c1
2020-07-04 03:10:04 +00:00
arch Linux 4.19.131 2020-07-01 13:11:06 +02:00
block Linux 4.19.131 2020-07-01 13:11:06 +02:00
certs export.h: remove VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR() 2018-08-22 23:21:44 +09:00
crypto This is the 4.19.130 stable release 2020-06-27 09:50:13 +02:00
Documentation This is the 4.19.130 stable release 2020-06-27 09:50:13 +02:00
drivers UPSTREAM: usb: musb: mediatek: add reset FADDR to zero in reset interrupt handle 2020-07-02 12:30:56 +00:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:21:29 +01:00
fs Linux 4.19.131 2020-07-01 13:11:06 +02:00
include Revert "drm/dsi: Fix byte order of DCS set/get brightness" 2020-07-01 18:58:38 +00:00
init This is the 4.19.124 stable release 2020-05-20 11:37:46 +02:00
ipc Revert "ANDROID: vfs: Add permission2 for filesystems with per mount permissions" 2020-06-27 15:17:42 +02:00
kernel UPSTREAM: net: bpf: Make bpf_ktime_get_ns() available to non GPL programs 2020-07-04 03:10:04 +00:00
lib ANDROID: lib/vdso: do not update timespec if clock_getres() fails 2020-06-30 05:51:06 +00:00
LICENSES LICENSES: Remove CC-BY-SA-4.0 license text 2018-10-18 11:28:50 +02:00
mm Linux 4.19.131 2020-07-01 13:11:06 +02:00
net Linux 4.19.131 2020-07-01 13:11:06 +02:00
samples This is the 4.19.126 stable release 2020-06-03 09:23:15 +02:00
scripts ANDROID: GKI: scripts: Makefile: update the lz4 command (#2) 2020-07-02 00:44:44 +00:00
security Linux 4.19.131 2020-07-01 13:11:06 +02:00
sound Linux 4.19.131 2020-07-01 13:11:06 +02:00
tools This is the 4.19.130 stable release 2020-06-27 09:50:13 +02:00
usr initramfs: restore default compression behavior 2020-04-13 10:44:59 +02:00
virt KVM: arm64: Synchronize sysreg state on injecting an AArch32 exception 2020-06-22 09:05:09 +02:00
.clang-format clang-format: Set IndentWrappedFunctionNames false 2018-08-01 18:38:51 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore Kbuild updates for v4.17 (2nd) 2018-04-15 17:21:30 -07:00
.mailmap libnvdimm-for-4.19_misc 2018-08-25 18:13:10 -07:00
abi_gki_aarch64_cuttlefish_whitelist ANDROID: GKI: Update cuttlefish whitelist 2020-06-26 15:46:54 +00:00
abi_gki_aarch64_qcom_whitelist ANDROID: Update the ABI xml representation 2020-07-01 18:58:46 +00:00
abi_gki_aarch64_whitelist ANDROID: GKI: Update the ABI xml and whitelist 2020-05-14 15:58:13 -07:00
abi_gki_aarch64.xml ANDROID: Update the ABI xml representation 2020-07-01 18:58:46 +00:00
build.config.aarch64 ANDROID: add compat cross compiler 2020-04-27 22:52:19 -07:00
build.config.allmodconfig ANDROID: build.config.allmodconfig: Re-enable XFS_FS 2020-04-17 08:41:31 +00:00
build.config.allmodconfig.aarch64 ANDROID: Add allmodconfig build.configs for x86_64 and aarch64 2019-11-12 20:55:23 +00:00
build.config.allmodconfig.arm ANDROID: Add build.config files for ARM 32-bit 2020-03-16 17:43:55 +00:00
build.config.allmodconfig.x86_64 ANDROID: Add allmodconfig build.configs for x86_64 and aarch64 2019-11-12 20:55:23 +00:00
build.config.arm ANDROID: Add build.config files for ARM 32-bit 2020-03-16 17:43:55 +00:00
build.config.common ANDROID: Use depmod from the hermetic toolchain 2020-06-22 12:55:38 +00:00
build.config.gki ANDROID: gki: Removed cf modules from gki_defconfig 2020-01-31 16:23:38 -08:00
build.config.gki_kasan ANDROID: Rename build.config.gki.arch_kasan 2020-05-13 15:10:51 +00:00
build.config.gki_kasan.aarch64 ANDROID: Drop ABI monitoring from KASAN build config 2020-05-13 15:11:47 +00:00
build.config.gki_kasan.x86_64 ANDROID: Rename build.config.gki.arch_kasan 2020-05-13 15:10:51 +00:00
build.config.gki-debug.aarch64 ANDROID: Fix build.config.gki-debug 2020-05-20 11:50:18 +00:00
build.config.gki-debug.x86_64 ANDROID: Fix build.config.gki-debug 2020-05-20 11:50:18 +00:00
build.config.gki.aarch64 ANDROID: build.config.gki.aarch64: Enable WHITELIST_STRICT_MODE 2020-05-07 08:12:23 +00:00
build.config.gki.x86_64 ANDROID: refactor build.config files to remove duplication 2019-10-22 18:27:12 -07:00
build.config.x86_64 ANDROID: refactor build.config files to remove duplication 2019-10-22 18:27:12 -07:00
COPYING
CREDITS 9p: remove Ron Minnich from MAINTAINERS 2018-08-17 16:20:26 -07:00
Kbuild
Kconfig kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt 2018-08-02 08:06:55 +09:00
MAINTAINERS This is the 4.19.107 stable release 2020-03-03 07:33:01 +01:00
Makefile Linux 4.19.131 2020-07-01 13:11:06 +02:00
README

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

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

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.