summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--0001-tracing-Do-not-create-directories-if-lockdown-is-in-.patch91
-rw-r--r--0007-ALSA-hda-Fix-regression-by-strip-mask-fix.patch60
-rw-r--r--kernel.spec12
-rw-r--r--sources2
4 files changed, 100 insertions, 65 deletions
diff --git a/0001-tracing-Do-not-create-directories-if-lockdown-is-in-.patch b/0001-tracing-Do-not-create-directories-if-lockdown-is-in-.patch
new file mode 100644
index 000000000..911ffe64e
--- /dev/null
+++ b/0001-tracing-Do-not-create-directories-if-lockdown-is-in-.patch
@@ -0,0 +1,91 @@
+From a356646a56857c2e5ad875beec734d7145ecd49a Mon Sep 17 00:00:00 2001
+From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
+Date: Mon, 2 Dec 2019 16:25:27 -0500
+Subject: [PATCH] tracing: Do not create directories if lockdown is in affect
+
+If lockdown is disabling tracing on boot up, it prevents the tracing files
+from even bering created. But when that happens, there's several places that
+will give a warning that the files were not created as that is usually a
+sign of a bug.
+
+Add in strategic locations where a check is made to see if tracing is
+disabled by lockdown, and if it is, do not go further, and fail silently
+(but print that tracing is disabled by lockdown, without doing a WARN_ON()).
+
+Cc: Matthew Garrett <mjg59@google.com>
+Fixes: 17911ff38aa5 ("tracing: Add locked_down checks to the open calls of files created for tracefs")
+Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
+---
+ kernel/trace/ring_buffer.c | 6 ++++++
+ kernel/trace/trace.c | 17 +++++++++++++++++
+ 2 files changed, 23 insertions(+)
+
+diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
+index 66358d66c933..4bf050fcfe3b 100644
+--- a/kernel/trace/ring_buffer.c
++++ b/kernel/trace/ring_buffer.c
+@@ -11,6 +11,7 @@
+ #include <linux/trace_seq.h>
+ #include <linux/spinlock.h>
+ #include <linux/irq_work.h>
++#include <linux/security.h>
+ #include <linux/uaccess.h>
+ #include <linux/hardirq.h>
+ #include <linux/kthread.h> /* for self test */
+@@ -5068,6 +5069,11 @@ static __init int test_ringbuffer(void)
+ int cpu;
+ int ret = 0;
+
++ if (security_locked_down(LOCKDOWN_TRACEFS)) {
++ pr_warning("Lockdown is enabled, skipping ring buffer tests\n");
++ return 0;
++ }
++
+ pr_info("Running ring buffer tests...\n");
+
+ buffer = ring_buffer_alloc(RB_TEST_BUFFER_SIZE, RB_FL_OVERWRITE);
+diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
+index 02a23a6e5e00..23459d53d576 100644
+--- a/kernel/trace/trace.c
++++ b/kernel/trace/trace.c
+@@ -1888,6 +1888,12 @@ int __init register_tracer(struct tracer *type)
+ return -1;
+ }
+
++ if (security_locked_down(LOCKDOWN_TRACEFS)) {
++ pr_warning("Can not register tracer %s due to lockdown\n",
++ type->name);
++ return -EPERM;
++ }
++
+ mutex_lock(&trace_types_lock);
+
+ tracing_selftest_running = true;
+@@ -8789,6 +8795,11 @@ struct dentry *tracing_init_dentry(void)
+ {
+ struct trace_array *tr = &global_trace;
+
++ if (security_locked_down(LOCKDOWN_TRACEFS)) {
++ pr_warning("Tracing disabled due to lockdown\n");
++ return ERR_PTR(-EPERM);
++ }
++
+ /* The top level trace array uses NULL as parent */
+ if (tr->dir)
+ return NULL;
+@@ -9231,6 +9242,12 @@ __init static int tracer_alloc_buffers(void)
+ int ring_buf_size;
+ int ret = -ENOMEM;
+
++
++ if (security_locked_down(LOCKDOWN_TRACEFS)) {
++ pr_warning("Tracing disabled due to lockdown\n");
++ return -EPERM;
++ }
++
+ /*
+ * Make sure we don't accidently add more trace options
+ * than we have bits for.
+--
+2.24.1
+
diff --git a/0007-ALSA-hda-Fix-regression-by-strip-mask-fix.patch b/0007-ALSA-hda-Fix-regression-by-strip-mask-fix.patch
deleted file mode 100644
index 33bee3279..000000000
--- a/0007-ALSA-hda-Fix-regression-by-strip-mask-fix.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 04fe3cc1f00622bf3ff356dca7f122768a14bdbc Mon Sep 17 00:00:00 2001
-From: Takashi Iwai <tiwai@suse.de>
-Date: Sat, 14 Dec 2019 18:52:17 +0100
-Subject: [PATCH 7/9] ALSA: hda: Fix regression by strip mask fix
-
-The commit e38e486d66e2 ("ALSA: hda: Modify stream stripe mask only
-when needed") tried to address the regression by the unconditional
-application of the stripe mask, but this caused yet another
-regression for the previously working devices. Namely, the patch
-clears the azx_dev->stripe flag at snd_hdac_stream_clear(), but this
-may be called multiple times before restarting the stream, so this
-ended up with clearance of the flag for the whole time.
-
-This patch fixes the regression by moving the azx_dev->stripe flag
-clearance at the counter-part, the close callback of HDMI codec
-driver instead.
-
-Fixes: e38e486d66e2 ("ALSA: hda: Modify stream stripe mask only when needed")
-BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205855
-BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204477
-Cc: <stable@vger.kernel.org>
-Link: https://lore.kernel.org/r/20191214175217.31852-1-tiwai@suse.de
-Signed-off-by: Takashi Iwai <tiwai@suse.de>
----
- sound/hda/hdac_stream.c | 4 +---
- sound/pci/hda/patch_hdmi.c | 2 ++
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/sound/hda/hdac_stream.c b/sound/hda/hdac_stream.c
-index f9707fb05efe..682ed39f79b0 100644
---- a/sound/hda/hdac_stream.c
-+++ b/sound/hda/hdac_stream.c
-@@ -120,10 +120,8 @@ void snd_hdac_stream_clear(struct hdac_stream *azx_dev)
- snd_hdac_stream_updateb(azx_dev, SD_CTL,
- SD_CTL_DMA_START | SD_INT_MASK, 0);
- snd_hdac_stream_writeb(azx_dev, SD_STS, SD_INT_MASK); /* to be sure */
-- if (azx_dev->stripe) {
-+ if (azx_dev->stripe)
- snd_hdac_stream_updateb(azx_dev, SD_CTL_3B, SD_CTL_STRIPE_MASK, 0);
-- azx_dev->stripe = 0;
-- }
- azx_dev->running = false;
- }
- EXPORT_SYMBOL_GPL(snd_hdac_stream_clear);
-diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
-index 4dafc864d765..488c17c9f375 100644
---- a/sound/pci/hda/patch_hdmi.c
-+++ b/sound/pci/hda/patch_hdmi.c
-@@ -1983,6 +1983,8 @@ static int hdmi_pcm_close(struct hda_pcm_stream *hinfo,
- per_cvt->assigned = 0;
- hinfo->nid = 0;
-
-+ azx_stream(get_azx_dev(substream))->stripe = 0;
-+
- mutex_lock(&spec->pcm_lock);
- snd_hda_spdif_ctls_unassign(codec, pcm_idx);
- clear_bit(pcm_idx, &spec->pcm_in_use);
---
-2.24.1
-
diff --git a/kernel.spec b/kernel.spec
index c7d960e26..c1a7b52ef 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -77,7 +77,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be appended after the rcX and
# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
#
-%global baserelease 301
+%global baserelease 200
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@@ -89,7 +89,7 @@ Summary: The Linux kernel
%if 0%{?released_kernel}
# Do we have a -stable update to apply?
-%define stable_update 5
+%define stable_update 6
# Set rpm version accordingly
%if 0%{?stable_update}
%define stablerev %{stable_update}
@@ -866,8 +866,8 @@ Patch607: alsa-5.6.patch
Patch608: 0001-drm-nouveau-Move-the-declaration-of-struct-nouveau_c.patch
Patch609: 0002-drm-nouveau-Fix-drm-core-using-atomic-code-paths-on-.patch
-# rhbz 1784839
-Patch610: 0007-ALSA-hda-Fix-regression-by-strip-mask-fix.patch
+# rhbz 1781288
+Patch610: 0001-tracing-Do-not-create-directories-if-lockdown-is-in-.patch
# END OF PATCH DEFINITIONS
@@ -2567,6 +2567,10 @@ fi
#
#
%changelog
+* Mon Dec 23 2019 Justin M. Forbes <jforbes@fedoraproject.org> - 5.4.6-300
+- Linux v5.4.6
+- Fix rhbz 1781288
+
* Thu Dec 19 2019 Justin M. Forbes <jforbes@fedoraproject.org> - 5.4.5-300
- Linux v5.4.5 rebase
diff --git a/sources b/sources
index 9ded4c303..1d8e2389a 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
SHA512 (linux-5.4.tar.xz) = 9f60f77e8ab972b9438ac648bed17551c8491d6585a5e85f694b2eaa4c623fbc61eb18419b2656b6795eac5deec0edaa04547fc6723fbda52256bd7f3486898f
-SHA512 (patch-5.4.5.xz) = 5c33d5db4d6787d7841a82dd8dc5b38dd80c5706bdaf9bd331e82173302a4cf3bc9c5e1d00f489d3d78b54bc1f8f82f34df2fcd47b1ab4ffb0a01dc7bdc06cff
+SHA512 (patch-5.4.6.xz) = 6f6d73c7ce71d47e810847149f4c258f5fb99c98fc67d385a3ff74889543a415bf8bb77c748a13f72b733bca770773731d84713a9be98d630b7377a792f11f5a