V1 of the KASLR patch which was backported in 2.0.13-6 had wrong calculation for page_offset. This patch takes the correct difference.
Signed-off-by: Pratyush Anand panand@redhat.com --- ...mpfile-x86_64-fix-page_offset-calculation.patch | 32 ++++++++++++++++++++++ kexec-tools.spec | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch
diff --git a/kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch b/kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch new file mode 100644 index 000000000000..3b021deda950 --- /dev/null +++ b/kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch @@ -0,0 +1,32 @@ +From 0ebcd6f3570dd66bff0930872b8bf859bdcf302a Mon Sep 17 00:00:00 2001 +Message-Id: 0ebcd6f3570dd66bff0930872b8bf859bdcf302a.1477548646.git.panand@redhat.com +From: Pratyush Anand panand@redhat.com +Date: Thu, 27 Oct 2016 11:34:33 +0530 +Subject: [PATCH] x86_64: fix page_offset calculation + +Kernel text region lies above __START_KERNEL_map, which is linearly mapped +however not a direct mapping. Direct mapping region lies below it instead. +So, page_offset can only be calculated with a region which is below +__START_KERNEL_map. + +Signed-off-by: Pratyush Anand panand@redhat.com +--- + arch/x86_64.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/x86_64.c b/arch/x86_64.c +index 13990cef839b..3ef33ae4ef2d 100644 +--- a/makedumpfile-1.6.0/arch/x86_64.c ++++ b/makedumpfile-1.6.0/arch/x86_64.c +@@ -41,7 +41,7 @@ get_page_offset_x86_64(void) + unsigned long long virt_start; + + for (i = 0; get_pt_load(i, &phys_start, NULL, &virt_start, NULL); i++) { +- if (virt_start >= __START_KERNEL_map) { ++ if (virt_start < __START_KERNEL_map) { + info->page_offset = virt_start - phys_start; + return TRUE; + } +-- +2.7.4 + diff --git a/kexec-tools.spec b/kexec-tools.spec index a7c11605f4f8..a80774ea75dc 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -95,6 +95,7 @@ Patch604: kexec-tools-2.0.13-makedumpfile-x86-64-calculate-page-offset-from-pt-l Patch605: kexec-tools-2.0.13-makedumpfile-x86-64-translate-all-VA-to-PA-using-page-table-values.patch Patch606: kexec-tools-2.0.13-makedumpfile-x86-64-kill-is-vmalloc-addr-x86-64.patch Patch607: kexec-tools-2.0.13-makedumpfile-x86-64-kill-some-unused-initialization.patch +Patch608: kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch
%description kexec-tools provides /sbin/kexec binary that facilitates a new @@ -130,6 +131,7 @@ tar -z -x -v -f %{SOURCE23} %patch605 -p1 %patch606 -p1 %patch607 -p1 +%patch608 -p1
%ifarch ppc %define archdef ARCH=ppc
On 10/27/16 at 12:15pm, Pratyush Anand wrote:
V1 of the KASLR patch which was backported in 2.0.13-6 had wrong calculation for page_offset. This patch takes the correct difference.
Signed-off-by: Pratyush Anand panand@redhat.com
...mpfile-x86_64-fix-page_offset-calculation.patch | 32 ++++++++++++++++++++++ kexec-tools.spec | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch
diff --git a/kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch b/kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch new file mode 100644 index 000000000000..3b021deda950 --- /dev/null +++ b/kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch @@ -0,0 +1,32 @@ +From 0ebcd6f3570dd66bff0930872b8bf859bdcf302a Mon Sep 17 00:00:00 2001 +Message-Id: 0ebcd6f3570dd66bff0930872b8bf859bdcf302a.1477548646.git.panand@redhat.com +From: Pratyush Anand panand@redhat.com +Date: Thu, 27 Oct 2016 11:34:33 +0530 +Subject: [PATCH] x86_64: fix page_offset calculation
+Kernel text region lies above __START_KERNEL_map, which is linearly mapped +however not a direct mapping. Direct mapping region lies below it instead. +So, page_offset can only be calculated with a region which is below +__START_KERNEL_map.
+Signed-off-by: Pratyush Anand panand@redhat.com +---
- arch/x86_64.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+diff --git a/arch/x86_64.c b/arch/x86_64.c +index 13990cef839b..3ef33ae4ef2d 100644 +--- a/makedumpfile-1.6.0/arch/x86_64.c ++++ b/makedumpfile-1.6.0/arch/x86_64.c +@@ -41,7 +41,7 @@ get_page_offset_x86_64(void)
- unsigned long long virt_start;
- for (i = 0; get_pt_load(i, &phys_start, NULL, &virt_start, NULL); i++) {
+- if (virt_start >= __START_KERNEL_map) { ++ if (virt_start < __START_KERNEL_map) {
info->page_offset = virt_start - phys_start;
return TRUE;
}
+-- +2.7.4
diff --git a/kexec-tools.spec b/kexec-tools.spec index a7c11605f4f8..a80774ea75dc 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -95,6 +95,7 @@ Patch604: kexec-tools-2.0.13-makedumpfile-x86-64-calculate-page-offset-from-pt-l Patch605: kexec-tools-2.0.13-makedumpfile-x86-64-translate-all-VA-to-PA-using-page-table-values.patch Patch606: kexec-tools-2.0.13-makedumpfile-x86-64-kill-is-vmalloc-addr-x86-64.patch Patch607: kexec-tools-2.0.13-makedumpfile-x86-64-kill-some-unused-initialization.patch +Patch608: kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch
%description kexec-tools provides /sbin/kexec binary that facilitates a new @@ -130,6 +131,7 @@ tar -z -x -v -f %{SOURCE23} %patch605 -p1 %patch606 -p1 %patch607 -p1 +%patch608 -p1
%ifarch ppc %define archdef ARCH=ppc -- 2.7.4
Acked-by: Dave Young dyoung@redhat.com
Thank you for the update, Pratyush. Fedora 25 will probably the first distribution release which has the kaslr/kdump support!
Dave
Hi Dave
We added patch 605 .. 608 for kaslr fix in makedumpfile and created a F25 update because F25 kernel will have kaslr being enabled by default. The F25 freeze date is Nov 1st so I just merged them even if they have not been accepted by upstream makedumpfile so that the basic functionality still works.
I see you have fixed all the kaslr issues in crash utilty in your git tree, would you mind to create a F25 update as well?
Thanks
On 10/27/16 at 04:39pm, Dave Young wrote:
On 10/27/16 at 12:15pm, Pratyush Anand wrote:
V1 of the KASLR patch which was backported in 2.0.13-6 had wrong calculation for page_offset. This patch takes the correct difference.
Signed-off-by: Pratyush Anand panand@redhat.com
...mpfile-x86_64-fix-page_offset-calculation.patch | 32 ++++++++++++++++++++++ kexec-tools.spec | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch
diff --git a/kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch b/kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch new file mode 100644 index 000000000000..3b021deda950 --- /dev/null +++ b/kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch @@ -0,0 +1,32 @@ +From 0ebcd6f3570dd66bff0930872b8bf859bdcf302a Mon Sep 17 00:00:00 2001 +Message-Id: 0ebcd6f3570dd66bff0930872b8bf859bdcf302a.1477548646.git.panand@redhat.com +From: Pratyush Anand panand@redhat.com +Date: Thu, 27 Oct 2016 11:34:33 +0530 +Subject: [PATCH] x86_64: fix page_offset calculation
+Kernel text region lies above __START_KERNEL_map, which is linearly mapped +however not a direct mapping. Direct mapping region lies below it instead. +So, page_offset can only be calculated with a region which is below +__START_KERNEL_map.
+Signed-off-by: Pratyush Anand panand@redhat.com +---
- arch/x86_64.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+diff --git a/arch/x86_64.c b/arch/x86_64.c +index 13990cef839b..3ef33ae4ef2d 100644 +--- a/makedumpfile-1.6.0/arch/x86_64.c ++++ b/makedumpfile-1.6.0/arch/x86_64.c +@@ -41,7 +41,7 @@ get_page_offset_x86_64(void)
- unsigned long long virt_start;
- for (i = 0; get_pt_load(i, &phys_start, NULL, &virt_start, NULL); i++) {
+- if (virt_start >= __START_KERNEL_map) { ++ if (virt_start < __START_KERNEL_map) {
info->page_offset = virt_start - phys_start;
return TRUE;
}
+-- +2.7.4
diff --git a/kexec-tools.spec b/kexec-tools.spec index a7c11605f4f8..a80774ea75dc 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -95,6 +95,7 @@ Patch604: kexec-tools-2.0.13-makedumpfile-x86-64-calculate-page-offset-from-pt-l Patch605: kexec-tools-2.0.13-makedumpfile-x86-64-translate-all-VA-to-PA-using-page-table-values.patch Patch606: kexec-tools-2.0.13-makedumpfile-x86-64-kill-is-vmalloc-addr-x86-64.patch Patch607: kexec-tools-2.0.13-makedumpfile-x86-64-kill-some-unused-initialization.patch +Patch608: kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch
%description kexec-tools provides /sbin/kexec binary that facilitates a new @@ -130,6 +131,7 @@ tar -z -x -v -f %{SOURCE23} %patch605 -p1 %patch606 -p1 %patch607 -p1 +%patch608 -p1
%ifarch ppc %define archdef ARCH=ppc -- 2.7.4
Acked-by: Dave Young dyoung@redhat.com
Thank you for the update, Pratyush. Fedora 25 will probably the first distribution release which has the kaslr/kdump support!
Dave _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org
----- Original Message -----
Hi Dave
We added patch 605 .. 608 for kaslr fix in makedumpfile and created a F25 update because F25 kernel will have kaslr being enabled by default. The F25 freeze date is Nov 1st so I just merged them even if they have not been accepted by upstream makedumpfile so that the basic functionality still works.
I see you have fixed all the kaslr issues in crash utilty in your git tree, would you mind to create a F25 update as well?
I don't see how an update to the f25 branch can possibly make it into to the initial f25 release? As I understand it, it will require that the package be proposed for an update, go through the ~7-day QA period, and eventually pushed to their "stable" repository as an update.
In any case, I'll start the ball rolling, but it's highly unlikely it will make it for f25 GA.
Dave
Thanks
On 10/27/16 at 04:39pm, Dave Young wrote:
On 10/27/16 at 12:15pm, Pratyush Anand wrote:
V1 of the KASLR patch which was backported in 2.0.13-6 had wrong calculation for page_offset. This patch takes the correct difference.
Signed-off-by: Pratyush Anand panand@redhat.com
...mpfile-x86_64-fix-page_offset-calculation.patch | 32 ++++++++++++++++++++++ kexec-tools.spec | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch
diff --git a/kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch b/kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch new file mode 100644 index 000000000000..3b021deda950 --- /dev/null +++ b/kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch @@ -0,0 +1,32 @@ +From 0ebcd6f3570dd66bff0930872b8bf859bdcf302a Mon Sep 17 00:00:00 2001 +Message-Id: 0ebcd6f3570dd66bff0930872b8bf859bdcf302a.1477548646.git.panand@redhat.com +From: Pratyush Anand panand@redhat.com +Date: Thu, 27 Oct 2016 11:34:33 +0530 +Subject: [PATCH] x86_64: fix page_offset calculation
+Kernel text region lies above __START_KERNEL_map, which is linearly mapped +however not a direct mapping. Direct mapping region lies below it instead. +So, page_offset can only be calculated with a region which is below +__START_KERNEL_map.
+Signed-off-by: Pratyush Anand panand@redhat.com +---
- arch/x86_64.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+diff --git a/arch/x86_64.c b/arch/x86_64.c +index 13990cef839b..3ef33ae4ef2d 100644 +--- a/makedumpfile-1.6.0/arch/x86_64.c ++++ b/makedumpfile-1.6.0/arch/x86_64.c +@@ -41,7 +41,7 @@ get_page_offset_x86_64(void)
- unsigned long long virt_start;
- for (i = 0; get_pt_load(i, &phys_start, NULL, &virt_start, NULL); i++)
{ +- if (virt_start >= __START_KERNEL_map) { ++ if (virt_start < __START_KERNEL_map) {
info->page_offset = virt_start - phys_start;
return TRUE;
}
+-- +2.7.4
diff --git a/kexec-tools.spec b/kexec-tools.spec index a7c11605f4f8..a80774ea75dc 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -95,6 +95,7 @@ Patch604: kexec-tools-2.0.13-makedumpfile-x86-64-calculate-page-offset-from-pt-l Patch605: kexec-tools-2.0.13-makedumpfile-x86-64-translate-all-VA-to-PA-using-page-table-values.patch Patch606: kexec-tools-2.0.13-makedumpfile-x86-64-kill-is-vmalloc-addr-x86-64.patch Patch607: kexec-tools-2.0.13-makedumpfile-x86-64-kill-some-unused-initialization.patch +Patch608: kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch
%description kexec-tools provides /sbin/kexec binary that facilitates a new @@ -130,6 +131,7 @@ tar -z -x -v -f %{SOURCE23} %patch605 -p1 %patch606 -p1 %patch607 -p1 +%patch608 -p1
%ifarch ppc %define archdef ARCH=ppc -- 2.7.4
Acked-by: Dave Young dyoung@redhat.com
Thank you for the update, Pratyush. Fedora 25 will probably the first distribution release which has the kaslr/kdump support!
Dave _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org
Hi Dave
On 10/28/16 at 09:53am, Dave Anderson wrote:
----- Original Message -----
Hi Dave
We added patch 605 .. 608 for kaslr fix in makedumpfile and created a F25 update because F25 kernel will have kaslr being enabled by default. The F25 freeze date is Nov 1st so I just merged them even if they have not been accepted by upstream makedumpfile so that the basic functionality still works.
I see you have fixed all the kaslr issues in crash utilty in your git tree, would you mind to create a F25 update as well?
I don't see how an update to the f25 branch can possibly make it into to the initial f25 release? As I understand it, it will require that the package be proposed for an update, go through the ~7-day QA period, and eventually pushed to their "stable" repository as an update.
I'm also not sure, Peter Robinson said 3 days will be fine though.
In any case, I'll start the ball rolling, but it's highly unlikely it will make it for f25 GA.
Thanks~~, It is still good to have, people can update the package later after GA.
Dave
Thanks
On 10/27/16 at 04:39pm, Dave Young wrote:
On 10/27/16 at 12:15pm, Pratyush Anand wrote:
V1 of the KASLR patch which was backported in 2.0.13-6 had wrong calculation for page_offset. This patch takes the correct difference.
Signed-off-by: Pratyush Anand panand@redhat.com
...mpfile-x86_64-fix-page_offset-calculation.patch | 32 ++++++++++++++++++++++ kexec-tools.spec | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch
diff --git a/kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch b/kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch new file mode 100644 index 000000000000..3b021deda950 --- /dev/null +++ b/kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch @@ -0,0 +1,32 @@ +From 0ebcd6f3570dd66bff0930872b8bf859bdcf302a Mon Sep 17 00:00:00 2001 +Message-Id: 0ebcd6f3570dd66bff0930872b8bf859bdcf302a.1477548646.git.panand@redhat.com +From: Pratyush Anand panand@redhat.com +Date: Thu, 27 Oct 2016 11:34:33 +0530 +Subject: [PATCH] x86_64: fix page_offset calculation
+Kernel text region lies above __START_KERNEL_map, which is linearly mapped +however not a direct mapping. Direct mapping region lies below it instead. +So, page_offset can only be calculated with a region which is below +__START_KERNEL_map.
+Signed-off-by: Pratyush Anand panand@redhat.com +---
- arch/x86_64.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+diff --git a/arch/x86_64.c b/arch/x86_64.c +index 13990cef839b..3ef33ae4ef2d 100644 +--- a/makedumpfile-1.6.0/arch/x86_64.c ++++ b/makedumpfile-1.6.0/arch/x86_64.c +@@ -41,7 +41,7 @@ get_page_offset_x86_64(void)
- unsigned long long virt_start;
- for (i = 0; get_pt_load(i, &phys_start, NULL, &virt_start, NULL); i++)
{ +- if (virt_start >= __START_KERNEL_map) { ++ if (virt_start < __START_KERNEL_map) {
info->page_offset = virt_start - phys_start;
return TRUE;
}
+-- +2.7.4
diff --git a/kexec-tools.spec b/kexec-tools.spec index a7c11605f4f8..a80774ea75dc 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -95,6 +95,7 @@ Patch604: kexec-tools-2.0.13-makedumpfile-x86-64-calculate-page-offset-from-pt-l Patch605: kexec-tools-2.0.13-makedumpfile-x86-64-translate-all-VA-to-PA-using-page-table-values.patch Patch606: kexec-tools-2.0.13-makedumpfile-x86-64-kill-is-vmalloc-addr-x86-64.patch Patch607: kexec-tools-2.0.13-makedumpfile-x86-64-kill-some-unused-initialization.patch +Patch608: kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch
%description kexec-tools provides /sbin/kexec binary that facilitates a new @@ -130,6 +131,7 @@ tar -z -x -v -f %{SOURCE23} %patch605 -p1 %patch606 -p1 %patch607 -p1 +%patch608 -p1
%ifarch ppc %define archdef ARCH=ppc -- 2.7.4
Acked-by: Dave Young dyoung@redhat.com
Thank you for the update, Pratyush. Fedora 25 will probably the first distribution release which has the kaslr/kdump support!
Dave _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org