Re: [PATCH 9/9] Remove crash driver

2019-08-16 Thread Laura Abbott

On 8/16/19 6:56 AM, Josh Boyer wrote:

On Thu, Aug 15, 2019 at 4:02 PM Laura Abbott  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 
---
  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..0
--- a/crash-driver.patch
+++ /dev/null
@@ -1,722 +0,0 @@
-From 973e23bf27b0b2e5021321357fc570cccea3104c Mon Sep 17 00:00:00 2001
-From: Dave Anderson 
-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 000..06e7ae9
 /dev/null
-+++ b/arch/arm/include/asm/crash-driver.h
-@@ -0,0 +1,6 @@
-+#ifndef _ARM_CRASH_H
-+#define _ARM_CRASH_H
-+
-+#include 
-+
-+#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 000..43b26da
 /dev/null
-+++ b/arch/arm64/include/asm/crash-driver.h
-@@ -0,0 +1,6 @@
-+#ifndef _ARM64_CRASH_H
-+#define _ARM64_CRASH_H
-+
-+#include 
-+
-+#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 000..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 
-+#include 
-+#include 
-+
-+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 

Re: [PATCH 9/9] Remove crash driver

2019-08-16 Thread Josh Boyer
On Thu, Aug 15, 2019 at 4:02 PM Laura Abbott  wrote:
>
> This has since been replaced by other in kernel pieces. We
> can finally drop it.

Which pieces?

josh

>
> Signed-off-by: Laura Abbott 
> ---
>  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..0
> --- a/crash-driver.patch
> +++ /dev/null
> @@ -1,722 +0,0 @@
> -From 973e23bf27b0b2e5021321357fc570cccea3104c Mon Sep 17 00:00:00 2001
> -From: Dave Anderson 
> -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 000..06e7ae9
>  /dev/null
> -+++ b/arch/arm/include/asm/crash-driver.h
> -@@ -0,0 +1,6 @@
> -+#ifndef _ARM_CRASH_H
> -+#define _ARM_CRASH_H
> -+
> -+#include 
> -+
> -+#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 000..43b26da
>  /dev/null
> -+++ b/arch/arm64/include/asm/crash-driver.h
> -@@ -0,0 +1,6 @@
> -+#ifndef _ARM64_CRASH_H
> -+#define _ARM64_CRASH_H
> -+
> -+#include 
> -+
> -+#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 000..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 
> -+#include 
> -+#include 
> -+
> -+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 

[PATCH 9/9] Remove crash driver

2019-08-15 Thread Laura Abbott
This has since been replaced by other in kernel pieces. We
can finally drop it.

Signed-off-by: Laura Abbott 
---
 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..0
--- a/crash-driver.patch
+++ /dev/null
@@ -1,722 +0,0 @@
-From 973e23bf27b0b2e5021321357fc570cccea3104c Mon Sep 17 00:00:00 2001
-From: Dave Anderson 
-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 000..06e7ae9
 /dev/null
-+++ b/arch/arm/include/asm/crash-driver.h
-@@ -0,0 +1,6 @@
-+#ifndef _ARM_CRASH_H
-+#define _ARM_CRASH_H
-+
-+#include 
-+
-+#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 000..43b26da
 /dev/null
-+++ b/arch/arm64/include/asm/crash-driver.h
-@@ -0,0 +1,6 @@
-+#ifndef _ARM64_CRASH_H
-+#define _ARM64_CRASH_H
-+
-+#include 
-+
-+#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 000..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 
-+#include 
-+#include 
-+
-+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;
-+  }
-+
-+