From aaaf42cb44d4fcd598fca441a11856f3e8dd06d8 Mon Sep 17 00:00:00 2001 From: Norbert Lange Date: Fri, 21 Feb 2020 15:08:13 +0100 Subject: [PATCH] units: add mount for tracefs Kernel 4.1 separated the tracing system from the debugfs, actual documentation already points to a different path that needs this new mount to exist. the old sysfs path will still be an automount in the debugfs, created by the kernel (for now). Signed-off-by: Norbert Lange --- units/meson.build | 2 ++ units/sys-kernel-tracing.mount | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 units/sys-kernel-tracing.mount diff --git a/units/meson.build b/units/meson.build index f3145a1099e..ea91f0cc9ea 100644 --- a/units/meson.build +++ b/units/meson.build @@ -78,6 +78,8 @@ units = [ 'sysinit.target.wants/'], ['sys-kernel-debug.mount', '', 'sysinit.target.wants/'], + ['sys-kernel-tracing.mount', '', + 'sysinit.target.wants/'], ['sysinit.target', ''], ['syslog.socket', ''], ['system-systemd\\x2dcryptsetup.slice', 'HAVE_LIBCRYPTSETUP'], diff --git a/units/sys-kernel-tracing.mount b/units/sys-kernel-tracing.mount new file mode 100644 index 00000000000..cb42b47012f --- /dev/null +++ b/units/sys-kernel-tracing.mount @@ -0,0 +1,23 @@ +# SPDX-License-Identifier: LGPL-2.1+ +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Kernel Trace File System +Documentation=https://www.kernel.org/doc/Documentation/trace/ftrace.txt +Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems +DefaultDependencies=no +ConditionPathExists=/sys/kernel/tracing +ConditionCapability=CAP_SYS_RAWIO +Before=sysinit.target + +[Mount] +What=tracefs +Where=/sys/kernel/tracing +Type=tracefs +Options=nosuid,nodev,noexec