I'd like to drop a bunch of patches Fedora has been carrying since forever. Most of these are fairly minor tweaks most people forgot we had and nobody cares about. My motivation is both in the spirit of cleaning up and also to better align Fedora + RHEL (I had a talk about this at Flock, video should be up soon).
If someone wants to make an effort at upstreaming any of these, feel free to do so but I really think most of these are cruft.
Thanks, Laura
Laura Abbott (9): Drop namespaces config tweak Drop cpumask auto select patch Drop scsi warning patch Remove ancient ath9k workaround Drop old lis3 patch Remove some old modalias adjustments Remove old keyboard logging patch Remove patch for GCC VTA Remove crash driver
Kbuild-Add-an-option-to-enable-GCC-VTA.patch | 94 --- ath9k-rx-dma-stop-check.patch | 38 - .../fedora/generic/x86/x86_64/CONFIG_NR_CPUS | 2 +- crash-driver.patch | 722 ------------------ die-floppy-die.patch | 29 - input-kill-stupid-messages.patch | 30 - kernel.spec | 20 - ...-CPUMASK_OFFSTACK-usable-without-deb.patch | 34 - lis3-improve-handling-of-null-rate.patch | 75 -- namespaces-no-expert.patch | 27 - no-pcspkr-modalias.patch | 22 - ...validate_disk-prevent-NULL-ptr-deref.patch | 39 - 12 files changed, 1 insertion(+), 1131 deletions(-) delete mode 100644 Kbuild-Add-an-option-to-enable-GCC-VTA.patch delete mode 100644 ath9k-rx-dma-stop-check.patch delete mode 100644 crash-driver.patch delete mode 100644 die-floppy-die.patch delete mode 100644 input-kill-stupid-messages.patch delete mode 100644 lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch delete mode 100644 lis3-improve-handling-of-null-rate.patch delete mode 100644 namespaces-no-expert.patch delete mode 100644 no-pcspkr-modalias.patch delete mode 100644 scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
We've come a long way for namespaces since 2013 and all arches now enable namespaces. Drop the patch where we can turn it off and on.
Signed-off-by: Laura Abbott labbott@redhat.com --- kernel.spec | 2 -- namespaces-no-expert.patch | 27 --------------------------- 2 files changed, 29 deletions(-) delete mode 100644 namespaces-no-expert.patch
diff --git a/kernel.spec b/kernel.spec index 734ffaed1..a662ee004 100644 --- a/kernel.spec +++ b/kernel.spec @@ -511,8 +511,6 @@ Patch117: lis3-improve-handling-of-null-rate.patch
Patch118: scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
-Patch119: namespaces-no-expert.patch - Patch120: ath9k-rx-dma-stop-check.patch
Patch122: Input-synaptics-pin-3-touches-when-the-firmware-repo.patch diff --git a/namespaces-no-expert.patch b/namespaces-no-expert.patch deleted file mode 100644 index d732f9d0a..000000000 --- a/namespaces-no-expert.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 235b02d70a6a9837896c2ff4ca9d03f172cc4281 Mon Sep 17 00:00:00 2001 -From: "kernel-team@fedoraproject.org" kernel-team@fedoraproject.org -Date: Wed, 30 Jan 2013 10:55:31 -0500 -Subject: [PATCH] namespaces: no expert - -Bugzilla: N/A -Upstream-status: Fedora mustard ---- - init/Kconfig | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/init/Kconfig b/init/Kconfig -index 2934249fba46..19d9ee8c120b 100644 ---- a/init/Kconfig -+++ b/init/Kconfig -@@ -871,7 +871,7 @@ config SOCK_CGROUP_DATA - endif # CGROUPS - - menuconfig NAMESPACES -- bool "Namespaces support" if EXPERT -+ bool "Namespaces support" - depends on MULTIUSER - default !EXPERT - help --- -2.14.3 -
We've been carrying a patch to make CPUMASK_OFFSTACK selectable without debugging for a long time now. The comment said this was going to be replaced with something else but that never seemed to happen. We're carrying it to have a higher number of CPUs but at this point I don't think it's worth it since the upper bound is now 512. This should be enough for most Fedora use cases so just drop the patch.
Signed-off-by: Laura Abbott labbott@redhat.com --- .../fedora/generic/x86/x86_64/CONFIG_NR_CPUS | 2 +- kernel.spec | 2 -- ...-CPUMASK_OFFSTACK-usable-without-deb.patch | 34 ------------------- 3 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch
diff --git a/configs/fedora/generic/x86/x86_64/CONFIG_NR_CPUS b/configs/fedora/generic/x86/x86_64/CONFIG_NR_CPUS index 27d187f4d..9ce2b2de6 100644 --- a/configs/fedora/generic/x86/x86_64/CONFIG_NR_CPUS +++ b/configs/fedora/generic/x86/x86_64/CONFIG_NR_CPUS @@ -1 +1 @@ -CONFIG_NR_CPUS=1024 +CONFIG_NR_CPUS=512 diff --git a/kernel.spec b/kernel.spec index a662ee004..4253ff035 100644 --- a/kernel.spec +++ b/kernel.spec @@ -495,8 +495,6 @@ Source5000: patch-5.%{base_sublevel}-git%{gitrev}.xz # Standalone patches # 100 - Generic long running patches
-Patch110: lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch - Patch111: input-kill-stupid-messages.patch
Patch112: die-floppy-die.patch diff --git a/lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch b/lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch deleted file mode 100644 index 5e6d6611e..000000000 --- a/lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Josh Boyer jwboyer@fedoraproject.org -Date: Mon, 11 Nov 2013 08:39:16 -0500 -Subject: [PATCH] lib/cpumask: Make CPUMASK_OFFSTACK usable without debug - dependency - -When CPUMASK_OFFSTACK was added in 2008, it was dependent upon -DEBUG_PER_CPU_MAPS being enabled, or an architecture could select it. -The debug dependency adds additional overhead that isn't required for -operation of the feature, and we need CPUMASK_OFFSTACK to increase the -NR_CPUS value beyond 512 on x86. We drop the current dependency and make -sure SMP is set. - -Bugzilla: N/A -Upstream-status: Nak'd, supposedly replacement coming to auto-select - -Signed-off-by: Josh Boyer jwboyer@fedoraproject.org ---- - lib/Kconfig | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/lib/Kconfig b/lib/Kconfig -index 3a2ef67db6c7..4af1e7e5a611 100644 ---- a/lib/Kconfig -+++ b/lib/Kconfig -@@ -396,7 +396,8 @@ config CHECK_SIGNATURE - bool - - config CPUMASK_OFFSTACK -- bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS -+ bool "Force CPU masks off stack" -+ depends on SMP - help - Use dynamic allocation for cpumask_var_t, instead of putting - them on the stack. This is a bit more expensive, but avoids
On Thu, Aug 15, 2019 at 3:57 PM Laura Abbott labbott@redhat.com wrote:
We've been carrying a patch to make CPUMASK_OFFSTACK selectable without debugging for a long time now. The comment said this was going to be replaced with something else but that never seemed to happen. We're carrying it to have a higher number of CPUs but at this point I don't think it's worth it since the upper bound is now 512. This should be enough for most Fedora use cases so just drop the patch.
I likely agree, but copying Prarit because this was something he and I poked at forever ago.
josh
Signed-off-by: Laura Abbott labbott@redhat.com
.../fedora/generic/x86/x86_64/CONFIG_NR_CPUS | 2 +- kernel.spec | 2 -- ...-CPUMASK_OFFSTACK-usable-without-deb.patch | 34 ------------------- 3 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch
diff --git a/configs/fedora/generic/x86/x86_64/CONFIG_NR_CPUS b/configs/fedora/generic/x86/x86_64/CONFIG_NR_CPUS index 27d187f4d..9ce2b2de6 100644 --- a/configs/fedora/generic/x86/x86_64/CONFIG_NR_CPUS +++ b/configs/fedora/generic/x86/x86_64/CONFIG_NR_CPUS @@ -1 +1 @@ -CONFIG_NR_CPUS=1024 +CONFIG_NR_CPUS=512 diff --git a/kernel.spec b/kernel.spec index a662ee004..4253ff035 100644 --- a/kernel.spec +++ b/kernel.spec @@ -495,8 +495,6 @@ Source5000: patch-5.%{base_sublevel}-git%{gitrev}.xz # Standalone patches # 100 - Generic long running patches
-Patch110: lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch
Patch111: input-kill-stupid-messages.patch
Patch112: die-floppy-die.patch diff --git a/lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch b/lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch deleted file mode 100644 index 5e6d6611e..000000000 --- a/lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Josh Boyer jwboyer@fedoraproject.org -Date: Mon, 11 Nov 2013 08:39:16 -0500 -Subject: [PATCH] lib/cpumask: Make CPUMASK_OFFSTACK usable without debug
- dependency
-When CPUMASK_OFFSTACK was added in 2008, it was dependent upon -DEBUG_PER_CPU_MAPS being enabled, or an architecture could select it. -The debug dependency adds additional overhead that isn't required for -operation of the feature, and we need CPUMASK_OFFSTACK to increase the -NR_CPUS value beyond 512 on x86. We drop the current dependency and make -sure SMP is set.
-Bugzilla: N/A -Upstream-status: Nak'd, supposedly replacement coming to auto-select
-Signed-off-by: Josh Boyer jwboyer@fedoraproject.org
- lib/Kconfig | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-diff --git a/lib/Kconfig b/lib/Kconfig -index 3a2ef67db6c7..4af1e7e5a611 100644 ---- a/lib/Kconfig -+++ b/lib/Kconfig -@@ -396,7 +396,8 @@ config CHECK_SIGNATURE
bool
- config CPUMASK_OFFSTACK
-- bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS -+ bool "Force CPU masks off stack" -+ depends on SMP
help
Use dynamic allocation for cpumask_var_t, instead of putting
them on the stack. This is a bit more expensive, but avoids
-- 2.21.0
On 8/16/19 6:58 AM, Josh Boyer wrote:
On Thu, Aug 15, 2019 at 3:57 PM Laura Abbott labbott@redhat.com wrote:
We've been carrying a patch to make CPUMASK_OFFSTACK selectable without debugging for a long time now. The comment said this was going to be replaced with something else but that never seemed to happen. We're carrying it to have a higher number of CPUs but at this point I don't think it's worth it since the upper bound is now 512. This should be enough for most Fedora use cases so just drop the patch.
I likely agree, but copying Prarit because this was something he and I poked at forever ago.
Given that RHEL no longer bothers with this I hope he would be okay with it :)
josh
Signed-off-by: Laura Abbott labbott@redhat.com
.../fedora/generic/x86/x86_64/CONFIG_NR_CPUS | 2 +- kernel.spec | 2 -- ...-CPUMASK_OFFSTACK-usable-without-deb.patch | 34 ------------------- 3 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch
diff --git a/configs/fedora/generic/x86/x86_64/CONFIG_NR_CPUS b/configs/fedora/generic/x86/x86_64/CONFIG_NR_CPUS index 27d187f4d..9ce2b2de6 100644 --- a/configs/fedora/generic/x86/x86_64/CONFIG_NR_CPUS +++ b/configs/fedora/generic/x86/x86_64/CONFIG_NR_CPUS @@ -1 +1 @@ -CONFIG_NR_CPUS=1024 +CONFIG_NR_CPUS=512 diff --git a/kernel.spec b/kernel.spec index a662ee004..4253ff035 100644 --- a/kernel.spec +++ b/kernel.spec @@ -495,8 +495,6 @@ Source5000: patch-5.%{base_sublevel}-git%{gitrev}.xz # Standalone patches # 100 - Generic long running patches
-Patch110: lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch
Patch111: input-kill-stupid-messages.patch
Patch112: die-floppy-die.patch
diff --git a/lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch b/lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch deleted file mode 100644 index 5e6d6611e..000000000 --- a/lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Josh Boyer jwboyer@fedoraproject.org -Date: Mon, 11 Nov 2013 08:39:16 -0500 -Subject: [PATCH] lib/cpumask: Make CPUMASK_OFFSTACK usable without debug
- dependency
-When CPUMASK_OFFSTACK was added in 2008, it was dependent upon -DEBUG_PER_CPU_MAPS being enabled, or an architecture could select it. -The debug dependency adds additional overhead that isn't required for -operation of the feature, and we need CPUMASK_OFFSTACK to increase the -NR_CPUS value beyond 512 on x86. We drop the current dependency and make -sure SMP is set.
-Bugzilla: N/A -Upstream-status: Nak'd, supposedly replacement coming to auto-select
-Signed-off-by: Josh Boyer jwboyer@fedoraproject.org
- lib/Kconfig | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-diff --git a/lib/Kconfig b/lib/Kconfig -index 3a2ef67db6c7..4af1e7e5a611 100644 ---- a/lib/Kconfig -+++ b/lib/Kconfig -@@ -396,7 +396,8 @@ config CHECK_SIGNATURE
bool
- config CPUMASK_OFFSTACK
-- bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS -+ bool "Force CPU masks off stack" -+ depends on SMP
help
Use dynamic allocation for cpumask_var_t, instead of putting
them on the stack. This is a bit more expensive, but avoids
-- 2.21.0
* Laura Abbott:
On 8/16/19 6:58 AM, Josh Boyer wrote:
On Thu, Aug 15, 2019 at 3:57 PM Laura Abbott labbott@redhat.com wrote:
We've been carrying a patch to make CPUMASK_OFFSTACK selectable without debugging for a long time now. The comment said this was going to be replaced with something else but that never seemed to happen. We're carrying it to have a higher number of CPUs but at this point I don't think it's worth it since the upper bound is now 512. This should be enough for most Fedora use cases so just drop the patch.
I likely agree, but copying Prarit because this was something he and I poked at forever ago.
Given that RHEL no longer bothers with this I hope he would be okay with it :)
RHEL has a larger NR_CPU value, though. For example, it's 8192 on x86-64, while Fedora 31 has 1024.
Thanks, Florian
Florian Weimer schreef op vr 16-08-2019 om 14:04 [+0200]:
RHEL has a larger NR_CPU value, though. For example, it's 8192 on x86-64, while Fedora 31 has 1024.
On the Fedora x86-64 debug builds it's 8192 again. Why's that?
Paul Bolle
On 8/16/19 2:57 PM, Paul Bolle wrote:
Florian Weimer schreef op vr 16-08-2019 om 14:04 [+0200]:
RHEL has a larger NR_CPU value, though. For example, it's 8192 on x86-64, while Fedora 31 has 1024.
On the Fedora x86-64 debug builds it's 8192 again. Why's that?
Paul Bolle
That's the option for max cpus. We don't want to turn it on in all Fedora builds since it would use up more resources we probably don't actually need. Turning on for debugging in Fedora is okay though. RHEL is focused on larger footprints and makes the trade off to have it enabled all the time.
Thanks, Laura
On 8/19/19 9:15 AM, Laura Abbott wrote:
On 8/16/19 2:57 PM, Paul Bolle wrote:
Florian Weimer schreef op vr 16-08-2019 om 14:04 [+0200]:
RHEL has a larger NR_CPU value, though. For example, it's 8192 on x86-64, while Fedora 31 has 1024.
On the Fedora x86-64 debug builds it's 8192 again. Why's that?
Paul Bolle
That's the option for max cpus. We don't want to turn it on in all Fedora builds since it would use up more resources we probably don't actually need. Turning on for debugging in Fedora is okay though. RHEL is focused on larger footprints and makes the trade off to have it enabled all the time.
I think I measured the impact of 8192 vs 512 (or 256?) a long time ago and we are talking about _k_ of memory. We should stick with what upstream has at 8192. It's easier to debug when we have the same value as the default IMO.
Having said that, it has been a long time since I had to debug a NR_CPUS/nr_cpus issue in the kernel. We're just not seeing bugs around the value anymore.
P.
Thanks, Laura
On 8/22/19 8:58 AM, Prarit Bhargava wrote:
On 8/19/19 9:15 AM, Laura Abbott wrote:
On 8/16/19 2:57 PM, Paul Bolle wrote:
Florian Weimer schreef op vr 16-08-2019 om 14:04 [+0200]:
RHEL has a larger NR_CPU value, though. For example, it's 8192 on x86-64, while Fedora 31 has 1024.
On the Fedora x86-64 debug builds it's 8192 again. Why's that?
Paul Bolle
That's the option for max cpus. We don't want to turn it on in all Fedora builds since it would use up more resources we probably don't actually need. Turning on for debugging in Fedora is okay though. RHEL is focused on larger footprints and makes the trade off to have it enabled all the time.
I think I measured the impact of 8192 vs 512 (or 256?) a long time ago and we are talking about _k_ of memory. We should stick with what upstream has at 8192. It's easier to debug when we have the same value as the default IMO.
Having said that, it has been a long time since I had to debug a NR_CPUS/nr_cpus issue in the kernel. We're just not seeing bugs around the value anymore.
I was going to ask about the actual impact of a larger number of CPUs. If it's actually only k of memory it's probably better to just set MAXCPUS all the time. Even the lowest end machines probably see more change when frameworks change.
And yes, I also think that we've come a long way so NR_CPUS is less of an important option to optimize these days. I think I'll just submit another patch to just do the max cpus.
Thanks, Laura
P.
Thanks, Laura
Hi,
On 8/22/19 11:36 AM, Laura Abbott wrote:
On 8/22/19 8:58 AM, Prarit Bhargava wrote:
On 8/19/19 9:15 AM, Laura Abbott wrote:
On 8/16/19 2:57 PM, Paul Bolle wrote:
Florian Weimer schreef op vr 16-08-2019 om 14:04 [+0200]:
RHEL has a larger NR_CPU value, though. For example, it's 8192 on x86-64, while Fedora 31 has 1024.
On the Fedora x86-64 debug builds it's 8192 again. Why's that?
Paul Bolle
That's the option for max cpus. We don't want to turn it on in all Fedora builds since it would use up more resources we probably don't actually need. Turning on for debugging in Fedora is okay though. RHEL is focused on larger footprints and makes the trade off to have it enabled all the time.
I think I measured the impact of 8192 vs 512 (or 256?) a long time ago and we are talking about _k_ of memory. We should stick with what upstream has at 8192. It's easier to debug when we have the same value as the default IMO.
Having said that, it has been a long time since I had to debug a NR_CPUS/nr_cpus issue in the kernel. We're just not seeing bugs around the value anymore.
I was going to ask about the actual impact of a larger number of CPUs. If it's actually only k of memory it's probably better to just set MAXCPUS all the time. Even the lowest end machines probably see more change when frameworks change.
And yes, I also think that we've come a long way so NR_CPUS is less of an important option to optimize these days. I think I'll just submit another patch to just do the max cpus.
Forgive me if you have already posted (didn't see it yet).
Its probably a good idea to bump the aarch64 config at the same time. Some aarch64 "desktop" machines is already at the 256 core limit currently in use.
Thanks, Laura
P.
Thanks, Laura
kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
On Thu, Oct 24, 2019 at 09:41:22AM -0500, Jeremy Linton wrote:
Hi,
On 8/22/19 11:36 AM, Laura Abbott wrote:
On 8/22/19 8:58 AM, Prarit Bhargava wrote:
On 8/19/19 9:15 AM, Laura Abbott wrote:
On 8/16/19 2:57 PM, Paul Bolle wrote:
Florian Weimer schreef op vr 16-08-2019 om 14:04 [+0200]:
RHEL has a larger NR_CPU value, though. For example, it's 8192 on x86-64, while Fedora 31 has 1024.
On the Fedora x86-64 debug builds it's 8192 again. Why's that?
Paul Bolle
That's the option for max cpus. We don't want to turn it on in all Fedora builds since it would use up more resources we probably don't actually need. Turning on for debugging in Fedora is okay though. RHEL is focused on larger footprints and makes the trade off to have it enabled all the time.
I think I measured the impact of 8192 vs 512 (or 256?) a long time ago and we are talking about _k_ of memory. We should stick with what upstream has at 8192. It's easier to debug when we have the same value as the default IMO.
Having said that, it has been a long time since I had to debug a NR_CPUS/nr_cpus issue in the kernel. We're just not seeing bugs around the value anymore.
I was going to ask about the actual impact of a larger number of CPUs. If it's actually only k of memory it's probably better to just set MAXCPUS all the time. Even the lowest end machines probably see more change when frameworks change.
And yes, I also think that we've come a long way so NR_CPUS is less of an important option to optimize these days. I think I'll just submit another patch to just do the max cpus.
Forgive me if you have already posted (didn't see it yet).
Its probably a good idea to bump the aarch64 config at the same time. Some aarch64 "desktop" machines is already at the 256 core limit currently in use.
I've bumped aarch64 up to 4096, s390x up to 512, and powerpc up to 2048 in Rawhide and it'll be in the build after v5.4-rc6.
- Jeremy
Hi Laura,
Laura Abbott schreef op do 15-08-2019 om 15:57 [-0400]:
.../fedora/generic/x86/x86_64/CONFIG_NR_CPUS | 2 +- kernel.spec | 2 -- ...-CPUMASK_OFFSTACK-usable-without-deb.patch | 34 ------------------- 3 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch
diff --git a/configs/fedora/generic/x86/x86_64/CONFIG_NR_CPUS b/configs/fedora/generic/x86/x86_64/CONFIG_NR_CPUS index 27d187f4d..9ce2b2de6 100644 --- a/configs/fedora/generic/x86/x86_64/CONFIG_NR_CPUS +++ b/configs/fedora/generic/x86/x86_64/CONFIG_NR_CPUS @@ -1 +1 @@ -CONFIG_NR_CPUS=1024 +CONFIG_NR_CPUS=512
This patch needs an included regeneration of the kernel-*.config files to be complete.
Thanks,
Paul Bolle
On 8/16/19 2:55 PM, Paul Bolle wrote:
Hi Laura,
Laura Abbott schreef op do 15-08-2019 om 15:57 [-0400]:
.../fedora/generic/x86/x86_64/CONFIG_NR_CPUS | 2 +- kernel.spec | 2 -- ...-CPUMASK_OFFSTACK-usable-without-deb.patch | 34 ------------------- 3 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch
diff --git a/configs/fedora/generic/x86/x86_64/CONFIG_NR_CPUS b/configs/fedora/generic/x86/x86_64/CONFIG_NR_CPUS index 27d187f4d..9ce2b2de6 100644 --- a/configs/fedora/generic/x86/x86_64/CONFIG_NR_CPUS +++ b/configs/fedora/generic/x86/x86_64/CONFIG_NR_CPUS @@ -1 +1 @@ -CONFIG_NR_CPUS=1024 +CONFIG_NR_CPUS=512
This patch needs an included regeneration of the kernel-*.config files to be complete.
Thanks,
Paul Bolle
Thanks for the reminder
It's been years since we've seen this warning. Just drop it.
Signed-off-by: Laura Abbott labbott@redhat.com --- kernel.spec | 2 - ...validate_disk-prevent-NULL-ptr-deref.patch | 39 ------------------- 2 files changed, 41 deletions(-) delete mode 100644 scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
diff --git a/kernel.spec b/kernel.spec index 4253ff035..260976479 100644 --- a/kernel.spec +++ b/kernel.spec @@ -507,8 +507,6 @@ Patch116: crash-driver.patch
Patch117: lis3-improve-handling-of-null-rate.patch
-Patch118: scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch - Patch120: ath9k-rx-dma-stop-check.patch
Patch122: Input-synaptics-pin-3-touches-when-the-firmware-repo.patch diff --git a/scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch b/scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch deleted file mode 100644 index a19267cc1..000000000 --- a/scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 7afe9a8d7dca86a8f35250f21f5f0a62ea2fedf7 Mon Sep 17 00:00:00 2001 -From: "kernel-team@fedoraproject.org" kernel-team@fedoraproject.org -Date: Fri, 10 Feb 2012 14:56:13 -0500 -Subject: [PATCH] scsi: sd_revalidate_disk prevent NULL ptr deref - -Bugzilla: 754518 -Upstream-status: Fedora mustard (might be worth dropping...) ---- - drivers/scsi/sd.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c -index 3d22fc3..07aec76 100644 ---- a/drivers/scsi/sd.c -+++ b/drivers/scsi/sd.c -@@ -2825,7 +2825,7 @@ static inline u32 logical_to_sectors(struct scsi_device *sdev, u32 blocks) - static int sd_revalidate_disk(struct gendisk *disk) - { - struct scsi_disk *sdkp = scsi_disk(disk); -- struct scsi_device *sdp = sdkp->device; -+ struct scsi_device *sdp; - struct request_queue *q = sdkp->disk->queue; - sector_t old_capacity = sdkp->capacity; - unsigned char *buffer; -@@ -2833,6 +2833,11 @@ static int sd_revalidate_disk(struct gendisk *disk) - SCSI_LOG_HLQUEUE(3, sd_printk(KERN_INFO, sdkp, - "sd_revalidate_disk\n")); - -+ if (WARN_ONCE((!sdkp), "Invalid scsi_disk from %p\n", disk)) -+ goto out; -+ -+ sdp = sdkp->device; -+ - /* - * If the device is offline, don't try and read capacity or any - * of the other niceties. --- -2.5.0 -
It's been years. Let's see if we actually still need this.
Signed-off-by: Laura Abbott labbott@redhat.com --- ath9k-rx-dma-stop-check.patch | 38 ----------------------------------- kernel.spec | 2 -- 2 files changed, 40 deletions(-) delete mode 100644 ath9k-rx-dma-stop-check.patch
diff --git a/ath9k-rx-dma-stop-check.patch b/ath9k-rx-dma-stop-check.patch deleted file mode 100644 index 40cbafc7b..000000000 --- a/ath9k-rx-dma-stop-check.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: "kernel-team@fedoraproject.org" kernel-team@fedoraproject.org -Date: Wed, 6 Feb 2013 09:57:47 -0500 -Subject: [PATCH] ath9k: rx dma stop check - ---- - drivers/net/wireless/ath/ath9k/mac.c | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c -index bba85d1a6cd1..ebbee8f17130 100644 ---- a/drivers/net/wireless/ath/ath9k/mac.c -+++ b/drivers/net/wireless/ath/ath9k/mac.c -@@ -693,7 +693,7 @@ bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset) - { - #define AH_RX_STOP_DMA_TIMEOUT 10000 /* usec */ - struct ath_common *common = ath9k_hw_common(ah); -- u32 mac_status, last_mac_status = 0; -+ u32 mac_status = 0, last_mac_status = 0; - int i; - - /* Enable access to the DMA observation bus */ -@@ -723,6 +723,16 @@ bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset) - } - - if (i == 0) { -+ if (!AR_SREV_9300_20_OR_LATER(ah) && -+ (mac_status & 0x700) == 0) { -+ /* -+ * DMA is idle but the MAC is still stuck -+ * processing events -+ */ -+ *reset = true; -+ return true; -+ } -+ - ath_err(common, - "DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x DMADBG_7=0x%08x\n", - AH_RX_STOP_DMA_TIMEOUT / 1000, diff --git a/kernel.spec b/kernel.spec index 260976479..79aabba51 100644 --- a/kernel.spec +++ b/kernel.spec @@ -507,8 +507,6 @@ Patch116: crash-driver.patch
Patch117: lis3-improve-handling-of-null-rate.patch
-Patch120: ath9k-rx-dma-stop-check.patch - Patch122: Input-synaptics-pin-3-touches-when-the-firmware-repo.patch
# This no longer applies, let's see if it needs to be updated
We've been carrying this patch for years. If someone wants to do the work to get it upstream, they are welcome to do so.
Signed-off-by: Laura Abbott labbott@redhat.com --- kernel.spec | 2 - lis3-improve-handling-of-null-rate.patch | 75 ------------------------ 2 files changed, 77 deletions(-) delete mode 100644 lis3-improve-handling-of-null-rate.patch
diff --git a/kernel.spec b/kernel.spec index 79aabba51..1a7af5cd4 100644 --- a/kernel.spec +++ b/kernel.spec @@ -505,8 +505,6 @@ Patch115: Kbuild-Add-an-option-to-enable-GCC-VTA.patch
Patch116: crash-driver.patch
-Patch117: lis3-improve-handling-of-null-rate.patch - Patch122: Input-synaptics-pin-3-touches-when-the-firmware-repo.patch
# This no longer applies, let's see if it needs to be updated diff --git a/lis3-improve-handling-of-null-rate.patch b/lis3-improve-handling-of-null-rate.patch deleted file mode 100644 index 1dd00b645..000000000 --- a/lis3-improve-handling-of-null-rate.patch +++ /dev/null @@ -1,75 +0,0 @@ -From: =?UTF-8?q?=C3=89ric=20Piel?= eric.piel@tremplin-utc.net -Date: Thu, 3 Nov 2011 16:22:40 +0100 -Subject: [PATCH] lis3: improve handling of null rate - -When obtaining a rate of 0, we would disable the device supposely -because it seems to behave incorectly. It actually only comes from the -fact that the device is off and on lis3dc it's reflected in the rate. -So handle this nicely by just waiting a safe time, and then using the -device as normally. - -Bugzilla: 785814 -Upstream-status: ?? - -Signed-off-by: ??ric Piel eric.piel@tremplin-utc.net ---- - drivers/misc/lis3lv02d/lis3lv02d.c | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c -index fb8705fc3aca..50c2b93c1273 100644 ---- a/drivers/misc/lis3lv02d/lis3lv02d.c -+++ b/drivers/misc/lis3lv02d/lis3lv02d.c -@@ -216,7 +216,8 @@ static void lis3lv02d_get_xyz(struct lis3lv02d *lis3, int *x, int *y, int *z) - /* conversion btw sampling rate and the register values */ - static int lis3_12_rates[4] = {40, 160, 640, 2560}; - static int lis3_8_rates[2] = {100, 400}; --static int lis3_3dc_rates[16] = {0, 1, 10, 25, 50, 100, 200, 400, 1600, 5000}; -+/* LIS3DC: 0 = power off, above 9 = undefined */ -+static int lis3_3dc_rates[16] = {0, 1, 10, 25, 50, 100, 200, 400, 1600, 5000, -1, -1, -1, -1, -1, -1}; - static int lis3_3dlh_rates[4] = {50, 100, 400, 1000}; - - /* ODR is Output Data Rate */ -@@ -231,12 +232,11 @@ static int lis3lv02d_get_odr(struct lis3lv02d *lis3) - return lis3->odrs[(ctrl >> shift)]; - } - --static int lis3lv02d_get_pwron_wait(struct lis3lv02d *lis3) -+static int lis3lv02d_wait_pwron(struct lis3lv02d *lis3) - { - int div = lis3lv02d_get_odr(lis3); -- -- if (WARN_ONCE(div == 0, "device returned spurious data")) -- return -ENXIO; -+ if (div <= 0) -+ div = 1; /* maximum delay */ - - /* LIS3 power on delay is quite long */ - msleep(lis3->pwron_delay / div); -@@ -303,7 +303,7 @@ static int lis3lv02d_selftest(struct lis3lv02d *lis3, s16 results[3]) - - lis3->read(lis3, ctlreg, ®); - lis3->write(lis3, ctlreg, (reg | selftest)); -- ret = lis3lv02d_get_pwron_wait(lis3); -+ ret = lis3lv02d_wait_pwron(lis3); - if (ret) - goto fail; - -@@ -314,7 +314,7 @@ static int lis3lv02d_selftest(struct lis3lv02d *lis3, s16 results[3]) - - /* back to normal settings */ - lis3->write(lis3, ctlreg, reg); -- ret = lis3lv02d_get_pwron_wait(lis3); -+ ret = lis3lv02d_wait_pwron(lis3); - if (ret) - goto fail; - -@@ -434,7 +434,7 @@ int lis3lv02d_poweron(struct lis3lv02d *lis3) - } - } - -- err = lis3lv02d_get_pwron_wait(lis3); -+ err = lis3lv02d_wait_pwron(lis3); - if (err) - return err; -
We've come a long way. Let's just leave these drivers alone.
Signed-off-by: Laura Abbott labbott@redhat.com --- die-floppy-die.patch | 29 ----------------------------- kernel.spec | 4 ---- no-pcspkr-modalias.patch | 22 ---------------------- 3 files changed, 55 deletions(-) delete mode 100644 die-floppy-die.patch delete mode 100644 no-pcspkr-modalias.patch
diff --git a/die-floppy-die.patch b/die-floppy-die.patch deleted file mode 100644 index caaa2dde5..000000000 --- a/die-floppy-die.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Kyle McMartin kyle@phobos.i.jkkm.org -Date: Tue, 30 Mar 2010 00:04:29 -0400 -Subject: [PATCH] die-floppy-die - -Kill the floppy.ko pnp modalias. We were surviving just fine without -autoloading floppy drivers, tyvm. - -Please feel free to register all complaints in the wastepaper bin. - -Bugzilla: N/A -Upstream-status: Fedora mustard ---- - drivers/block/floppy.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c -index a08cda955285..e320e1e679cf 100644 ---- a/drivers/block/floppy.c -+++ b/drivers/block/floppy.c -@@ -4633,8 +4633,7 @@ static const struct pnp_device_id floppy_pnpids[] = { - {"PNP0700", 0}, - {} - }; -- --MODULE_DEVICE_TABLE(pnp, floppy_pnpids); -+/* MODULE_DEVICE_TABLE(pnp, floppy_pnpids); */ - - #else - diff --git a/kernel.spec b/kernel.spec index 1a7af5cd4..0e9ba6be4 100644 --- a/kernel.spec +++ b/kernel.spec @@ -497,10 +497,6 @@ Source5000: patch-5.%{base_sublevel}-git%{gitrev}.xz
Patch111: input-kill-stupid-messages.patch
-Patch112: die-floppy-die.patch - -Patch113: no-pcspkr-modalias.patch - Patch115: Kbuild-Add-an-option-to-enable-GCC-VTA.patch
Patch116: crash-driver.patch diff --git a/no-pcspkr-modalias.patch b/no-pcspkr-modalias.patch deleted file mode 100644 index 2ccd87202..000000000 --- a/no-pcspkr-modalias.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: "kernel-team@fedoraproject.org" kernel-team@fedoraproject.org -Date: Thu, 29 Jul 2010 16:46:31 -0700 -Subject: [PATCH] no pcspkr modalias - -Bugzilla: N/A -Upstream-status: Fedora mustard ---- - drivers/input/misc/pcspkr.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/drivers/input/misc/pcspkr.c b/drivers/input/misc/pcspkr.c -index 56ddba21de84..23534f420e68 100644 ---- a/drivers/input/misc/pcspkr.c -+++ b/drivers/input/misc/pcspkr.c -@@ -23,7 +23,6 @@ - MODULE_AUTHOR("Vojtech Pavlik vojtech@ucw.cz"); - MODULE_DESCRIPTION("PC Speaker beeper driver"); - MODULE_LICENSE("GPL"); --MODULE_ALIAS("platform:pcspkr"); - - static int pcspkr_event(struct input_dev *dev, unsigned int type, - unsigned int code, int value)
On Thu, Aug 15, 2019 at 3:58 PM Laura Abbott labbott@redhat.com wrote:
We've come a long way. Let's just leave these drivers alone.
Can we not build them at all instead? Or put them in modules-extra if we're too chicken to disable them entirely.
josh
Signed-off-by: Laura Abbott labbott@redhat.com
die-floppy-die.patch | 29 ----------------------------- kernel.spec | 4 ---- no-pcspkr-modalias.patch | 22 ---------------------- 3 files changed, 55 deletions(-) delete mode 100644 die-floppy-die.patch delete mode 100644 no-pcspkr-modalias.patch
diff --git a/die-floppy-die.patch b/die-floppy-die.patch deleted file mode 100644 index caaa2dde5..000000000 --- a/die-floppy-die.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Kyle McMartin kyle@phobos.i.jkkm.org -Date: Tue, 30 Mar 2010 00:04:29 -0400 -Subject: [PATCH] die-floppy-die
-Kill the floppy.ko pnp modalias. We were surviving just fine without -autoloading floppy drivers, tyvm.
-Please feel free to register all complaints in the wastepaper bin.
-Bugzilla: N/A
-Upstream-status: Fedora mustard
- drivers/block/floppy.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c -index a08cda955285..e320e1e679cf 100644 ---- a/drivers/block/floppy.c -+++ b/drivers/block/floppy.c -@@ -4633,8 +4633,7 @@ static const struct pnp_device_id floppy_pnpids[] = {
{"PNP0700", 0},
{}
- };
-- --MODULE_DEVICE_TABLE(pnp, floppy_pnpids); -+/* MODULE_DEVICE_TABLE(pnp, floppy_pnpids); */
- #else
diff --git a/kernel.spec b/kernel.spec index 1a7af5cd4..0e9ba6be4 100644 --- a/kernel.spec +++ b/kernel.spec @@ -497,10 +497,6 @@ Source5000: patch-5.%{base_sublevel}-git%{gitrev}.xz
Patch111: input-kill-stupid-messages.patch
-Patch112: die-floppy-die.patch
-Patch113: no-pcspkr-modalias.patch
Patch115: Kbuild-Add-an-option-to-enable-GCC-VTA.patch
Patch116: crash-driver.patch diff --git a/no-pcspkr-modalias.patch b/no-pcspkr-modalias.patch deleted file mode 100644 index 2ccd87202..000000000 --- a/no-pcspkr-modalias.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: "kernel-team@fedoraproject.org" kernel-team@fedoraproject.org -Date: Thu, 29 Jul 2010 16:46:31 -0700 -Subject: [PATCH] no pcspkr modalias
-Bugzilla: N/A
-Upstream-status: Fedora mustard
- drivers/input/misc/pcspkr.c | 1 -
- 1 file changed, 1 deletion(-)
-diff --git a/drivers/input/misc/pcspkr.c b/drivers/input/misc/pcspkr.c -index 56ddba21de84..23534f420e68 100644 ---- a/drivers/input/misc/pcspkr.c -+++ b/drivers/input/misc/pcspkr.c -@@ -23,7 +23,6 @@
- MODULE_AUTHOR("Vojtech Pavlik vojtech@ucw.cz");
- MODULE_DESCRIPTION("PC Speaker beeper driver");
- MODULE_LICENSE("GPL");
--MODULE_ALIAS("platform:pcspkr");
- static int pcspkr_event(struct input_dev *dev, unsigned int type,
unsigned int code, int value)
-- 2.21.0 _______________________________________________ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
On 8/16/19 7:00 AM, Josh Boyer wrote:
On Thu, Aug 15, 2019 at 3:58 PM Laura Abbott labbott@redhat.com wrote:
We've come a long way. Let's just leave these drivers alone.
Can we not build them at all instead? Or put them in modules-extra if we're too chicken to disable them entirely.
I like the suggestion of putting them in mod-extra.
josh
Signed-off-by: Laura Abbott labbott@redhat.com
die-floppy-die.patch | 29 ----------------------------- kernel.spec | 4 ---- no-pcspkr-modalias.patch | 22 ---------------------- 3 files changed, 55 deletions(-) delete mode 100644 die-floppy-die.patch delete mode 100644 no-pcspkr-modalias.patch
diff --git a/die-floppy-die.patch b/die-floppy-die.patch deleted file mode 100644 index caaa2dde5..000000000 --- a/die-floppy-die.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Kyle McMartin kyle@phobos.i.jkkm.org -Date: Tue, 30 Mar 2010 00:04:29 -0400 -Subject: [PATCH] die-floppy-die
-Kill the floppy.ko pnp modalias. We were surviving just fine without -autoloading floppy drivers, tyvm.
-Please feel free to register all complaints in the wastepaper bin.
-Bugzilla: N/A
-Upstream-status: Fedora mustard
- drivers/block/floppy.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c -index a08cda955285..e320e1e679cf 100644 ---- a/drivers/block/floppy.c -+++ b/drivers/block/floppy.c -@@ -4633,8 +4633,7 @@ static const struct pnp_device_id floppy_pnpids[] = {
{"PNP0700", 0},
{}
- };
-- --MODULE_DEVICE_TABLE(pnp, floppy_pnpids); -+/* MODULE_DEVICE_TABLE(pnp, floppy_pnpids); */
- #else
diff --git a/kernel.spec b/kernel.spec index 1a7af5cd4..0e9ba6be4 100644 --- a/kernel.spec +++ b/kernel.spec @@ -497,10 +497,6 @@ Source5000: patch-5.%{base_sublevel}-git%{gitrev}.xz
Patch111: input-kill-stupid-messages.patch
-Patch112: die-floppy-die.patch
-Patch113: no-pcspkr-modalias.patch
Patch115: Kbuild-Add-an-option-to-enable-GCC-VTA.patch
Patch116: crash-driver.patch
diff --git a/no-pcspkr-modalias.patch b/no-pcspkr-modalias.patch deleted file mode 100644 index 2ccd87202..000000000 --- a/no-pcspkr-modalias.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: "kernel-team@fedoraproject.org" kernel-team@fedoraproject.org -Date: Thu, 29 Jul 2010 16:46:31 -0700 -Subject: [PATCH] no pcspkr modalias
-Bugzilla: N/A
-Upstream-status: Fedora mustard
- drivers/input/misc/pcspkr.c | 1 -
- 1 file changed, 1 deletion(-)
-diff --git a/drivers/input/misc/pcspkr.c b/drivers/input/misc/pcspkr.c -index 56ddba21de84..23534f420e68 100644 ---- a/drivers/input/misc/pcspkr.c -+++ b/drivers/input/misc/pcspkr.c -@@ -23,7 +23,6 @@
- MODULE_AUTHOR("Vojtech Pavlik vojtech@ucw.cz");
- MODULE_DESCRIPTION("PC Speaker beeper driver");
- MODULE_LICENSE("GPL");
--MODULE_ALIAS("platform:pcspkr");
- static int pcspkr_event(struct input_dev *dev, unsigned int type,
unsigned int code, int value)
-- 2.21.0 _______________________________________________ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Let's see if this results in flooding.
Signed-off-by: Laura Abbott labbott@redhat.com --- input-kill-stupid-messages.patch | 30 ------------------------------ kernel.spec | 2 -- 2 files changed, 32 deletions(-) delete mode 100644 input-kill-stupid-messages.patch
diff --git a/input-kill-stupid-messages.patch b/input-kill-stupid-messages.patch deleted file mode 100644 index 04205f857..000000000 --- a/input-kill-stupid-messages.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: "kernel-team@fedoraproject.org" kernel-team@fedoraproject.org -Date: Thu, 29 Jul 2010 16:46:31 -0700 -Subject: [PATCH] input: kill stupid messages - -Bugzilla: N/A -Upstream-status: Fedora mustard ---- - drivers/input/keyboard/atkbd.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c -index ec876b5b1382..9d5216e23a09 100644 ---- a/drivers/input/keyboard/atkbd.c -+++ b/drivers/input/keyboard/atkbd.c -@@ -436,11 +436,15 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data, - goto out; - case ATKBD_RET_ACK: - case ATKBD_RET_NAK: -+# if 0 -+ /* Quite a few key switchers and other tools trigger this -+ * and it confuses people who can do nothing about it */ - if (printk_ratelimit()) - dev_warn(&serio->dev, - "Spurious %s on %s. " - "Some program might be trying to access hardware directly.\n", - data == ATKBD_RET_ACK ? "ACK" : "NAK", serio->phys); -+#endif - goto out; - case ATKBD_RET_ERR: - atkbd->err_count++; diff --git a/kernel.spec b/kernel.spec index 0e9ba6be4..e7e73d104 100644 --- a/kernel.spec +++ b/kernel.spec @@ -495,8 +495,6 @@ Source5000: patch-5.%{base_sublevel}-git%{gitrev}.xz # Standalone patches # 100 - Generic long running patches
-Patch111: input-kill-stupid-messages.patch - Patch115: Kbuild-Add-an-option-to-enable-GCC-VTA.patch
Patch116: crash-driver.patch
It's been years and gcc has changed a lot.
Signed-off-by: Laura Abbott labbott@redhat.com --- Kbuild-Add-an-option-to-enable-GCC-VTA.patch | 94 -------------------- kernel.spec | 2 - 2 files changed, 96 deletions(-) delete mode 100644 Kbuild-Add-an-option-to-enable-GCC-VTA.patch
diff --git a/Kbuild-Add-an-option-to-enable-GCC-VTA.patch b/Kbuild-Add-an-option-to-enable-GCC-VTA.patch deleted file mode 100644 index 6bbb0efdf..000000000 --- a/Kbuild-Add-an-option-to-enable-GCC-VTA.patch +++ /dev/null @@ -1,94 +0,0 @@ -From a446d2f94ce540689c7a46bf457d92409e9c4d7e Mon Sep 17 00:00:00 2001 -From: Josh Stone jistone@redhat.com -Date: Fri, 21 Nov 2014 10:40:00 -0800 -Subject: [PATCH] Kbuild: Add an option to enable GCC VTA -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Due to recent codegen issues, gcc -fvar-tracking-assignments was -unconditionally disabled in commit 2062afb4f804a ("Fix gcc-4.9.0 -miscompilation of load_balance() in scheduler"). However, this reduces -the debuginfo coverage for variable locations, especially in inline -functions. VTA is certainly not perfect either in those cases, but it -is much better than without. With compiler versions that have fixed the -codegen bugs, we would prefer to have the better details for SystemTap, -and surely other debuginfo consumers like perf will benefit as well. - -This patch simply makes CONFIG_DEBUG_INFO_VTA an option. I considered -Frank and Linus's discussion of a cc-option-like -fcompare-debug test, -but I'm convinced that a narrow test of an arch-specific codegen issue -is not really useful. GCC has their own regression tests for this, so -I'd suggest GCC_COMPARE_DEBUG=-fvar-tracking-assignments-toggle is more -useful for kernel developers to test confidence. - -In fact, I ran into a couple more issues when testing for this patch[1], -although neither of those had any codegen impact. - [1] https://bugzilla.redhat.com/show_bug.cgi?id=1140872 - -With gcc-4.9.2-1.fc22, I can now build v3.18-rc5 with Fedora's i686 and -x86_64 configs, and this is completely clean with GCC_COMPARE_DEBUG. - -Cc: Frank Ch. Eigler fche@redhat.com -Cc: Jakub Jelinek jakub@redhat.com -Cc: Josh Boyer jwboyer@fedoraproject.org -Cc: Greg Kroah-Hartman gregkh@linuxfoundation.org -Cc: Linus Torvalds torvalds@linux-foundation.org -Cc: Andrew Morton akpm@linux-foundation.org -Cc: Markus Trippelsdorf markus@trippelsdorf.de -Cc: Michel Dänzer michel@daenzer.net -Signed-off-by: Josh Stone jistone@redhat.com -Signed-off-by: Jeremy Cline jcline@redhat.com ---- - Makefile | 4 ++++ - lib/Kconfig.debug | 18 +++++++++++++++++- - 2 files changed, 21 insertions(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 9ef547fc7ffe..5777d902f8f3 100644 ---- a/Makefile -+++ b/Makefile -@@ -735,7 +735,11 @@ KBUILD_CFLAGS += -fomit-frame-pointer - KBUILD_CFLAGS += -ftrivial-auto-var-init=pattern - endif - -+ifdef CONFIG_DEBUG_INFO_VTA -+DEBUG_CFLAGS += $(call cc-option, -fvar-tracking-assignments) -+else - DEBUG_CFLAGS := $(call cc-option, -fno-var-tracking-assignments) -+endif - - ifdef CONFIG_DEBUG_INFO - ifdef CONFIG_DEBUG_INFO_SPLIT -diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug -index 0d9e81779e37..424206212931 100644 ---- a/lib/Kconfig.debug -+++ b/lib/Kconfig.debug -@@ -217,7 +217,23 @@ config DEBUG_INFO_DWARF4 - Generate dwarf4 debug info. This requires recent versions - of gcc and gdb. It makes the debug information larger. - But it significantly improves the success of resolving -- variables in gdb on optimized code. -+ variables in gdb on optimized code. The gcc docs also -+ recommend enabling -fvar-tracking-assignments for maximum -+ benefit. (see DEBUG_INFO_VTA) -+ -+config DEBUG_INFO_VTA -+ bool "Enable var-tracking-assignments for debuginfo" -+ depends on DEBUG_INFO -+ help -+ Enable gcc -fvar-tracking-assignments for improved debug -+ information on variable locations in optimized code. Per -+ gcc, DEBUG_INFO_DWARF4 is recommended for best use of VTA. -+ -+ VTA has been implicated in codegen bugs (gcc PR61801, -+ PR61904), so this may deserve some caution. One can set -+ GCC_COMPARE_DEBUG=-fvar-tracking-assignments-toggle in the -+ environment to automatically compile everything both ways, -+ generating an error if anything differs. - - config DEBUG_INFO_BTF - bool "Generate BTF typeinfo" --- -2.20.1 - diff --git a/kernel.spec b/kernel.spec index e7e73d104..c91483f3d 100644 --- a/kernel.spec +++ b/kernel.spec @@ -495,8 +495,6 @@ Source5000: patch-5.%{base_sublevel}-git%{gitrev}.xz # Standalone patches # 100 - Generic long running patches
-Patch115: Kbuild-Add-an-option-to-enable-GCC-VTA.patch - Patch116: crash-driver.patch
Patch122: Input-synaptics-pin-3-touches-when-the-firmware-repo.patch
This has since been replaced by other in kernel pieces. We can finally drop it.
Signed-off-by: Laura Abbott labbott@redhat.com --- crash-driver.patch | 722 --------------------------------------------- kernel.spec | 2 - 2 files changed, 724 deletions(-) delete mode 100644 crash-driver.patch
diff --git a/crash-driver.patch b/crash-driver.patch deleted file mode 100644 index 164dc90f5..000000000 --- a/crash-driver.patch +++ /dev/null @@ -1,722 +0,0 @@ -From 973e23bf27b0b2e5021321357fc570cccea3104c Mon Sep 17 00:00:00 2001 -From: Dave Anderson anderson@redhat.com -Date: Tue, 26 Nov 2013 12:42:46 -0500 -Subject: [PATCH] crash-driver - -Bugzilla: N/A -Upstream-status: Fedora mustard ---- - arch/arm/include/asm/crash-driver.h | 6 ++ - arch/arm64/include/asm/crash-driver.h | 6 ++ - arch/ia64/include/asm/crash-driver.h | 90 ++++++++++++++++++++++ - arch/ia64/kernel/ia64_ksyms.c | 3 + - arch/powerpc/include/asm/crash-driver.h | 6 ++ - arch/s390/include/asm/crash-driver.h | 60 +++++++++++++++ - arch/s390/mm/maccess.c | 2 + - arch/x86/include/asm/crash-driver.h | 6 ++ - drivers/char/Kconfig | 3 + - drivers/char/Makefile | 2 + - drivers/char/crash.c | 128 ++++++++++++++++++++++++++++++++ - include/asm-generic/crash-driver.h | 72 ++++++++++++++++++ - 12 files changed, 384 insertions(+) - create mode 100644 arch/arm/include/asm/crash-driver.h - create mode 100644 arch/arm64/include/asm/crash-driver.h - create mode 100644 arch/ia64/include/asm/crash-driver.h - create mode 100644 arch/powerpc/include/asm/crash-driver.h - create mode 100644 arch/s390/include/asm/crash-driver.h - create mode 100644 arch/x86/include/asm/crash-driver.h - create mode 100644 drivers/char/crash.c - create mode 100644 include/asm-generic/crash-driver.h - -diff --git a/arch/arm/include/asm/crash-driver.h b/arch/arm/include/asm/crash-driver.h -new file mode 100644 -index 0000000..06e7ae9 ---- /dev/null -+++ b/arch/arm/include/asm/crash-driver.h -@@ -0,0 +1,6 @@ -+#ifndef _ARM_CRASH_H -+#define _ARM_CRASH_H -+ -+#include <asm-generic/crash-driver.h> -+ -+#endif /* _ARM_CRASH_H */ -diff --git a/arch/arm64/include/asm/crash-driver.h b/arch/arm64/include/asm/crash-driver.h -new file mode 100644 -index 0000000..43b26da ---- /dev/null -+++ b/arch/arm64/include/asm/crash-driver.h -@@ -0,0 +1,6 @@ -+#ifndef _ARM64_CRASH_H -+#define _ARM64_CRASH_H -+ -+#include <asm-generic/crash-driver.h> -+ -+#endif /* _ARM64_CRASH_H */ -diff --git a/arch/ia64/include/asm/crash-driver.h b/arch/ia64/include/asm/crash-driver.h -new file mode 100644 -index 0000000..404bcb9 ---- /dev/null -+++ b/arch/ia64/include/asm/crash-driver.h -@@ -0,0 +1,90 @@ -+#ifndef _ASM_IA64_CRASH_H -+#define _ASM_IA64_CRASH_H -+ -+/* -+ * linux/include/asm-ia64/crash-driver.h -+ * -+ * Copyright (c) 2004 Red Hat, Inc. All rights reserved. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2, or (at your option) -+ * any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ */ -+ -+#ifdef __KERNEL__ -+ -+#include <linux/efi.h> -+#include <linux/mm.h> -+#include <asm/mmzone.h> -+ -+static inline void * -+map_virtual(u64 offset, struct page **pp) -+{ -+ struct page *page; -+ unsigned long pfn; -+ u32 type; -+ -+ if (REGION_NUMBER(offset) == 5) { -+ char byte; -+ -+ if (__get_user(byte, (char *)offset) == 0) -+ return (void *)offset; -+ else -+ return NULL; -+ } -+ -+ switch (type = efi_mem_type(offset)) -+ { -+ case EFI_LOADER_CODE: -+ case EFI_LOADER_DATA: -+ case EFI_BOOT_SERVICES_CODE: -+ case EFI_BOOT_SERVICES_DATA: -+ case EFI_CONVENTIONAL_MEMORY: -+ break; -+ -+ default: -+ printk(KERN_INFO -+ "crash memory driver: invalid memory type for %lx: %d\n", -+ offset, type); -+ return NULL; -+ } -+ -+ pfn = offset >> PAGE_SHIFT; -+ -+ if (!pfn_valid(pfn)) { -+ printk(KERN_INFO -+ "crash memory driver: invalid pfn: %lx )\n", pfn); -+ return NULL; -+ } -+ -+ page = pfn_to_page(pfn); -+ -+ if (!page->virtual) { -+ printk(KERN_INFO -+ "crash memory driver: offset: %lx page: %lx page->virtual: NULL\n", -+ offset, (unsigned long)page); -+ return NULL; -+ } -+ -+ return (page->virtual + (offset & (PAGE_SIZE-1))); -+} -+ -+static inline void unmap_virtual(struct page *page) -+{ -+ return; -+} -+ -+#endif /* __KERNEL__ */ -+ -+#endif /* _ASM_IA64_CRASH_H */ -diff --git a/arch/ia64/kernel/ia64_ksyms.c b/arch/ia64/kernel/ia64_ksyms.c -index d111248..b14b4c6 100644 ---- a/arch/ia64/kernel/ia64_ksyms.c -+++ b/arch/ia64/kernel/ia64_ksyms.c -@@ -9,3 +9,6 @@ - EXPORT_SYMBOL(min_low_pfn); /* defined by bootmem.c, but not exported by generic code */ - EXPORT_SYMBOL(max_low_pfn); /* defined by bootmem.c, but not exported by generic code */ - #endif -+ -+#include <linux/efi.h> -+EXPORT_SYMBOL_GPL(efi_mem_type); -diff --git a/arch/powerpc/include/asm/crash-driver.h b/arch/powerpc/include/asm/crash-driver.h -new file mode 100644 -index 0000000..50092d9 ---- /dev/null -+++ b/arch/powerpc/include/asm/crash-driver.h -@@ -0,0 +1,6 @@ -+#ifndef _PPC64_CRASH_H -+#define _PPC64_CRASH_H -+ -+#include <asm-generic/crash-driver.h> -+ -+#endif /* _PPC64_CRASH_H */ -diff --git a/arch/s390/include/asm/crash-driver.h b/arch/s390/include/asm/crash-driver.h -new file mode 100644 -index 0000000..552be5e ---- /dev/null -+++ b/arch/s390/include/asm/crash-driver.h -@@ -0,0 +1,60 @@ -+#ifndef _S390_CRASH_H -+#define _S390_CRASH_H -+ -+#ifdef __KERNEL__ -+ -+#include <linux/mm.h> -+#include <linux/highmem.h> -+ -+/* -+ * For swapped prefix pages get bounce buffer using xlate_dev_mem_ptr() -+ */ -+static inline void *map_virtual(u64 offset, struct page **pp) -+{ -+ struct page *page; -+ unsigned long pfn; -+ void *vaddr; -+ -+ vaddr = xlate_dev_mem_ptr(offset); -+ pfn = ((unsigned long) vaddr) >> PAGE_SHIFT; -+ if ((unsigned long) vaddr != offset) -+ page = pfn_to_page(pfn); -+ else -+ page = NULL; -+ -+ if (!page_is_ram(pfn)) { -+ printk(KERN_INFO -+ "crash memory driver: !page_is_ram(pfn: %lx)\n", pfn); -+ return NULL; -+ } -+ -+ if (!pfn_valid(pfn)) { -+ printk(KERN_INFO -+ "crash memory driver: invalid pfn: %lx )\n", pfn); -+ return NULL; -+ } -+ -+ *pp = page; -+ return vaddr; -+} -+ -+/* -+ * Free bounce buffer if necessary -+ */ -+static inline void unmap_virtual(struct page *page) -+{ -+ void *vaddr; -+ -+ if (page) { -+ /* -+ * Because for bounce buffers vaddr will never be 0 -+ * unxlate_dev_mem_ptr() will always free the bounce buffer. -+ */ -+ vaddr = (void *)(page_to_pfn(page) << PAGE_SHIFT); -+ unxlate_dev_mem_ptr(0, vaddr); -+ } -+} -+ -+#endif /* __KERNEL__ */ -+ -+#endif /* _S390_CRASH_H */ -diff --git a/arch/s390/mm/maccess.c b/arch/s390/mm/maccess.c -index 792f9c6..3197995 100644 ---- a/arch/s390/mm/maccess.c -+++ b/arch/s390/mm/maccess.c -@@ -201,6 +201,7 @@ void *xlate_dev_mem_ptr(phys_addr_t addr) - put_online_cpus(); - return bounce; - } -+EXPORT_SYMBOL_GPL(xlate_dev_mem_ptr); - - /* - * Free converted buffer for /dev/mem access (if necessary) -@@ -210,3 +211,4 @@ void unxlate_dev_mem_ptr(phys_addr_t addr, void *buf) - if ((void *) addr != buf) - free_page((unsigned long) buf); - } -+EXPORT_SYMBOL_GPL(unxlate_dev_mem_ptr); -diff --git a/arch/x86/include/asm/crash-driver.h b/arch/x86/include/asm/crash-driver.h -new file mode 100644 -index 0000000..fd4736e ---- /dev/null -+++ b/arch/x86/include/asm/crash-driver.h -@@ -0,0 +1,6 @@ -+#ifndef _X86_CRASH_H -+#define _X86_CRASH_H -+ -+#include <asm-generic/crash-driver.h> -+ -+#endif /* _X86_CRASH_H */ -diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig -index dcc0973..99b99d5 100644 ---- a/drivers/char/Kconfig -+++ b/drivers/char/Kconfig -@@ -4,6 +4,9 @@ - - menu "Character devices" - -+config CRASH -+ tristate "Crash Utility memory driver" -+ - source "drivers/tty/Kconfig" - - config DEVMEM -diff --git a/drivers/char/Makefile b/drivers/char/Makefile -index 6e6c244..29cc9c8 100644 ---- a/drivers/char/Makefile -+++ b/drivers/char/Makefile -@@ -58,3 +58,5 @@ js-rtc-y = rtc.o - obj-$(CONFIG_XILLYBUS) += xillybus/ - obj-$(CONFIG_POWERNV_OP_PANEL) += powernv-op-panel.o - obj-$(CONFIG_ADI) += adi.o -+ -+obj-$(CONFIG_CRASH) += crash.o -diff --git a/drivers/char/crash.c b/drivers/char/crash.c -new file mode 100644 -index 0000000..085378a ---- /dev/null -+++ b/drivers/char/crash.c -@@ -0,0 +1,128 @@ -+/* -+ * linux/drivers/char/crash.c -+ * -+ * Copyright (C) 2004 Dave Anderson anderson@redhat.com -+ * Copyright (C) 2004 Red Hat, Inc. -+ */ -+ -+/****************************************************************************** -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2, or (at your option) -+ * any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ *****************************************************************************/ -+ -+#include <linux/module.h> -+#include <linux/types.h> -+#include <linux/miscdevice.h> -+#include <linux/init.h> -+#include <asm/io.h> -+#include <linux/uaccess.h> -+#include <asm/types.h> -+#include <asm/crash-driver.h> -+ -+#define CRASH_VERSION "1.0" -+ -+/* -+ * These are the file operation functions that allow crash utility -+ * access to physical memory. -+ */ -+ -+static loff_t -+crash_llseek(struct file * file, loff_t offset, int orig) -+{ -+ switch (orig) { -+ case 0: -+ file->f_pos = offset; -+ return file->f_pos; -+ case 1: -+ file->f_pos += offset; -+ return file->f_pos; -+ default: -+ return -EINVAL; -+ } -+} -+ -+/* -+ * Determine the page address for an address offset value, -+ * get a virtual address for it, and copy it out. -+ * Accesses must fit within a page. -+ */ -+static ssize_t -+crash_read(struct file *file, char *buf, size_t count, loff_t *poff) -+{ -+ void *vaddr; -+ struct page *page; -+ u64 offset; -+ ssize_t read; -+ -+ offset = *poff; -+ if (offset >> PAGE_SHIFT != (offset+count-1) >> PAGE_SHIFT) -+ return -EINVAL; -+ -+ vaddr = map_virtual(offset, &page); -+ if (!vaddr) -+ return -EFAULT; -+ -+ if (copy_to_user(buf, vaddr, count)) { -+ unmap_virtual(page); -+ return -EFAULT; -+ } -+ unmap_virtual(page); -+ -+ read = count; -+ *poff += read; -+ return read; -+} -+ -+static struct file_operations crash_fops = { -+ .owner = THIS_MODULE, -+ .llseek = crash_llseek, -+ .read = crash_read, -+}; -+ -+static struct miscdevice crash_dev = { -+ MISC_DYNAMIC_MINOR, -+ "crash", -+ &crash_fops -+}; -+ -+static int __init -+crash_init(void) -+{ -+ int ret; -+ -+ ret = misc_register(&crash_dev); -+ if (ret) { -+ printk(KERN_ERR -+ "crash memory driver: cannot misc_register (MISC_DYNAMIC_MINOR)\n"); -+ goto out; -+ } -+ -+ ret = 0; -+ printk(KERN_INFO "crash memory driver: version %s\n", CRASH_VERSION); -+out: -+ return ret; -+} -+ -+static void __exit -+crash_cleanup_module(void) -+{ -+ misc_deregister(&crash_dev); -+} -+ -+module_init(crash_init); -+module_exit(crash_cleanup_module); -+ -+MODULE_LICENSE("GPL"); -diff --git a/include/asm-generic/crash-driver.h b/include/asm-generic/crash-driver.h -new file mode 100644 -index 0000000..25ab986 ---- /dev/null -+++ b/include/asm-generic/crash-driver.h -@@ -0,0 +1,72 @@ -+#ifndef __CRASH_H__ -+#define __CRASH_H__ -+ -+/* -+ * include/linux/crash-driver.h -+ * -+ * Copyright (c) 2013 Red Hat, Inc. All rights reserved. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2, or (at your option) -+ * any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ */ -+ -+#ifdef __KERNEL__ -+ -+#include <linux/mm.h> -+#include <linux/highmem.h> -+ -+static inline void * -+map_virtual(u64 offset, struct page **pp) -+{ -+ struct page *page; -+ unsigned long pfn; -+ void *vaddr; -+ -+ pfn = (unsigned long)(offset >> PAGE_SHIFT); -+ -+ if (!page_is_ram(pfn)) { -+ printk(KERN_INFO -+ "crash memory driver: !page_is_ram(pfn: %lx)\n", pfn); -+ return NULL; -+ } -+ -+ if (!pfn_valid(pfn)) { -+ printk(KERN_INFO -+ "crash memory driver: invalid pfn: %lx )\n", pfn); -+ return NULL; -+ } -+ -+ page = pfn_to_page(pfn); -+ -+ vaddr = kmap(page); -+ if (!vaddr) { -+ printk(KERN_INFO -+ "crash memory driver: pfn: %lx kmap(page: %lx) failed\n", -+ pfn, (unsigned long)page); -+ return NULL; -+ } -+ -+ *pp = page; -+ return (vaddr + (offset & (PAGE_SIZE-1))); -+} -+ -+static inline void unmap_virtual(struct page *page) -+{ -+ kunmap(page); -+} -+ -+#endif /* __KERNEL__ */ -+ -+#endif /* __CRASH_H__ */ --- -2.7.4 - -From 23d8bd48303acda2d3a95a3e1a662784a4fa9fcd Mon Sep 17 00:00:00 2001 -From: Fedora Kernel Team kernel-team@fedoraproject.org -Date: Tue, 20 Sep 2016 19:39:46 +0200 -Subject: [PATCH] Update of crash driver to handle CONFIG_HARDENED_USERCOPY and - to restrict the supported architectures. - ---- - drivers/char/Kconfig | 1 + - drivers/char/crash.c | 33 ++++++++++++++++++++++++++++++--- - 2 files changed, 31 insertions(+), 3 deletions(-) - -diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig -index 99b99d5..be6a3ae 100644 ---- a/drivers/char/Kconfig -+++ b/drivers/char/Kconfig -@@ -6,6 +6,7 @@ menu "Character devices" - - config CRASH - tristate "Crash Utility memory driver" -+ depends on X86_32 || X86_64 || ARM || ARM64 || PPC64 || S390 - - source "drivers/tty/Kconfig" - -diff --git a/drivers/char/crash.c b/drivers/char/crash.c -index 085378a..0258bf8 100644 ---- a/drivers/char/crash.c -+++ b/drivers/char/crash.c -@@ -32,7 +32,7 @@ - #include <asm/types.h> - #include <asm/crash-driver.h> - --#define CRASH_VERSION "1.0" -+#define CRASH_VERSION "1.2" - - /* - * These are the file operation functions that allow crash utility -@@ -66,6 +66,7 @@ crash_read(struct file *file, char *buf, size_t count, loff_t *poff) - struct page *page; - u64 offset; - ssize_t read; -+ char *buffer = file->private_data; - - offset = *poff; - if (offset >> PAGE_SHIFT != (offset+count-1) >> PAGE_SHIFT) -@@ -74,8 +75,12 @@ crash_read(struct file *file, char *buf, size_t count, loff_t *poff) - vaddr = map_virtual(offset, &page); - if (!vaddr) - return -EFAULT; -- -- if (copy_to_user(buf, vaddr, count)) { -+ /* -+ * Use bounce buffer to bypass the CONFIG_HARDENED_USERCOPY -+ * kernel text restriction. -+ */ -+ memcpy(buffer, (char *)vaddr, count); -+ if (copy_to_user(buf, buffer, count)) { - unmap_virtual(page); - return -EFAULT; - } -@@ -86,10 +91,32 @@ crash_read(struct file *file, char *buf, size_t count, loff_t *poff) - return read; - } - -+static int -+crash_open(struct inode * inode, struct file * filp) -+{ -+ if (!capable(CAP_SYS_RAWIO)) -+ return -EPERM; -+ -+ filp->private_data = (void *)__get_free_page(GFP_KERNEL); -+ if (!filp->private_data) -+ return -ENOMEM; -+ -+ return 0; -+} -+ -+static int -+crash_release(struct inode *inode, struct file *filp) -+{ -+ free_pages((unsigned long)filp->private_data, 0); -+ return 0; -+} -+ - static struct file_operations crash_fops = { - .owner = THIS_MODULE, - .llseek = crash_llseek, - .read = crash_read, -+ .open = crash_open, -+ .release = crash_release, - }; - - static struct miscdevice crash_dev = { --- -2.7.4 - -From: Dave Anderson anderson@redhat.com -Date: Fri, 18 Nov 2016 11:52:35 -0500 -Cc: onestero@redhat.com -Subject: [PATCH v2] Restore live system crash analysis for ARM64 - -This v2 version simplifies the copy out of the kimage_voffset value -to user-space per Oleg's suggestion. - -Upstream status: N/A - -Test: v2 version tested successfully with a modified crash utility - -The following Linux 4.6 commit breaks support for live system -crash analysis on ARM64: - - commit a7f8de168ace487fa7b88cb154e413cf40e87fc6 - Author: Ard Biesheuvel ard.biesheuvel@linaro.org - arm64: allow kernel Image to be loaded anywhere in physical memory - -The patchset drastically modified the kernel's virtual memory layout, -where notably the static kernel text and data image was moved from the -unity mapped region into the vmalloc region. Prior to Linux 4.6, -the kernel's __virt_to_phys() function was this: - - #define __virt_to_phys(x) (((phys_addr_t)(x) - PAGE_OFFSET + PHYS_OFFSET)) - -When running on a live system, the crash utility could determine PAGE_OFFSET -by looking at the virtual addresses compiled into the vmlinux file, and -PHYS_OFFSET can be determined by looking at /proc/iomem. - -As of Linux 4.6, it is done differently: - - #define __virt_to_phys(x) ({ \ - phys_addr_t __x = (phys_addr_t)(x); \ - __x & BIT(VA_BITS - 1) ? (__x & ~PAGE_OFFSET) + PHYS_OFFSET : \ - (__x - kimage_voffset); }) - -The PAGE_OFFSET/PHYS_OFFSET section of the conditional expression is for -traditional unity-mapped virtual addresses, but kernel text and static -data requires the new "kimage_voffset" variable. Unfortunately, the -contents of the new "kimage_voffset" variable is not available or -calculatable from a user-space perspective, even with root privileges. - -At least the ARM64 developers made its contents available to modules -with an EXPORT_SYMBOL(kimage_voffset) declaration. Accordingly, with -a modification to the /dev/crash driver to return its contents, the -crash utility can run on a live system. - -The patch allows for architecture-specific DEV_CRASH_ARCH_DATA ioctls -to be created, where this is the first instance of one. - - ---- - arch/arm64/include/asm/crash-driver.h | 16 ++++++++++++++++ - drivers/char/crash.c | 13 ++++++++++++- - 2 files changed, 28 insertions(+), 1 deletion(-) - -diff --git a/arch/arm64/include/asm/crash-driver.h b/arch/arm64/include/asm/crash-driver.h -index 43b26da..fe68e7c 100644 ---- a/arch/arm64/include/asm/crash-driver.h -+++ b/arch/arm64/include/asm/crash-driver.h -@@ -3,4 +3,20 @@ - - #include <asm-generic/crash-driver.h> - -+#define DEV_CRASH_ARCH_DATA _IOR('c', 1, long) -+ -+static long -+crash_arch_ioctl(struct file *file, unsigned int cmd, unsigned long arg) -+{ -+ extern u64 kimage_voffset; -+ -+ switch (cmd) -+ { -+ case DEV_CRASH_ARCH_DATA: -+ return put_user(kimage_voffset, (unsigned long __user *)arg); -+ default: -+ return -EINVAL; -+ } -+} -+ - #endif /* _ARM64_CRASH_H */ -diff --git a/drivers/char/crash.c b/drivers/char/crash.c -index 0258bf8..dfb767c 100644 ---- a/drivers/char/crash.c -+++ b/drivers/char/crash.c -@@ -32,7 +32,7 @@ - #include <asm/types.h> - #include <asm/crash-driver.h> - --#define CRASH_VERSION "1.2" -+#define CRASH_VERSION "1.3" - - /* - * These are the file operation functions that allow crash utility -@@ -111,10 +111,21 @@ crash_release(struct inode *inode, struct file *filp) - return 0; - } - -+static long -+crash_ioctl(struct file *file, unsigned int cmd, unsigned long arg) -+{ -+#ifdef DEV_CRASH_ARCH_DATA -+ return crash_arch_ioctl(file, cmd, arg); -+#else -+ return -EINVAL; -+#endif -+} -+ - static struct file_operations crash_fops = { - .owner = THIS_MODULE, - .llseek = crash_llseek, - .read = crash_read, -+ .unlocked_ioctl = crash_ioctl, - .open = crash_open, - .release = crash_release, - }; --- -1.8.3.1 - diff --git a/kernel.spec b/kernel.spec index c91483f3d..bac38d91d 100644 --- a/kernel.spec +++ b/kernel.spec @@ -495,8 +495,6 @@ Source5000: patch-5.%{base_sublevel}-git%{gitrev}.xz # Standalone patches # 100 - Generic long running patches
-Patch116: crash-driver.patch - Patch122: Input-synaptics-pin-3-touches-when-the-firmware-repo.patch
# This no longer applies, let's see if it needs to be updated
On Thu, Aug 15, 2019 at 4:02 PM Laura Abbott labbott@redhat.com wrote:
This has since been replaced by other in kernel pieces. We can finally drop it.
Which pieces?
josh
Signed-off-by: Laura Abbott labbott@redhat.com
crash-driver.patch | 722 --------------------------------------------- kernel.spec | 2 - 2 files changed, 724 deletions(-) delete mode 100644 crash-driver.patch
diff --git a/crash-driver.patch b/crash-driver.patch deleted file mode 100644 index 164dc90f5..000000000 --- a/crash-driver.patch +++ /dev/null @@ -1,722 +0,0 @@ -From 973e23bf27b0b2e5021321357fc570cccea3104c Mon Sep 17 00:00:00 2001 -From: Dave Anderson anderson@redhat.com -Date: Tue, 26 Nov 2013 12:42:46 -0500 -Subject: [PATCH] crash-driver
-Bugzilla: N/A
-Upstream-status: Fedora mustard
- arch/arm/include/asm/crash-driver.h | 6 ++
- arch/arm64/include/asm/crash-driver.h | 6 ++
- arch/ia64/include/asm/crash-driver.h | 90 ++++++++++++++++++++++
- arch/ia64/kernel/ia64_ksyms.c | 3 +
- arch/powerpc/include/asm/crash-driver.h | 6 ++
- arch/s390/include/asm/crash-driver.h | 60 +++++++++++++++
- arch/s390/mm/maccess.c | 2 +
- arch/x86/include/asm/crash-driver.h | 6 ++
- drivers/char/Kconfig | 3 +
- drivers/char/Makefile | 2 +
- drivers/char/crash.c | 128 ++++++++++++++++++++++++++++++++
- include/asm-generic/crash-driver.h | 72 ++++++++++++++++++
- 12 files changed, 384 insertions(+)
- create mode 100644 arch/arm/include/asm/crash-driver.h
- create mode 100644 arch/arm64/include/asm/crash-driver.h
- create mode 100644 arch/ia64/include/asm/crash-driver.h
- create mode 100644 arch/powerpc/include/asm/crash-driver.h
- create mode 100644 arch/s390/include/asm/crash-driver.h
- create mode 100644 arch/x86/include/asm/crash-driver.h
- create mode 100644 drivers/char/crash.c
- create mode 100644 include/asm-generic/crash-driver.h
-diff --git a/arch/arm/include/asm/crash-driver.h b/arch/arm/include/asm/crash-driver.h -new file mode 100644 -index 0000000..06e7ae9 ---- /dev/null -+++ b/arch/arm/include/asm/crash-driver.h -@@ -0,0 +1,6 @@ -+#ifndef _ARM_CRASH_H -+#define _ARM_CRASH_H -+ -+#include <asm-generic/crash-driver.h> -+ -+#endif /* _ARM_CRASH_H */ -diff --git a/arch/arm64/include/asm/crash-driver.h b/arch/arm64/include/asm/crash-driver.h -new file mode 100644 -index 0000000..43b26da ---- /dev/null -+++ b/arch/arm64/include/asm/crash-driver.h -@@ -0,0 +1,6 @@ -+#ifndef _ARM64_CRASH_H -+#define _ARM64_CRASH_H -+ -+#include <asm-generic/crash-driver.h> -+ -+#endif /* _ARM64_CRASH_H */ -diff --git a/arch/ia64/include/asm/crash-driver.h b/arch/ia64/include/asm/crash-driver.h -new file mode 100644 -index 0000000..404bcb9 ---- /dev/null -+++ b/arch/ia64/include/asm/crash-driver.h -@@ -0,0 +1,90 @@ -+#ifndef _ASM_IA64_CRASH_H -+#define _ASM_IA64_CRASH_H -+ -+/* -+ * linux/include/asm-ia64/crash-driver.h -+ * -+ * Copyright (c) 2004 Red Hat, Inc. All rights reserved. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2, or (at your option) -+ * any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ */ -+ -+#ifdef __KERNEL__ -+ -+#include <linux/efi.h> -+#include <linux/mm.h> -+#include <asm/mmzone.h> -+ -+static inline void * -+map_virtual(u64 offset, struct page **pp) -+{ -+ struct page *page; -+ unsigned long pfn; -+ u32 type; -+ -+ if (REGION_NUMBER(offset) == 5) { -+ char byte; -+ -+ if (__get_user(byte, (char *)offset) == 0) -+ return (void *)offset; -+ else -+ return NULL; -+ } -+ -+ switch (type = efi_mem_type(offset)) -+ { -+ case EFI_LOADER_CODE: -+ case EFI_LOADER_DATA: -+ case EFI_BOOT_SERVICES_CODE: -+ case EFI_BOOT_SERVICES_DATA: -+ case EFI_CONVENTIONAL_MEMORY: -+ break; -+ -+ default: -+ printk(KERN_INFO -+ "crash memory driver: invalid memory type for %lx: %d\n", -+ offset, type); -+ return NULL; -+ } -+ -+ pfn = offset >> PAGE_SHIFT; -+ -+ if (!pfn_valid(pfn)) { -+ printk(KERN_INFO -+ "crash memory driver: invalid pfn: %lx )\n", pfn); -+ return NULL; -+ } -+ -+ page = pfn_to_page(pfn); -+ -+ if (!page->virtual) { -+ printk(KERN_INFO -+ "crash memory driver: offset: %lx page: %lx page->virtual: NULL\n", -+ offset, (unsigned long)page); -+ return NULL; -+ } -+ -+ return (page->virtual + (offset & (PAGE_SIZE-1))); -+} -+ -+static inline void unmap_virtual(struct page *page) -+{ -+ return; -+} -+ -+#endif /* __KERNEL__ */ -+ -+#endif /* _ASM_IA64_CRASH_H */ -diff --git a/arch/ia64/kernel/ia64_ksyms.c b/arch/ia64/kernel/ia64_ksyms.c -index d111248..b14b4c6 100644 ---- a/arch/ia64/kernel/ia64_ksyms.c -+++ b/arch/ia64/kernel/ia64_ksyms.c -@@ -9,3 +9,6 @@
- EXPORT_SYMBOL(min_low_pfn); /* defined by bootmem.c, but not exported by generic code */
- EXPORT_SYMBOL(max_low_pfn); /* defined by bootmem.c, but not exported by generic code */
- #endif
-+ -+#include <linux/efi.h> -+EXPORT_SYMBOL_GPL(efi_mem_type); -diff --git a/arch/powerpc/include/asm/crash-driver.h b/arch/powerpc/include/asm/crash-driver.h -new file mode 100644 -index 0000000..50092d9 ---- /dev/null -+++ b/arch/powerpc/include/asm/crash-driver.h -@@ -0,0 +1,6 @@ -+#ifndef _PPC64_CRASH_H -+#define _PPC64_CRASH_H -+ -+#include <asm-generic/crash-driver.h> -+ -+#endif /* _PPC64_CRASH_H */ -diff --git a/arch/s390/include/asm/crash-driver.h b/arch/s390/include/asm/crash-driver.h -new file mode 100644 -index 0000000..552be5e ---- /dev/null -+++ b/arch/s390/include/asm/crash-driver.h -@@ -0,0 +1,60 @@ -+#ifndef _S390_CRASH_H -+#define _S390_CRASH_H -+ -+#ifdef __KERNEL__ -+ -+#include <linux/mm.h> -+#include <linux/highmem.h> -+ -+/* -+ * For swapped prefix pages get bounce buffer using xlate_dev_mem_ptr() -+ */ -+static inline void *map_virtual(u64 offset, struct page **pp) -+{ -+ struct page *page; -+ unsigned long pfn; -+ void *vaddr; -+ -+ vaddr = xlate_dev_mem_ptr(offset); -+ pfn = ((unsigned long) vaddr) >> PAGE_SHIFT; -+ if ((unsigned long) vaddr != offset) -+ page = pfn_to_page(pfn); -+ else -+ page = NULL; -+ -+ if (!page_is_ram(pfn)) { -+ printk(KERN_INFO -+ "crash memory driver: !page_is_ram(pfn: %lx)\n", pfn); -+ return NULL; -+ } -+ -+ if (!pfn_valid(pfn)) { -+ printk(KERN_INFO -+ "crash memory driver: invalid pfn: %lx )\n", pfn); -+ return NULL; -+ } -+ -+ *pp = page; -+ return vaddr; -+} -+ -+/* -+ * Free bounce buffer if necessary -+ */ -+static inline void unmap_virtual(struct page *page) -+{ -+ void *vaddr; -+ -+ if (page) { -+ /* -+ * Because for bounce buffers vaddr will never be 0 -+ * unxlate_dev_mem_ptr() will always free the bounce buffer. -+ */ -+ vaddr = (void *)(page_to_pfn(page) << PAGE_SHIFT); -+ unxlate_dev_mem_ptr(0, vaddr); -+ } -+} -+ -+#endif /* __KERNEL__ */ -+ -+#endif /* _S390_CRASH_H */ -diff --git a/arch/s390/mm/maccess.c b/arch/s390/mm/maccess.c -index 792f9c6..3197995 100644 ---- a/arch/s390/mm/maccess.c -+++ b/arch/s390/mm/maccess.c -@@ -201,6 +201,7 @@ void *xlate_dev_mem_ptr(phys_addr_t addr)
put_online_cpus();
return bounce;
- }
-+EXPORT_SYMBOL_GPL(xlate_dev_mem_ptr);
- /*
- Free converted buffer for /dev/mem access (if necessary)
-@@ -210,3 +211,4 @@ void unxlate_dev_mem_ptr(phys_addr_t addr, void *buf)
if ((void *) addr != buf)
free_page((unsigned long) buf);
- }
-+EXPORT_SYMBOL_GPL(unxlate_dev_mem_ptr); -diff --git a/arch/x86/include/asm/crash-driver.h b/arch/x86/include/asm/crash-driver.h -new file mode 100644 -index 0000000..fd4736e ---- /dev/null -+++ b/arch/x86/include/asm/crash-driver.h -@@ -0,0 +1,6 @@ -+#ifndef _X86_CRASH_H -+#define _X86_CRASH_H -+ -+#include <asm-generic/crash-driver.h> -+ -+#endif /* _X86_CRASH_H */ -diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig -index dcc0973..99b99d5 100644 ---- a/drivers/char/Kconfig -+++ b/drivers/char/Kconfig -@@ -4,6 +4,9 @@
- menu "Character devices"
-+config CRASH -+ tristate "Crash Utility memory driver" -+
- source "drivers/tty/Kconfig"
- config DEVMEM
-diff --git a/drivers/char/Makefile b/drivers/char/Makefile -index 6e6c244..29cc9c8 100644 ---- a/drivers/char/Makefile -+++ b/drivers/char/Makefile -@@ -58,3 +58,5 @@ js-rtc-y = rtc.o
- obj-$(CONFIG_XILLYBUS) += xillybus/
- obj-$(CONFIG_POWERNV_OP_PANEL) += powernv-op-panel.o
- obj-$(CONFIG_ADI) += adi.o
-+ -+obj-$(CONFIG_CRASH) += crash.o -diff --git a/drivers/char/crash.c b/drivers/char/crash.c -new file mode 100644 -index 0000000..085378a ---- /dev/null -+++ b/drivers/char/crash.c -@@ -0,0 +1,128 @@ -+/* -+ * linux/drivers/char/crash.c -+ * -+ * Copyright (C) 2004 Dave Anderson anderson@redhat.com -+ * Copyright (C) 2004 Red Hat, Inc. -+ */ -+ -+/****************************************************************************** -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2, or (at your option) -+ * any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ *****************************************************************************/ -+ -+#include <linux/module.h> -+#include <linux/types.h> -+#include <linux/miscdevice.h> -+#include <linux/init.h> -+#include <asm/io.h> -+#include <linux/uaccess.h> -+#include <asm/types.h> -+#include <asm/crash-driver.h> -+ -+#define CRASH_VERSION "1.0" -+ -+/* -+ * These are the file operation functions that allow crash utility -+ * access to physical memory. -+ */ -+ -+static loff_t -+crash_llseek(struct file * file, loff_t offset, int orig) -+{ -+ switch (orig) { -+ case 0: -+ file->f_pos = offset; -+ return file->f_pos; -+ case 1: -+ file->f_pos += offset; -+ return file->f_pos; -+ default: -+ return -EINVAL; -+ } -+} -+ -+/* -+ * Determine the page address for an address offset value, -+ * get a virtual address for it, and copy it out. -+ * Accesses must fit within a page. -+ */ -+static ssize_t -+crash_read(struct file *file, char *buf, size_t count, loff_t *poff) -+{ -+ void *vaddr; -+ struct page *page; -+ u64 offset; -+ ssize_t read; -+ -+ offset = *poff; -+ if (offset >> PAGE_SHIFT != (offset+count-1) >> PAGE_SHIFT) -+ return -EINVAL; -+ -+ vaddr = map_virtual(offset, &page); -+ if (!vaddr) -+ return -EFAULT; -+ -+ if (copy_to_user(buf, vaddr, count)) { -+ unmap_virtual(page); -+ return -EFAULT; -+ } -+ unmap_virtual(page); -+ -+ read = count; -+ *poff += read; -+ return read; -+} -+ -+static struct file_operations crash_fops = { -+ .owner = THIS_MODULE, -+ .llseek = crash_llseek, -+ .read = crash_read, -+}; -+ -+static struct miscdevice crash_dev = { -+ MISC_DYNAMIC_MINOR, -+ "crash", -+ &crash_fops -+}; -+ -+static int __init -+crash_init(void) -+{ -+ int ret; -+ -+ ret = misc_register(&crash_dev); -+ if (ret) { -+ printk(KERN_ERR -+ "crash memory driver: cannot misc_register (MISC_DYNAMIC_MINOR)\n"); -+ goto out; -+ } -+ -+ ret = 0; -+ printk(KERN_INFO "crash memory driver: version %s\n", CRASH_VERSION); -+out: -+ return ret; -+} -+ -+static void __exit -+crash_cleanup_module(void) -+{ -+ misc_deregister(&crash_dev); -+} -+ -+module_init(crash_init); -+module_exit(crash_cleanup_module); -+ -+MODULE_LICENSE("GPL"); -diff --git a/include/asm-generic/crash-driver.h b/include/asm-generic/crash-driver.h -new file mode 100644 -index 0000000..25ab986 ---- /dev/null -+++ b/include/asm-generic/crash-driver.h -@@ -0,0 +1,72 @@ -+#ifndef __CRASH_H__ -+#define __CRASH_H__ -+ -+/* -+ * include/linux/crash-driver.h -+ * -+ * Copyright (c) 2013 Red Hat, Inc. All rights reserved. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2, or (at your option) -+ * any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ */ -+ -+#ifdef __KERNEL__ -+ -+#include <linux/mm.h> -+#include <linux/highmem.h> -+ -+static inline void * -+map_virtual(u64 offset, struct page **pp) -+{ -+ struct page *page; -+ unsigned long pfn; -+ void *vaddr; -+ -+ pfn = (unsigned long)(offset >> PAGE_SHIFT); -+ -+ if (!page_is_ram(pfn)) { -+ printk(KERN_INFO -+ "crash memory driver: !page_is_ram(pfn: %lx)\n", pfn); -+ return NULL; -+ } -+ -+ if (!pfn_valid(pfn)) { -+ printk(KERN_INFO -+ "crash memory driver: invalid pfn: %lx )\n", pfn); -+ return NULL; -+ } -+ -+ page = pfn_to_page(pfn); -+ -+ vaddr = kmap(page); -+ if (!vaddr) { -+ printk(KERN_INFO -+ "crash memory driver: pfn: %lx kmap(page: %lx) failed\n", -+ pfn, (unsigned long)page); -+ return NULL; -+ } -+ -+ *pp = page; -+ return (vaddr + (offset & (PAGE_SIZE-1))); -+} -+ -+static inline void unmap_virtual(struct page *page) -+{ -+ kunmap(page); -+} -+ -+#endif /* __KERNEL__ */ -+
-+#endif /* __CRASH_H__ */
-2.7.4
-From 23d8bd48303acda2d3a95a3e1a662784a4fa9fcd Mon Sep 17 00:00:00 2001 -From: Fedora Kernel Team kernel-team@fedoraproject.org -Date: Tue, 20 Sep 2016 19:39:46 +0200 -Subject: [PATCH] Update of crash driver to handle CONFIG_HARDENED_USERCOPY and
- to restrict the supported architectures.
- drivers/char/Kconfig | 1 +
- drivers/char/crash.c | 33 ++++++++++++++++++++++++++++++---
- 2 files changed, 31 insertions(+), 3 deletions(-)
-diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig -index 99b99d5..be6a3ae 100644 ---- a/drivers/char/Kconfig -+++ b/drivers/char/Kconfig -@@ -6,6 +6,7 @@ menu "Character devices"
- config CRASH
tristate "Crash Utility memory driver"
-+ depends on X86_32 || X86_64 || ARM || ARM64 || PPC64 || S390
- source "drivers/tty/Kconfig"
-diff --git a/drivers/char/crash.c b/drivers/char/crash.c -index 085378a..0258bf8 100644 ---- a/drivers/char/crash.c -+++ b/drivers/char/crash.c -@@ -32,7 +32,7 @@
- #include <asm/types.h>
- #include <asm/crash-driver.h>
--#define CRASH_VERSION "1.0" -+#define CRASH_VERSION "1.2"
- /*
- These are the file operation functions that allow crash utility
-@@ -66,6 +66,7 @@ crash_read(struct file *file, char *buf, size_t count, loff_t *poff)
struct page *page;
u64 offset;
ssize_t read;
-+ char *buffer = file->private_data;
offset = *poff;
if (offset >> PAGE_SHIFT != (offset+count-1) >> PAGE_SHIFT)
-@@ -74,8 +75,12 @@ crash_read(struct file *file, char *buf, size_t count, loff_t *poff)
vaddr = map_virtual(offset, &page);
if (!vaddr)
return -EFAULT;
-- -- if (copy_to_user(buf, vaddr, count)) { -+ /* -+ * Use bounce buffer to bypass the CONFIG_HARDENED_USERCOPY -+ * kernel text restriction. -+ */ -+ memcpy(buffer, (char *)vaddr, count); -+ if (copy_to_user(buf, buffer, count)) {
unmap_virtual(page);
return -EFAULT;
}
-@@ -86,10 +91,32 @@ crash_read(struct file *file, char *buf, size_t count, loff_t *poff)
return read;
- }
-+static int -+crash_open(struct inode * inode, struct file * filp) -+{ -+ if (!capable(CAP_SYS_RAWIO)) -+ return -EPERM; -+ -+ filp->private_data = (void *)__get_free_page(GFP_KERNEL); -+ if (!filp->private_data) -+ return -ENOMEM; -+ -+ return 0; -+} -+ -+static int -+crash_release(struct inode *inode, struct file *filp) -+{ -+ free_pages((unsigned long)filp->private_data, 0); -+ return 0; -+} -+
- static struct file_operations crash_fops = {
.owner = THIS_MODULE,
.llseek = crash_llseek,
.read = crash_read,
-+ .open = crash_open, -+ .release = crash_release,
- };
- static struct miscdevice crash_dev = {
-2.7.4
-From: Dave Anderson anderson@redhat.com -Date: Fri, 18 Nov 2016 11:52:35 -0500 -Cc: onestero@redhat.com -Subject: [PATCH v2] Restore live system crash analysis for ARM64
-This v2 version simplifies the copy out of the kimage_voffset value -to user-space per Oleg's suggestion.
-Upstream status: N/A
-Test: v2 version tested successfully with a modified crash utility
-The following Linux 4.6 commit breaks support for live system -crash analysis on ARM64:
- commit a7f8de168ace487fa7b88cb154e413cf40e87fc6
- Author: Ard Biesheuvel ard.biesheuvel@linaro.org
- arm64: allow kernel Image to be loaded anywhere in physical memory
-The patchset drastically modified the kernel's virtual memory layout, -where notably the static kernel text and data image was moved from the -unity mapped region into the vmalloc region. Prior to Linux 4.6, -the kernel's __virt_to_phys() function was this:
- #define __virt_to_phys(x) (((phys_addr_t)(x) - PAGE_OFFSET + PHYS_OFFSET))
-When running on a live system, the crash utility could determine PAGE_OFFSET -by looking at the virtual addresses compiled into the vmlinux file, and -PHYS_OFFSET can be determined by looking at /proc/iomem.
-As of Linux 4.6, it is done differently:
- #define __virt_to_phys(x) ({ \
phys_addr_t __x = (phys_addr_t)(x); \
__x & BIT(VA_BITS - 1) ? (__x & ~PAGE_OFFSET) + PHYS_OFFSET : \
(__x - kimage_voffset); })
-The PAGE_OFFSET/PHYS_OFFSET section of the conditional expression is for -traditional unity-mapped virtual addresses, but kernel text and static -data requires the new "kimage_voffset" variable. Unfortunately, the -contents of the new "kimage_voffset" variable is not available or -calculatable from a user-space perspective, even with root privileges.
-At least the ARM64 developers made its contents available to modules -with an EXPORT_SYMBOL(kimage_voffset) declaration. Accordingly, with -a modification to the /dev/crash driver to return its contents, the -crash utility can run on a live system.
-The patch allows for architecture-specific DEV_CRASH_ARCH_DATA ioctls -to be created, where this is the first instance of one.
- arch/arm64/include/asm/crash-driver.h | 16 ++++++++++++++++
- drivers/char/crash.c | 13 ++++++++++++-
- 2 files changed, 28 insertions(+), 1 deletion(-)
-diff --git a/arch/arm64/include/asm/crash-driver.h b/arch/arm64/include/asm/crash-driver.h -index 43b26da..fe68e7c 100644 ---- a/arch/arm64/include/asm/crash-driver.h -+++ b/arch/arm64/include/asm/crash-driver.h -@@ -3,4 +3,20 @@
- #include <asm-generic/crash-driver.h>
-+#define DEV_CRASH_ARCH_DATA _IOR('c', 1, long) -+ -+static long -+crash_arch_ioctl(struct file *file, unsigned int cmd, unsigned long arg) -+{ -+ extern u64 kimage_voffset; -+ -+ switch (cmd) -+ { -+ case DEV_CRASH_ARCH_DATA: -+ return put_user(kimage_voffset, (unsigned long __user *)arg); -+ default: -+ return -EINVAL; -+ } -+} -+
- #endif /* _ARM64_CRASH_H */
-diff --git a/drivers/char/crash.c b/drivers/char/crash.c -index 0258bf8..dfb767c 100644 ---- a/drivers/char/crash.c -+++ b/drivers/char/crash.c -@@ -32,7 +32,7 @@
- #include <asm/types.h>
- #include <asm/crash-driver.h>
--#define CRASH_VERSION "1.2" -+#define CRASH_VERSION "1.3"
- /*
- These are the file operation functions that allow crash utility
-@@ -111,10 +111,21 @@ crash_release(struct inode *inode, struct file *filp)
return 0;
- }
-+static long -+crash_ioctl(struct file *file, unsigned int cmd, unsigned long arg) -+{ -+#ifdef DEV_CRASH_ARCH_DATA -+ return crash_arch_ioctl(file, cmd, arg); -+#else -+ return -EINVAL; -+#endif -+} -+
- static struct file_operations crash_fops = {
.owner = THIS_MODULE,
.llseek = crash_llseek,
.read = crash_read,
-+ .unlocked_ioctl = crash_ioctl,
.open = crash_open,
.release = crash_release,
- };
-1.8.3.1
diff --git a/kernel.spec b/kernel.spec index c91483f3d..bac38d91d 100644 --- a/kernel.spec +++ b/kernel.spec @@ -495,8 +495,6 @@ Source5000: patch-5.%{base_sublevel}-git%{gitrev}.xz # Standalone patches # 100 - Generic long running patches
-Patch116: crash-driver.patch
Patch122: Input-synaptics-pin-3-touches-when-the-firmware-repo.patch
# This no longer applies, let's see if it needs to be updated
2.21.0 _______________________________________________ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
On 8/16/19 6:56 AM, Josh Boyer wrote:
On Thu, Aug 15, 2019 at 4:02 PM Laura Abbott labbott@redhat.com wrote:
This has since been replaced by other in kernel pieces. We can finally drop it.
Which pieces?
/proc/kcore now does most of the work of the crash driver. I've helped fix up misc pieces in the past (c.f. 3955333df9a5 ("proc/kcore: don't bounds check against address 0")
josh
Signed-off-by: Laura Abbott labbott@redhat.com
crash-driver.patch | 722 --------------------------------------------- kernel.spec | 2 - 2 files changed, 724 deletions(-) delete mode 100644 crash-driver.patch
diff --git a/crash-driver.patch b/crash-driver.patch deleted file mode 100644 index 164dc90f5..000000000 --- a/crash-driver.patch +++ /dev/null @@ -1,722 +0,0 @@ -From 973e23bf27b0b2e5021321357fc570cccea3104c Mon Sep 17 00:00:00 2001 -From: Dave Anderson anderson@redhat.com -Date: Tue, 26 Nov 2013 12:42:46 -0500 -Subject: [PATCH] crash-driver
-Bugzilla: N/A
-Upstream-status: Fedora mustard
- arch/arm/include/asm/crash-driver.h | 6 ++
- arch/arm64/include/asm/crash-driver.h | 6 ++
- arch/ia64/include/asm/crash-driver.h | 90 ++++++++++++++++++++++
- arch/ia64/kernel/ia64_ksyms.c | 3 +
- arch/powerpc/include/asm/crash-driver.h | 6 ++
- arch/s390/include/asm/crash-driver.h | 60 +++++++++++++++
- arch/s390/mm/maccess.c | 2 +
- arch/x86/include/asm/crash-driver.h | 6 ++
- drivers/char/Kconfig | 3 +
- drivers/char/Makefile | 2 +
- drivers/char/crash.c | 128 ++++++++++++++++++++++++++++++++
- include/asm-generic/crash-driver.h | 72 ++++++++++++++++++
- 12 files changed, 384 insertions(+)
- create mode 100644 arch/arm/include/asm/crash-driver.h
- create mode 100644 arch/arm64/include/asm/crash-driver.h
- create mode 100644 arch/ia64/include/asm/crash-driver.h
- create mode 100644 arch/powerpc/include/asm/crash-driver.h
- create mode 100644 arch/s390/include/asm/crash-driver.h
- create mode 100644 arch/x86/include/asm/crash-driver.h
- create mode 100644 drivers/char/crash.c
- create mode 100644 include/asm-generic/crash-driver.h
-diff --git a/arch/arm/include/asm/crash-driver.h b/arch/arm/include/asm/crash-driver.h -new file mode 100644 -index 0000000..06e7ae9 ---- /dev/null -+++ b/arch/arm/include/asm/crash-driver.h -@@ -0,0 +1,6 @@ -+#ifndef _ARM_CRASH_H -+#define _ARM_CRASH_H -+ -+#include <asm-generic/crash-driver.h> -+ -+#endif /* _ARM_CRASH_H */ -diff --git a/arch/arm64/include/asm/crash-driver.h b/arch/arm64/include/asm/crash-driver.h -new file mode 100644 -index 0000000..43b26da ---- /dev/null -+++ b/arch/arm64/include/asm/crash-driver.h -@@ -0,0 +1,6 @@ -+#ifndef _ARM64_CRASH_H -+#define _ARM64_CRASH_H -+ -+#include <asm-generic/crash-driver.h> -+ -+#endif /* _ARM64_CRASH_H */ -diff --git a/arch/ia64/include/asm/crash-driver.h b/arch/ia64/include/asm/crash-driver.h -new file mode 100644 -index 0000000..404bcb9 ---- /dev/null -+++ b/arch/ia64/include/asm/crash-driver.h -@@ -0,0 +1,90 @@ -+#ifndef _ASM_IA64_CRASH_H -+#define _ASM_IA64_CRASH_H -+ -+/* -+ * linux/include/asm-ia64/crash-driver.h -+ * -+ * Copyright (c) 2004 Red Hat, Inc. All rights reserved. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2, or (at your option) -+ * any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ */ -+ -+#ifdef __KERNEL__ -+ -+#include <linux/efi.h> -+#include <linux/mm.h> -+#include <asm/mmzone.h> -+ -+static inline void * -+map_virtual(u64 offset, struct page **pp) -+{ -+ struct page *page; -+ unsigned long pfn; -+ u32 type; -+ -+ if (REGION_NUMBER(offset) == 5) { -+ char byte; -+ -+ if (__get_user(byte, (char *)offset) == 0) -+ return (void *)offset; -+ else -+ return NULL; -+ } -+ -+ switch (type = efi_mem_type(offset)) -+ { -+ case EFI_LOADER_CODE: -+ case EFI_LOADER_DATA: -+ case EFI_BOOT_SERVICES_CODE: -+ case EFI_BOOT_SERVICES_DATA: -+ case EFI_CONVENTIONAL_MEMORY: -+ break; -+ -+ default: -+ printk(KERN_INFO -+ "crash memory driver: invalid memory type for %lx: %d\n", -+ offset, type); -+ return NULL; -+ } -+ -+ pfn = offset >> PAGE_SHIFT; -+ -+ if (!pfn_valid(pfn)) { -+ printk(KERN_INFO -+ "crash memory driver: invalid pfn: %lx )\n", pfn); -+ return NULL; -+ } -+ -+ page = pfn_to_page(pfn); -+ -+ if (!page->virtual) { -+ printk(KERN_INFO -+ "crash memory driver: offset: %lx page: %lx page->virtual: NULL\n", -+ offset, (unsigned long)page); -+ return NULL; -+ } -+ -+ return (page->virtual + (offset & (PAGE_SIZE-1))); -+} -+ -+static inline void unmap_virtual(struct page *page) -+{ -+ return; -+} -+ -+#endif /* __KERNEL__ */ -+ -+#endif /* _ASM_IA64_CRASH_H */ -diff --git a/arch/ia64/kernel/ia64_ksyms.c b/arch/ia64/kernel/ia64_ksyms.c -index d111248..b14b4c6 100644 ---- a/arch/ia64/kernel/ia64_ksyms.c -+++ b/arch/ia64/kernel/ia64_ksyms.c -@@ -9,3 +9,6 @@
- EXPORT_SYMBOL(min_low_pfn); /* defined by bootmem.c, but not exported by generic code */
- EXPORT_SYMBOL(max_low_pfn); /* defined by bootmem.c, but not exported by generic code */
- #endif
-+ -+#include <linux/efi.h> -+EXPORT_SYMBOL_GPL(efi_mem_type); -diff --git a/arch/powerpc/include/asm/crash-driver.h b/arch/powerpc/include/asm/crash-driver.h -new file mode 100644 -index 0000000..50092d9 ---- /dev/null -+++ b/arch/powerpc/include/asm/crash-driver.h -@@ -0,0 +1,6 @@ -+#ifndef _PPC64_CRASH_H -+#define _PPC64_CRASH_H -+ -+#include <asm-generic/crash-driver.h> -+ -+#endif /* _PPC64_CRASH_H */ -diff --git a/arch/s390/include/asm/crash-driver.h b/arch/s390/include/asm/crash-driver.h -new file mode 100644 -index 0000000..552be5e ---- /dev/null -+++ b/arch/s390/include/asm/crash-driver.h -@@ -0,0 +1,60 @@ -+#ifndef _S390_CRASH_H -+#define _S390_CRASH_H -+ -+#ifdef __KERNEL__ -+ -+#include <linux/mm.h> -+#include <linux/highmem.h> -+ -+/* -+ * For swapped prefix pages get bounce buffer using xlate_dev_mem_ptr() -+ */ -+static inline void *map_virtual(u64 offset, struct page **pp) -+{ -+ struct page *page; -+ unsigned long pfn; -+ void *vaddr; -+ -+ vaddr = xlate_dev_mem_ptr(offset); -+ pfn = ((unsigned long) vaddr) >> PAGE_SHIFT; -+ if ((unsigned long) vaddr != offset) -+ page = pfn_to_page(pfn); -+ else -+ page = NULL; -+ -+ if (!page_is_ram(pfn)) { -+ printk(KERN_INFO -+ "crash memory driver: !page_is_ram(pfn: %lx)\n", pfn); -+ return NULL; -+ } -+ -+ if (!pfn_valid(pfn)) { -+ printk(KERN_INFO -+ "crash memory driver: invalid pfn: %lx )\n", pfn); -+ return NULL; -+ } -+ -+ *pp = page; -+ return vaddr; -+} -+ -+/* -+ * Free bounce buffer if necessary -+ */ -+static inline void unmap_virtual(struct page *page) -+{ -+ void *vaddr; -+ -+ if (page) { -+ /* -+ * Because for bounce buffers vaddr will never be 0 -+ * unxlate_dev_mem_ptr() will always free the bounce buffer. -+ */ -+ vaddr = (void *)(page_to_pfn(page) << PAGE_SHIFT); -+ unxlate_dev_mem_ptr(0, vaddr); -+ } -+} -+ -+#endif /* __KERNEL__ */ -+ -+#endif /* _S390_CRASH_H */ -diff --git a/arch/s390/mm/maccess.c b/arch/s390/mm/maccess.c -index 792f9c6..3197995 100644 ---- a/arch/s390/mm/maccess.c -+++ b/arch/s390/mm/maccess.c -@@ -201,6 +201,7 @@ void *xlate_dev_mem_ptr(phys_addr_t addr)
put_online_cpus();
return bounce;
- }
-+EXPORT_SYMBOL_GPL(xlate_dev_mem_ptr);
- /*
- Free converted buffer for /dev/mem access (if necessary)
-@@ -210,3 +211,4 @@ void unxlate_dev_mem_ptr(phys_addr_t addr, void *buf)
if ((void *) addr != buf)
free_page((unsigned long) buf);
- }
-+EXPORT_SYMBOL_GPL(unxlate_dev_mem_ptr); -diff --git a/arch/x86/include/asm/crash-driver.h b/arch/x86/include/asm/crash-driver.h -new file mode 100644 -index 0000000..fd4736e ---- /dev/null -+++ b/arch/x86/include/asm/crash-driver.h -@@ -0,0 +1,6 @@ -+#ifndef _X86_CRASH_H -+#define _X86_CRASH_H -+ -+#include <asm-generic/crash-driver.h> -+ -+#endif /* _X86_CRASH_H */ -diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig -index dcc0973..99b99d5 100644 ---- a/drivers/char/Kconfig -+++ b/drivers/char/Kconfig -@@ -4,6 +4,9 @@
- menu "Character devices"
-+config CRASH -+ tristate "Crash Utility memory driver" -+
- source "drivers/tty/Kconfig"
- config DEVMEM
-diff --git a/drivers/char/Makefile b/drivers/char/Makefile -index 6e6c244..29cc9c8 100644 ---- a/drivers/char/Makefile -+++ b/drivers/char/Makefile -@@ -58,3 +58,5 @@ js-rtc-y = rtc.o
- obj-$(CONFIG_XILLYBUS) += xillybus/
- obj-$(CONFIG_POWERNV_OP_PANEL) += powernv-op-panel.o
- obj-$(CONFIG_ADI) += adi.o
-+ -+obj-$(CONFIG_CRASH) += crash.o -diff --git a/drivers/char/crash.c b/drivers/char/crash.c -new file mode 100644 -index 0000000..085378a ---- /dev/null -+++ b/drivers/char/crash.c -@@ -0,0 +1,128 @@ -+/* -+ * linux/drivers/char/crash.c -+ * -+ * Copyright (C) 2004 Dave Anderson anderson@redhat.com -+ * Copyright (C) 2004 Red Hat, Inc. -+ */ -+ -+/****************************************************************************** -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2, or (at your option) -+ * any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ *****************************************************************************/ -+ -+#include <linux/module.h> -+#include <linux/types.h> -+#include <linux/miscdevice.h> -+#include <linux/init.h> -+#include <asm/io.h> -+#include <linux/uaccess.h> -+#include <asm/types.h> -+#include <asm/crash-driver.h> -+ -+#define CRASH_VERSION "1.0" -+ -+/* -+ * These are the file operation functions that allow crash utility -+ * access to physical memory. -+ */ -+ -+static loff_t -+crash_llseek(struct file * file, loff_t offset, int orig) -+{ -+ switch (orig) { -+ case 0: -+ file->f_pos = offset; -+ return file->f_pos; -+ case 1: -+ file->f_pos += offset; -+ return file->f_pos; -+ default: -+ return -EINVAL; -+ } -+} -+ -+/* -+ * Determine the page address for an address offset value, -+ * get a virtual address for it, and copy it out. -+ * Accesses must fit within a page. -+ */ -+static ssize_t -+crash_read(struct file *file, char *buf, size_t count, loff_t *poff) -+{ -+ void *vaddr; -+ struct page *page; -+ u64 offset; -+ ssize_t read; -+ -+ offset = *poff; -+ if (offset >> PAGE_SHIFT != (offset+count-1) >> PAGE_SHIFT) -+ return -EINVAL; -+ -+ vaddr = map_virtual(offset, &page); -+ if (!vaddr) -+ return -EFAULT; -+ -+ if (copy_to_user(buf, vaddr, count)) { -+ unmap_virtual(page); -+ return -EFAULT; -+ } -+ unmap_virtual(page); -+ -+ read = count; -+ *poff += read; -+ return read; -+} -+ -+static struct file_operations crash_fops = { -+ .owner = THIS_MODULE, -+ .llseek = crash_llseek, -+ .read = crash_read, -+}; -+ -+static struct miscdevice crash_dev = { -+ MISC_DYNAMIC_MINOR, -+ "crash", -+ &crash_fops -+}; -+ -+static int __init -+crash_init(void) -+{ -+ int ret; -+ -+ ret = misc_register(&crash_dev); -+ if (ret) { -+ printk(KERN_ERR -+ "crash memory driver: cannot misc_register (MISC_DYNAMIC_MINOR)\n"); -+ goto out; -+ } -+ -+ ret = 0; -+ printk(KERN_INFO "crash memory driver: version %s\n", CRASH_VERSION); -+out: -+ return ret; -+} -+ -+static void __exit -+crash_cleanup_module(void) -+{ -+ misc_deregister(&crash_dev); -+} -+ -+module_init(crash_init); -+module_exit(crash_cleanup_module); -+ -+MODULE_LICENSE("GPL"); -diff --git a/include/asm-generic/crash-driver.h b/include/asm-generic/crash-driver.h -new file mode 100644 -index 0000000..25ab986 ---- /dev/null -+++ b/include/asm-generic/crash-driver.h -@@ -0,0 +1,72 @@ -+#ifndef __CRASH_H__ -+#define __CRASH_H__ -+ -+/* -+ * include/linux/crash-driver.h -+ * -+ * Copyright (c) 2013 Red Hat, Inc. All rights reserved. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2, or (at your option) -+ * any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ */ -+ -+#ifdef __KERNEL__ -+ -+#include <linux/mm.h> -+#include <linux/highmem.h> -+ -+static inline void * -+map_virtual(u64 offset, struct page **pp) -+{ -+ struct page *page; -+ unsigned long pfn; -+ void *vaddr; -+ -+ pfn = (unsigned long)(offset >> PAGE_SHIFT); -+ -+ if (!page_is_ram(pfn)) { -+ printk(KERN_INFO -+ "crash memory driver: !page_is_ram(pfn: %lx)\n", pfn); -+ return NULL; -+ } -+ -+ if (!pfn_valid(pfn)) { -+ printk(KERN_INFO -+ "crash memory driver: invalid pfn: %lx )\n", pfn); -+ return NULL; -+ } -+ -+ page = pfn_to_page(pfn); -+ -+ vaddr = kmap(page); -+ if (!vaddr) { -+ printk(KERN_INFO -+ "crash memory driver: pfn: %lx kmap(page: %lx) failed\n", -+ pfn, (unsigned long)page); -+ return NULL; -+ } -+ -+ *pp = page; -+ return (vaddr + (offset & (PAGE_SIZE-1))); -+} -+ -+static inline void unmap_virtual(struct page *page) -+{ -+ kunmap(page); -+} -+ -+#endif /* __KERNEL__ */ -+
-+#endif /* __CRASH_H__ */
-2.7.4
-From 23d8bd48303acda2d3a95a3e1a662784a4fa9fcd Mon Sep 17 00:00:00 2001 -From: Fedora Kernel Team kernel-team@fedoraproject.org -Date: Tue, 20 Sep 2016 19:39:46 +0200 -Subject: [PATCH] Update of crash driver to handle CONFIG_HARDENED_USERCOPY and
- to restrict the supported architectures.
- drivers/char/Kconfig | 1 +
- drivers/char/crash.c | 33 ++++++++++++++++++++++++++++++---
- 2 files changed, 31 insertions(+), 3 deletions(-)
-diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig -index 99b99d5..be6a3ae 100644 ---- a/drivers/char/Kconfig -+++ b/drivers/char/Kconfig -@@ -6,6 +6,7 @@ menu "Character devices"
- config CRASH
tristate "Crash Utility memory driver"
-+ depends on X86_32 || X86_64 || ARM || ARM64 || PPC64 || S390
- source "drivers/tty/Kconfig"
-diff --git a/drivers/char/crash.c b/drivers/char/crash.c -index 085378a..0258bf8 100644 ---- a/drivers/char/crash.c -+++ b/drivers/char/crash.c -@@ -32,7 +32,7 @@
- #include <asm/types.h>
- #include <asm/crash-driver.h>
--#define CRASH_VERSION "1.0" -+#define CRASH_VERSION "1.2"
- /*
- These are the file operation functions that allow crash utility
-@@ -66,6 +66,7 @@ crash_read(struct file *file, char *buf, size_t count, loff_t *poff)
struct page *page;
u64 offset;
ssize_t read;
-+ char *buffer = file->private_data;
offset = *poff;
if (offset >> PAGE_SHIFT != (offset+count-1) >> PAGE_SHIFT)
-@@ -74,8 +75,12 @@ crash_read(struct file *file, char *buf, size_t count, loff_t *poff)
vaddr = map_virtual(offset, &page);
if (!vaddr)
return -EFAULT;
-- -- if (copy_to_user(buf, vaddr, count)) { -+ /* -+ * Use bounce buffer to bypass the CONFIG_HARDENED_USERCOPY -+ * kernel text restriction. -+ */ -+ memcpy(buffer, (char *)vaddr, count); -+ if (copy_to_user(buf, buffer, count)) {
unmap_virtual(page);
return -EFAULT;
}
-@@ -86,10 +91,32 @@ crash_read(struct file *file, char *buf, size_t count, loff_t *poff)
return read;
- }
-+static int -+crash_open(struct inode * inode, struct file * filp) -+{ -+ if (!capable(CAP_SYS_RAWIO)) -+ return -EPERM; -+ -+ filp->private_data = (void *)__get_free_page(GFP_KERNEL); -+ if (!filp->private_data) -+ return -ENOMEM; -+ -+ return 0; -+} -+ -+static int -+crash_release(struct inode *inode, struct file *filp) -+{ -+ free_pages((unsigned long)filp->private_data, 0); -+ return 0; -+} -+
- static struct file_operations crash_fops = {
.owner = THIS_MODULE,
.llseek = crash_llseek,
.read = crash_read,
-+ .open = crash_open, -+ .release = crash_release,
- };
- static struct miscdevice crash_dev = {
-2.7.4
-From: Dave Anderson anderson@redhat.com -Date: Fri, 18 Nov 2016 11:52:35 -0500 -Cc: onestero@redhat.com -Subject: [PATCH v2] Restore live system crash analysis for ARM64
-This v2 version simplifies the copy out of the kimage_voffset value -to user-space per Oleg's suggestion.
-Upstream status: N/A
-Test: v2 version tested successfully with a modified crash utility
-The following Linux 4.6 commit breaks support for live system -crash analysis on ARM64:
- commit a7f8de168ace487fa7b88cb154e413cf40e87fc6
- Author: Ard Biesheuvel ard.biesheuvel@linaro.org
- arm64: allow kernel Image to be loaded anywhere in physical memory
-The patchset drastically modified the kernel's virtual memory layout, -where notably the static kernel text and data image was moved from the -unity mapped region into the vmalloc region. Prior to Linux 4.6, -the kernel's __virt_to_phys() function was this:
- #define __virt_to_phys(x) (((phys_addr_t)(x) - PAGE_OFFSET + PHYS_OFFSET))
-When running on a live system, the crash utility could determine PAGE_OFFSET -by looking at the virtual addresses compiled into the vmlinux file, and -PHYS_OFFSET can be determined by looking at /proc/iomem.
-As of Linux 4.6, it is done differently:
- #define __virt_to_phys(x) ({ \
phys_addr_t __x = (phys_addr_t)(x); \
__x & BIT(VA_BITS - 1) ? (__x & ~PAGE_OFFSET) + PHYS_OFFSET : \
(__x - kimage_voffset); })
-The PAGE_OFFSET/PHYS_OFFSET section of the conditional expression is for -traditional unity-mapped virtual addresses, but kernel text and static -data requires the new "kimage_voffset" variable. Unfortunately, the -contents of the new "kimage_voffset" variable is not available or -calculatable from a user-space perspective, even with root privileges.
-At least the ARM64 developers made its contents available to modules -with an EXPORT_SYMBOL(kimage_voffset) declaration. Accordingly, with -a modification to the /dev/crash driver to return its contents, the -crash utility can run on a live system.
-The patch allows for architecture-specific DEV_CRASH_ARCH_DATA ioctls -to be created, where this is the first instance of one.
- arch/arm64/include/asm/crash-driver.h | 16 ++++++++++++++++
- drivers/char/crash.c | 13 ++++++++++++-
- 2 files changed, 28 insertions(+), 1 deletion(-)
-diff --git a/arch/arm64/include/asm/crash-driver.h b/arch/arm64/include/asm/crash-driver.h -index 43b26da..fe68e7c 100644 ---- a/arch/arm64/include/asm/crash-driver.h -+++ b/arch/arm64/include/asm/crash-driver.h -@@ -3,4 +3,20 @@
- #include <asm-generic/crash-driver.h>
-+#define DEV_CRASH_ARCH_DATA _IOR('c', 1, long) -+ -+static long -+crash_arch_ioctl(struct file *file, unsigned int cmd, unsigned long arg) -+{ -+ extern u64 kimage_voffset; -+ -+ switch (cmd) -+ { -+ case DEV_CRASH_ARCH_DATA: -+ return put_user(kimage_voffset, (unsigned long __user *)arg); -+ default: -+ return -EINVAL; -+ } -+} -+
- #endif /* _ARM64_CRASH_H */
-diff --git a/drivers/char/crash.c b/drivers/char/crash.c -index 0258bf8..dfb767c 100644 ---- a/drivers/char/crash.c -+++ b/drivers/char/crash.c -@@ -32,7 +32,7 @@
- #include <asm/types.h>
- #include <asm/crash-driver.h>
--#define CRASH_VERSION "1.2" -+#define CRASH_VERSION "1.3"
- /*
- These are the file operation functions that allow crash utility
-@@ -111,10 +111,21 @@ crash_release(struct inode *inode, struct file *filp)
return 0;
- }
-+static long -+crash_ioctl(struct file *file, unsigned int cmd, unsigned long arg) -+{ -+#ifdef DEV_CRASH_ARCH_DATA -+ return crash_arch_ioctl(file, cmd, arg); -+#else -+ return -EINVAL; -+#endif -+} -+
- static struct file_operations crash_fops = {
.owner = THIS_MODULE,
.llseek = crash_llseek,
.read = crash_read,
-+ .unlocked_ioctl = crash_ioctl,
.open = crash_open,
.release = crash_release,
- };
-1.8.3.1
diff --git a/kernel.spec b/kernel.spec index c91483f3d..bac38d91d 100644 --- a/kernel.spec +++ b/kernel.spec @@ -495,8 +495,6 @@ Source5000: patch-5.%{base_sublevel}-git%{gitrev}.xz # Standalone patches # 100 - Generic long running patches
-Patch116: crash-driver.patch
Patch122: Input-synaptics-pin-3-touches-when-the-firmware-repo.patch
# This no longer applies, let's see if it needs to be updated
-- 2.21.0 _______________________________________________ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
On Thu, 15 Aug 2019, 20:57 Laura Abbott, labbott@redhat.com wrote:
I'd like to drop a bunch of patches Fedora has been carrying since forever. Most of these are fairly minor tweaks most people forgot we had and nobody cares about. My motivation is both in the spirit of cleaning up and also to better align Fedora + RHEL (I had a talk about this at Flock, video should be up soon).
If someone wants to make an effort at upstreaming any of these, feel free to do so but I really think most of these are cruft.
I think all of these make sense, ultimately if they come up as an issue it probably means there needs to be a discussion upstream to fix it properly there.
It reminds me I've been meaning to do a similar review on some of the long running but minor patches we have here for arm too.
Peter
Thanks,
Laura
Laura Abbott (9): Drop namespaces config tweak Drop cpumask auto select patch Drop scsi warning patch Remove ancient ath9k workaround Drop old lis3 patch Remove some old modalias adjustments Remove old keyboard logging patch Remove patch for GCC VTA Remove crash driver
Kbuild-Add-an-option-to-enable-GCC-VTA.patch | 94 --- ath9k-rx-dma-stop-check.patch | 38 - .../fedora/generic/x86/x86_64/CONFIG_NR_CPUS | 2 +- crash-driver.patch | 722 ------------------ die-floppy-die.patch | 29 - input-kill-stupid-messages.patch | 30 - kernel.spec | 20 - ...-CPUMASK_OFFSTACK-usable-without-deb.patch | 34 - lis3-improve-handling-of-null-rate.patch | 75 -- namespaces-no-expert.patch | 27 - no-pcspkr-modalias.patch | 22 - ...validate_disk-prevent-NULL-ptr-deref.patch | 39 - 12 files changed, 1 insertion(+), 1131 deletions(-) delete mode 100644 Kbuild-Add-an-option-to-enable-GCC-VTA.patch delete mode 100644 ath9k-rx-dma-stop-check.patch delete mode 100644 crash-driver.patch delete mode 100644 die-floppy-die.patch delete mode 100644 input-kill-stupid-messages.patch delete mode 100644 lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch delete mode 100644 lis3-improve-handling-of-null-rate.patch delete mode 100644 namespaces-no-expert.patch delete mode 100644 no-pcspkr-modalias.patch delete mode 100644 scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
-- 2.21.0 _______________________________________________ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
On 8/15/19 8:57 PM, Laura Abbott wrote:
I'd like to drop a bunch of patches Fedora has been carrying since forever. Most of these are fairly minor tweaks most people forgot we had and nobody cares about. My motivation is both in the spirit of cleaning up and also to better align Fedora + RHEL (I had a talk about this at Flock, video should be up soon).
If someone wants to make an effort at upstreaming any of these, feel free to do so but I really think most of these are cruft.
Thanks, Laura
Laura Abbott (9): Drop namespaces config tweak Drop cpumask auto select patch Drop scsi warning patch Remove ancient ath9k workaround Drop old lis3 patch Remove some old modalias adjustments Remove old keyboard logging patch Remove patch for GCC VTA Remove crash driver
Kbuild-Add-an-option-to-enable-GCC-VTA.patch | 94 --- ath9k-rx-dma-stop-check.patch | 38 - .../fedora/generic/x86/x86_64/CONFIG_NR_CPUS | 2 +- crash-driver.patch | 722 ------------------ die-floppy-die.patch | 29 - input-kill-stupid-messages.patch | 30 - kernel.spec | 20 - ...-CPUMASK_OFFSTACK-usable-without-deb.patch | 34 - lis3-improve-handling-of-null-rate.patch | 75 -- namespaces-no-expert.patch | 27 - no-pcspkr-modalias.patch | 22 - ...validate_disk-prevent-NULL-ptr-deref.patch | 39 - 12 files changed, 1 insertion(+), 1131 deletions(-) delete mode 100644 Kbuild-Add-an-option-to-enable-GCC-VTA.patch delete mode 100644 ath9k-rx-dma-stop-check.patch delete mode 100644 crash-driver.patch delete mode 100644 die-floppy-die.patch delete mode 100644 input-kill-stupid-messages.patch delete mode 100644 lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch delete mode 100644 lis3-improve-handling-of-null-rate.patch delete mode 100644 namespaces-no-expert.patch delete mode 100644 no-pcspkr-modalias.patch delete mode 100644 scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
Given there were no major objections I cleaned up the few comments and pushed the patches to rawhide.
kernel@lists.fedoraproject.org