Re: [PATCH] mm, kasan: don't poison boot memory

2021-03-02 Thread Mike Rapoport
Hi George, On Mon, Mar 01, 2021 at 08:20:45PM -0500, George Kennedy wrote: > > > > > > > > > There should be no harm in doing the memblock_reserve() for all > > > > the standard > > > > tables, right? > > > It should be ok to memblock_reserve() all the tables very early as > > > long as > > > we

Re: [PATCH] mm, kasan: don't poison boot memory

2021-03-01 Thread George Kennedy
On 3/1/2021 9:29 AM, George Kennedy wrote: On 2/28/2021 1:08 PM, Mike Rapoport wrote: On Fri, Feb 26, 2021 at 11:16:06AM -0500, George Kennedy wrote: On 2/26/2021 6:17 AM, Mike Rapoport wrote: Hi George, On Thu, Feb 25, 2021 at 08:19:18PM -0500, George Kennedy wrote: Not sure if it's

Re: [PATCH] mm, kasan: don't poison boot memory

2021-03-01 Thread George Kennedy
On 2/28/2021 1:08 PM, Mike Rapoport wrote: On Fri, Feb 26, 2021 at 11:16:06AM -0500, George Kennedy wrote: On 2/26/2021 6:17 AM, Mike Rapoport wrote: Hi George, On Thu, Feb 25, 2021 at 08:19:18PM -0500, George Kennedy wrote: Not sure if it's the right thing to do, but added

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-28 Thread Mike Rapoport
On Fri, Feb 26, 2021 at 11:16:06AM -0500, George Kennedy wrote: > On 2/26/2021 6:17 AM, Mike Rapoport wrote: > > Hi George, > > > > On Thu, Feb 25, 2021 at 08:19:18PM -0500, George Kennedy wrote: > > > > > > Not sure if it's the right thing to do, but added > > > "acpi_tb_find_table_address()"

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-26 Thread George Kennedy
Hi Mike, On 2/26/2021 6:17 AM, Mike Rapoport wrote: Hi George, On Thu, Feb 25, 2021 at 08:19:18PM -0500, George Kennedy wrote: Mike, To get rid of the 0xBE453000 hardcoding, I added the following patch to your above patch to get the iBFT table "address" to use with

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-26 Thread Mike Rapoport
Hi George, On Thu, Feb 25, 2021 at 08:19:18PM -0500, George Kennedy wrote: > > Mike, > > To get rid of the 0xBE453000 hardcoding, I added the following patch > to your above patch to get the iBFT table "address" to use with > memblock_reserve(): > > diff --git

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-25 Thread George Kennedy
On 2/25/2021 12:33 PM, George Kennedy wrote: On 2/25/2021 11:07 AM, Mike Rapoport wrote: On Thu, Feb 25, 2021 at 10:22:44AM -0500, George Kennedy wrote: On 2/24/2021 5:37 AM, Mike Rapoport wrote: Applied just your latest patch, but same failure. I thought there was an earlier comment

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-25 Thread Mike Rapoport
On Thu, Feb 25, 2021 at 11:31:04AM -0500, George Kennedy wrote: > > > On 2/25/2021 11:07 AM, Mike Rapoport wrote: > > On Thu, Feb 25, 2021 at 10:22:44AM -0500, George Kennedy wrote: > > > > > > > On 2/24/2021 5:37 AM, Mike Rapoport wrote: > > > Applied just your latest patch, but same failure. >

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-25 Thread Mike Rapoport
On Thu, Feb 25, 2021 at 06:23:24PM +0100, David Hildenbrand wrote: > On 25.02.21 17:31, George Kennedy wrote: > > : rsdp_address=bfbfa014 > > [    0.066612] ACPI: RSDP 0xBFBFA014 24 (v02 BOCHS ) > > [    0.067759] ACPI: XSDT 0xBFBF90E8 4C (v01 BOCHS BXPCFACP > > 0001

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-25 Thread George Kennedy
On 2/25/2021 11:07 AM, Mike Rapoport wrote: On Thu, Feb 25, 2021 at 10:22:44AM -0500, George Kennedy wrote: On 2/24/2021 5:37 AM, Mike Rapoport wrote: Applied just your latest patch, but same failure. I thought there was an earlier comment (which I can't find now) that stated that

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-25 Thread David Hildenbrand
On 25.02.21 17:31, George Kennedy wrote: : rsdp_address=bfbfa014 [    0.066612] ACPI: RSDP 0xBFBFA014 24 (v02 BOCHS ) [    0.067759] ACPI: XSDT 0xBFBF90E8 4C (v01 BOCHS BXPCFACP 0001  0113) [    0.069470] ACPI: FACP 0xBFBF5000 74 (v01 BOCHS

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-25 Thread George Kennedy
On 2/25/2021 11:07 AM, Mike Rapoport wrote: On Thu, Feb 25, 2021 at 10:22:44AM -0500, George Kennedy wrote: On 2/24/2021 5:37 AM, Mike Rapoport wrote: Applied just your latest patch, but same failure. I thought there was an earlier comment (which I can't find now) that stated that

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-25 Thread Mike Rapoport
On Thu, Feb 25, 2021 at 10:22:44AM -0500, George Kennedy wrote: > > > > > > On 2/24/2021 5:37 AM, Mike Rapoport wrote: > > Applied just your latest patch, but same failure. > > I thought there was an earlier comment (which I can't find now) that stated > that memblock_reserve() wouldn't reserve

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-25 Thread George Kennedy
On 2/25/2021 10:22 AM, George Kennedy wrote: On 2/25/2021 9:57 AM, Mike Rapoport wrote: On Thu, Feb 25, 2021 at 07:38:19AM -0500, George Kennedy wrote: On 2/25/2021 3:53 AM, Mike Rapoport wrote: Hi George, On 2/24/2021 5:37 AM, Mike Rapoport wrote: On Tue, Feb 23, 2021 at 04:46:28PM

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-25 Thread George Kennedy
On 2/25/2021 9:57 AM, Mike Rapoport wrote: On Thu, Feb 25, 2021 at 07:38:19AM -0500, George Kennedy wrote: On 2/25/2021 3:53 AM, Mike Rapoport wrote: Hi George, On 2/24/2021 5:37 AM, Mike Rapoport wrote: On Tue, Feb 23, 2021 at 04:46:28PM -0500, George Kennedy wrote: Mike, Still no

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-25 Thread Mike Rapoport
On Thu, Feb 25, 2021 at 07:38:19AM -0500, George Kennedy wrote: > On 2/25/2021 3:53 AM, Mike Rapoport wrote: > > Hi George, > > > > > On 2/24/2021 5:37 AM, Mike Rapoport wrote: > > > > On Tue, Feb 23, 2021 at 04:46:28PM -0500, George Kennedy wrote: > > > > > Mike, > > > > > > > > > > Still no

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-25 Thread George Kennedy
On 2/25/2021 3:53 AM, Mike Rapoport wrote: Hi George, On 2/24/2021 5:37 AM, Mike Rapoport wrote: On Tue, Feb 23, 2021 at 04:46:28PM -0500, George Kennedy wrote: Mike, Still no luck. [   30.193723] iscsi: registered transport (iser) [   30.195970] iBFT detected. [   30.196571] BUG:

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-25 Thread Mike Rapoport
Hi George, > On 2/24/2021 5:37 AM, Mike Rapoport wrote: > > On Tue, Feb 23, 2021 at 04:46:28PM -0500, George Kennedy wrote: > > > Mike, > > > > > > Still no luck. > > > > > > [   30.193723] iscsi: registered transport (iser) > > > [   30.195970] iBFT detected. > > > [   30.196571] BUG: unable

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-24 Thread George Kennedy
On 2/24/2021 5:37 AM, Mike Rapoport wrote: On Tue, Feb 23, 2021 at 04:46:28PM -0500, George Kennedy wrote: Mike, Still no luck. [   30.193723] iscsi: registered transport (iser) [   30.195970] iBFT detected. [   30.196571] BUG: unable to handle page fault for address: ff240004

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-24 Thread Mike Rapoport
On Tue, Feb 23, 2021 at 04:46:28PM -0500, George Kennedy wrote: > > Mike, > > Still no luck. > > [   30.193723] iscsi: registered transport (iser) > [   30.195970] iBFT detected. > [   30.196571] BUG: unable to handle page fault for address: ff240004 Hmm, we cannot set ibft_addr to

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-23 Thread George Kennedy
On 2/23/2021 4:32 PM, Mike Rapoport wrote: diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 7bdc0239a943..c118dd54a747 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -1551,6 +1551,7 @@ void __init acpi_boot_table_init(void) if

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-23 Thread Mike Rapoport
On Tue, Feb 23, 2021 at 04:16:44PM -0500, George Kennedy wrote: > > > On 2/23/2021 3:09 PM, Mike Rapoport wrote: > > On Tue, Feb 23, 2021 at 01:05:05PM -0500, George Kennedy wrote: > > > On 2/23/2021 10:47 AM, Mike Rapoport wrote: > > > > > > It now crashes here: > > > > > > [    0.051019]

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-23 Thread George Kennedy
On 2/23/2021 3:09 PM, Mike Rapoport wrote: On Tue, Feb 23, 2021 at 01:05:05PM -0500, George Kennedy wrote: On 2/23/2021 10:47 AM, Mike Rapoport wrote: It now crashes here: [    0.051019] ACPI: Early table checksum verification disabled [    0.056721] ACPI: RSDP 0xBFBFA014 24

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-23 Thread Mike Rapoport
On Tue, Feb 23, 2021 at 01:05:05PM -0500, George Kennedy wrote: > On 2/23/2021 10:47 AM, Mike Rapoport wrote: > > It now crashes here: > > [    0.051019] ACPI: Early table checksum verification disabled > [    0.056721] ACPI: RSDP 0xBFBFA014 24 (v02 BOCHS ) > [    0.057874] ACPI:

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-23 Thread George Kennedy
On 2/23/2021 10:47 AM, Mike Rapoport wrote: Hi George, On Tue, Feb 23, 2021 at 09:35:32AM -0500, George Kennedy wrote: On 2/23/2021 5:33 AM, Mike Rapoport wrote: (re-added CC) On Mon, Feb 22, 2021 at 08:24:59PM -0500, George Kennedy wrote: On 2/22/2021 4:55 PM, Mike Rapoport wrote: On

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-23 Thread Mike Rapoport
Hi George, On Tue, Feb 23, 2021 at 09:35:32AM -0500, George Kennedy wrote: > > On 2/23/2021 5:33 AM, Mike Rapoport wrote: > > (re-added CC) > > > > On Mon, Feb 22, 2021 at 08:24:59PM -0500, George Kennedy wrote: > > > On 2/22/2021 4:55 PM, Mike Rapoport wrote: > > > > On Mon, Feb 22, 2021 at

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-23 Thread Mike Rapoport
(re-added CC) On Mon, Feb 22, 2021 at 08:24:59PM -0500, George Kennedy wrote: > > On 2/22/2021 4:55 PM, Mike Rapoport wrote: > > On Mon, Feb 22, 2021 at 01:42:56PM -0500, George Kennedy wrote: > > > On 2/22/2021 11:13 AM, David Hildenbrand wrote: > > > > On 22.02.21 16:13, George Kennedy wrote:

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-22 Thread Mike Rapoport
On Mon, Feb 22, 2021 at 01:42:56PM -0500, George Kennedy wrote: > > On 2/22/2021 11:13 AM, David Hildenbrand wrote: > > On 22.02.21 16:13, George Kennedy wrote: > > > > > > On 2/22/2021 4:52 AM, David Hildenbrand wrote: > > > > > > > > Let me look into the code ... I have little experience with

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-22 Thread Mike Rapoport
On Mon, Feb 22, 2021 at 12:40:36PM -0500, Konrad Rzeszutek Wilk wrote: > On Mon, Feb 22, 2021 at 05:39:29PM +0100, David Hildenbrand wrote: > > On 22.02.21 17:13, David Hildenbrand wrote: > > > On 22.02.21 16:13, George Kennedy wrote: > > > > > > > > > > > > On 2/22/2021 4:52 AM, David

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-22 Thread George Kennedy
On 2/22/2021 11:13 AM, David Hildenbrand wrote: On 22.02.21 16:13, George Kennedy wrote: On 2/22/2021 4:52 AM, David Hildenbrand wrote: On 20.02.21 00:04, George Kennedy wrote: On 2/19/2021 11:45 AM, George Kennedy wrote: On 2/18/2021 7:09 PM, Andrey Konovalov wrote: On Fri, Feb

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-22 Thread Konrad Rzeszutek Wilk
On Mon, Feb 22, 2021 at 05:39:29PM +0100, David Hildenbrand wrote: > On 22.02.21 17:13, David Hildenbrand wrote: > > On 22.02.21 16:13, George Kennedy wrote: > > > > > > > > > On 2/22/2021 4:52 AM, David Hildenbrand wrote: > > > > On 20.02.21 00:04, George Kennedy wrote: > > > > > > > > > > >

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-22 Thread David Hildenbrand
On 22.02.21 17:13, David Hildenbrand wrote: On 22.02.21 16:13, George Kennedy wrote: On 2/22/2021 4:52 AM, David Hildenbrand wrote: On 20.02.21 00:04, George Kennedy wrote: On 2/19/2021 11:45 AM, George Kennedy wrote: On 2/18/2021 7:09 PM, Andrey Konovalov wrote: On Fri, Feb 19, 2021

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-22 Thread David Hildenbrand
On 22.02.21 16:13, George Kennedy wrote: On 2/22/2021 4:52 AM, David Hildenbrand wrote: On 20.02.21 00:04, George Kennedy wrote: On 2/19/2021 11:45 AM, George Kennedy wrote: On 2/18/2021 7:09 PM, Andrey Konovalov wrote: On Fri, Feb 19, 2021 at 1:06 AM George Kennedy wrote: On

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-22 Thread George Kennedy
On 2/22/2021 4:52 AM, David Hildenbrand wrote: On 20.02.21 00:04, George Kennedy wrote: On 2/19/2021 11:45 AM, George Kennedy wrote: On 2/18/2021 7:09 PM, Andrey Konovalov wrote: On Fri, Feb 19, 2021 at 1:06 AM George Kennedy wrote: On 2/18/2021 3:55 AM, David Hildenbrand wrote:

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-22 Thread David Hildenbrand
On 20.02.21 00:04, George Kennedy wrote: On 2/19/2021 11:45 AM, George Kennedy wrote: On 2/18/2021 7:09 PM, Andrey Konovalov wrote: On Fri, Feb 19, 2021 at 1:06 AM George Kennedy wrote: On 2/18/2021 3:55 AM, David Hildenbrand wrote: On 17.02.21 21:56, Andrey Konovalov wrote: During

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-19 Thread George Kennedy
On 2/19/2021 11:45 AM, George Kennedy wrote: On 2/18/2021 7:09 PM, Andrey Konovalov wrote: On Fri, Feb 19, 2021 at 1:06 AM George Kennedy wrote: On 2/18/2021 3:55 AM, David Hildenbrand wrote: On 17.02.21 21:56, Andrey Konovalov wrote: During boot, all non-reserved memblock memory is

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-19 Thread George Kennedy
On 2/18/2021 7:09 PM, Andrey Konovalov wrote: On Fri, Feb 19, 2021 at 1:06 AM George Kennedy wrote: On 2/18/2021 3:55 AM, David Hildenbrand wrote: On 17.02.21 21:56, Andrey Konovalov wrote: During boot, all non-reserved memblock memory is exposed to the buddy allocator. Poisoning all

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-18 Thread Andrey Konovalov
On Fri, Feb 19, 2021 at 1:06 AM George Kennedy wrote: > > > > On 2/18/2021 3:55 AM, David Hildenbrand wrote: > > On 17.02.21 21:56, Andrey Konovalov wrote: > >> During boot, all non-reserved memblock memory is exposed to the buddy > >> allocator. Poisoning all that memory with KASAN lengthens

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-18 Thread George Kennedy
On 2/18/2021 3:55 AM, David Hildenbrand wrote: On 17.02.21 21:56, Andrey Konovalov wrote: During boot, all non-reserved memblock memory is exposed to the buddy allocator. Poisoning all that memory with KASAN lengthens boot time, especially on systems with large amount of RAM. This patch

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-18 Thread Andrey Konovalov
On Thu, Feb 18, 2021 at 8:46 PM David Hildenbrand wrote: > > > 1. For KASAN_GENERIC: leave everything as is to be able to detect > > these boot-time bugs. > > > > 2. For KASAN_SW_TAGS: remove boot-time poisoning via > > kasan_free_pages(), but use the "invalid" tag as the default shadow > >

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-18 Thread David Hildenbrand
On 18.02.21 20:40, Andrey Konovalov wrote: On Thu, Feb 18, 2021 at 9:55 AM David Hildenbrand wrote: On 17.02.21 21:56, Andrey Konovalov wrote: During boot, all non-reserved memblock memory is exposed to the buddy allocator. Poisoning all that memory with KASAN lengthens boot time, especially

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-18 Thread Andrey Konovalov
On Thu, Feb 18, 2021 at 9:55 AM David Hildenbrand wrote: > > On 17.02.21 21:56, Andrey Konovalov wrote: > > During boot, all non-reserved memblock memory is exposed to the buddy > > allocator. Poisoning all that memory with KASAN lengthens boot time, > > especially on systems with large amount of

Re: [PATCH] mm, kasan: don't poison boot memory

2021-02-18 Thread David Hildenbrand
On 17.02.21 21:56, Andrey Konovalov wrote: During boot, all non-reserved memblock memory is exposed to the buddy allocator. Poisoning all that memory with KASAN lengthens boot time, especially on systems with large amount of RAM. This patch makes page_alloc to not call kasan_free_pages() on all

[PATCH] mm, kasan: don't poison boot memory

2021-02-17 Thread Andrey Konovalov
During boot, all non-reserved memblock memory is exposed to the buddy allocator. Poisoning all that memory with KASAN lengthens boot time, especially on systems with large amount of RAM. This patch makes page_alloc to not call kasan_free_pages() on all new memory. __free_pages_core() is used when