Re: [PATCHv7] x86/kdump: bugfix, make the behavior of crashkernel=X consistent with kaslr

2019-01-28 Thread Pingfan Liu
On Fri, Jan 25, 2019 at 6:39 PM Borislav Petkov wrote: > > > > Subject: Re: [PATCHv7] x86/kdump: bugfix, make the behavior of > > crashkernel=X > > s/bugfix, // > OK. > On Mon, Jan 21, 2019 at 01:16:08PM +0800, Pingfan Liu wrote: > > People reported crashkernel=384M reservation failed on a high

Re: [PATCHv7] x86/kdump: bugfix, make the behavior of crashkernel=X consistent with kaslr

2019-01-28 Thread Pingfan Liu
On Fri, Jan 25, 2019 at 10:08 PM Borislav Petkov wrote: > > On Fri, Jan 25, 2019 at 09:45:18PM +0800, Dave Young wrote: > > AFAIK, some people prefer to explictly reserve crash memory at high > > region even if it is possible to reserve at low area. May because > > <4G memory is limited on large

[PATCH v2] makedumpfile: honor the CFLAGS from environment variables

2019-01-28 Thread Kairui Song
This makes it possible to pass in extra cflags, for example, hardening flags could be passed in with environment variable when building a hardened package. Also introduce a CFLAGS_BASE to hold common CFLAGS, which simplify the CFLAGS definition. Suggested-by: Kazuhito Hagio Signed-off-by: Kairui

Re: [PATCH] makedumpfile: honor the CFLAGS from environment variables

2019-01-28 Thread Kairui Song
On Tue, Jan 29, 2019 at 6:33 AM Kazuhito Hagio wrote: > > On 1/28/2019 4:51 PM, Kazuhito Hagio wrote: > > On 1/28/2019 5:59 AM, Simon Horman wrote: > > > On Mon, Jan 28, 2019 at 06:50:45PM +0800, Kairui Song wrote: > > > > This make it easier for passing extra cflags, for example hardening > > > >

RE: [PATCH] makedumpfile: honor the CFLAGS from environment variables

2019-01-28 Thread Kazuhito Hagio
On 1/28/2019 4:51 PM, Kazuhito Hagio wrote: > On 1/28/2019 5:59 AM, Simon Horman wrote: > > On Mon, Jan 28, 2019 at 06:50:45PM +0800, Kairui Song wrote: > > > This make it easier for passing extra cflags, for example hardening > > > flags could be passed in with enviroment variable. > > > > > > Sig

RE: [PATCH] makedumpfile: honor the CFLAGS from environment variables

2019-01-28 Thread Kazuhito Hagio
On 1/28/2019 5:59 AM, Simon Horman wrote: > On Mon, Jan 28, 2019 at 06:50:45PM +0800, Kairui Song wrote: > > This make it easier for passing extra cflags, for example hardening > > flags could be passed in with enviroment variable. > > > > Signed-off-by: Kairui Song > > Thanks, I like this a lot.

[PATCH 2/2] arm64: Expose PARange via ID_AA64MMFR0_EL1 and VARange via ID_AA64MMFR2_EL1

2019-01-28 Thread Bhupesh Sharma
ARMv8.2 architecture hardware extensions can support upto 52-bit physical addresses (ARMv8.2-LPA) and 52-bit virtual addresses (ARMv8.2-LVA). User-space utilities like 'makedumpfile' can try and use the getauxval() function to retrieve the underlying PARange and VARange values supported. An examp

[PATCH 0/2] arm64: Expose physical and virtual address capabilities to user-space

2019-01-28 Thread Bhupesh Sharma
With ARMv8.2-LVA and LPA architecture extensions, arm64 hardware which supports these extensions can support upto 52-bit virtual and 52-bit physical addresses respectively. Since at the moment we enable the support of these extensions via CONFIG flags, e.g. - LPA via CONFIG_ARM64_PA_BITS_52 t

[PATCH 1/2] arm64: Expose address bits (physical/virtual) via cpuinfo

2019-01-28 Thread Bhupesh Sharma
With ARMv8.2-LVA and LPA architecture extensions, arm64 hardware which supports these extensions can support upto 52-bit virtual and 52-bit physical addresses respectively. Since at the moment we enable the support of these extensions via CONFIG flags, e.g. - LPA via CONFIG_ARM64_PA_BITS_52, and

Re: [PATCH v2] Remove the memory encryption mask to obtain the true physical address

2019-01-28 Thread Lendacky, Thomas
On 1/28/19 1:45 PM, Kazuhito Hagio wrote: > On 1/28/2019 9:24 AM, Lendacky, Thomas wrote: >> On 1/27/19 11:46 PM, Lianbo Jiang wrote: >>> For AMD machine with SME feature, if SME is enabled in the first >>> kernel, the crashed kernel's page table(pgd/pud/pmd/pte) contains >>> the memory encryption

RE: [PATCH v2] Remove the memory encryption mask to obtain the true physical address

2019-01-28 Thread Kazuhito Hagio
On 1/28/2019 9:24 AM, Lendacky, Thomas wrote: > On 1/27/19 11:46 PM, Lianbo Jiang wrote: > > For AMD machine with SME feature, if SME is enabled in the first > > kernel, the crashed kernel's page table(pgd/pud/pmd/pte) contains > > the memory encryption mask, so makedumpfile needs to remove the > >

Re: [PATCH v2] Remove the memory encryption mask to obtain the true physical address

2019-01-28 Thread Lendacky, Thomas
On 1/27/19 11:46 PM, Lianbo Jiang wrote: > For AMD machine with SME feature, if SME is enabled in the first > kernel, the crashed kernel's page table(pgd/pud/pmd/pte) contains > the memory encryption mask, so makedumpfile needs to remove the > memory encryption mask to obtain the true physical addr

Re: [PATCH v2] x86: Handle 64bit framebuffer memory address properly

2019-01-28 Thread Kairui Song
On Mon, Jan 28, 2019 at 6:53 PM Simon Horman wrote: > > On Tue, Jan 22, 2019 at 10:25:42AM +0800, Kairui Song wrote: > > On Wed, Dec 5, 2018 at 5:22 PM Kairui Song wrote: > > > > > > In a EFI system, the frame buffer address is 64bit, so currently > > > if the address is beyound 4G, kexec will se

Re: [PATCH] makedumpfile: honor the CFLAGS from environment variables

2019-01-28 Thread Simon Horman
On Mon, Jan 28, 2019 at 06:50:45PM +0800, Kairui Song wrote: > This make it easier for passing extra cflags, for example hardening > flags could be passed in with enviroment variable. > > Signed-off-by: Kairui Song Thanks, I like this a lot. I would like to wake a little to see if there is revi

Re: [PATCH] purgatory: Use standalond CFLAGS

2019-01-28 Thread Simon Horman
On Mon, Jan 28, 2019 at 06:50:40PM +0800, Kairui Song wrote: > There has been a lot of workarounds for purgatory disabling many > specified CFLAGS that will break purgatory. It will be better to not > let the CFLAGS used to compile purgatory honor the CFLAGS from > environment variables. So we will

Re: [PATCH v2] x86: Handle 64bit framebuffer memory address properly

2019-01-28 Thread Simon Horman
On Tue, Jan 22, 2019 at 10:25:42AM +0800, Kairui Song wrote: > On Wed, Dec 5, 2018 at 5:22 PM Kairui Song wrote: > > > > In a EFI system, the frame buffer address is 64bit, so currently > > if the address is beyound 4G, kexec will set wrong address due to > > truncate. > > > > Linux kernel commit

[PATCH] makedumpfile: honor the CFLAGS from environment variables

2019-01-28 Thread Kairui Song
This make it easier for passing extra cflags, for example hardening flags could be passed in with enviroment variable. Signed-off-by: Kairui Song --- Makefile | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 612b9d0..b511a78 100644 --- a/Ma

[PATCH] purgatory: Use standalond CFLAGS

2019-01-28 Thread Kairui Song
There has been a lot of workarounds for purgatory disabling many specified CFLAGS that will break purgatory. It will be better to not let the CFLAGS used to compile purgatory honor the CFLAGS from environment variables. So we will have stable CFLAGS for purgatory. If anyone still wants to change p

Re: multiboot patches from august 2018

2019-01-28 Thread Simon Horman
On Mon, Jan 21, 2019 at 08:07:32PM +0100, cinap_len...@felloff.net wrote: > i'm unsubscribing from this list as i did not get any > response about these patches from anyone but horms so far > and that was a long time ago. > > http://lists.infradead.org/pipermail/kexec/2018-August/021357.html > htt

Re: [PATCHv7] x86/kdump: bugfix, make the behavior of crashkernel=X consistent with kaslr

2019-01-28 Thread Borislav Petkov
On Mon, Jan 28, 2019 at 05:58:09PM +0800, Dave Young wrote: > Another reason is in case ,high we will need automatically reserve a > region in low area for swiotlb. So for example one use > crashkernel=256M,high, actual reserved memory is 256M above 4G and > another 256M under 4G for swiotlb. No

Re: [PATCHv7] x86/kdump: bugfix, make the behavior of crashkernel=X consistent with kaslr

2019-01-28 Thread Dave Young
On 01/25/19 at 03:08pm, Borislav Petkov wrote: > On Fri, Jan 25, 2019 at 09:45:18PM +0800, Dave Young wrote: > > AFAIK, some people prefer to explictly reserve crash memory at high > > region even if it is possible to reserve at low area. May because > > <4G memory is limited on large server, they