kernel/0001-bpf-Add-tech-preview-t...

54 lines
1.6 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Eugene Syromiatnikov <esyr@redhat.com>
Date: Thu, 14 Jun 2018 16:36:08 -0400
Subject: [PATCH] bpf: Add tech preview taint for syscall
Message-id: <394af3a9985d1ad9ea6741cb95ff145312d106b9.1528991396.git.esyr@redhat.com>
Patchwork-id: 8251
O-Subject: [kernel team] [RHEL8 PATCH v4 3/5] [bpf] bpf: Add tech preview taint for syscall
Bugzilla: 1559877
RH-Acked-by: Jiri Benc <jbenc@redhat.com>
RH-Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Adding tech preview taint for using the eBPF syscall.
Based on a RHEL 7 commit "bpf: Add tech preview taint for syscall" by
Jiri Olsa.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1559877
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16716594
Upstream Status: RHEL only
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
---
kernel/bpf/syscall.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
kernel-5.9.0-0.rc1.1 * Mon Aug 17 2020 Fedora Kernel Team <kernel-team@fedoraproject.org> [5.9.0-0.rc1.1] - v5.9-rc1 rebase - Config updates for Fedora ("Justin M. Forbes") - fedora: enable enery model (Peter Robinson) - iio: enable LTR-559 light and proximity sensor (Peter Robinson) - iio: chemical: enable some popular chemical and partical sensors (Peter Robinson) - More mismatches ("Justin M. Forbes") - Fedora config change due to deps ("Justin M. Forbes") - CONFIG_SND_SOC_MAX98390 is now selected by SND_SOC_INTEL_DA7219_MAX98357A_GENERIC ("Justin M. Forbes") - Config change required for build part 2 ("Justin M. Forbes") - Config change required for build ("Justin M. Forbes") - Enable ARM_SMCCC_SOC_ID on all aarch64 kernels (Peter Robinson) - Enable ZSTD compression algorithm on all kernels (Peter Robinson) - Fedora config update ("Justin M. Forbes") - Revert "Merge branch 'make_configs_fix' into 'os-build'" (Justin Forbes) - Use the configs/generic config for SND_HDA_INTEL everywhere (Peter Robinson) - redhat/configs/process_configs.sh: Remove *.config.orig files (Prarit Bhargava) - redhat/configs/process_configs.sh: Add process_configs_known_broken flag (Prarit Bhargava) - redhat/Makefile: Fix '*-configs' targets (Prarit Bhargava) - Updated changelog for the release based on v5.8 (Fedora Kernel Team) - Add ability to sync upstream through Makefile (Don Zickus) - Add master merge check (Don Zickus) - Replace hardcoded values 'os-build' and project id with variables (Don Zickus) - gitattributes: Remove unnecesary export restrictions (Prarit Bhargava) - redhat/Makefile.common: Fix MARKER (Prarit Bhargava) Resolves: rhbz# Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org>
2020-08-17 16:18:16 +00:00
index ae1d88925f73..442b42cfd352 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -4155,11 +4155,17 @@ static int bpf_iter_create(union bpf_attr *attr)
SYSCALL_DEFINE3(bpf, int, cmd, union bpf_attr __user *, uattr, unsigned int, size)
{
union bpf_attr attr;
+ static int marked;
int err;
if (sysctl_unprivileged_bpf_disabled && !bpf_capable())
return -EPERM;
+ if (!marked) {
+ mark_tech_preview("eBPF syscall", NULL);
+ marked = true;
+ }
+
err = bpf_check_uarg_tail_zero(uattr, sizeof(attr), size);
if (err)
return err;
--
2.26.2