Re: [EXTERNAL] [RFC PATCH] powernv/eeh: Fix oops when probing cxl devices

2019-10-15 Thread Frederic Barrat
Le 15/10/2019 à 07:42, Sam Bobroff a écrit : On Fri, Sep 27, 2019 at 02:45:10PM +0200, Frederic Barrat wrote: Recent cleanup in the way EEH support is added to a device causes a kernel oops when the cxl driver probes a device and creates virtual devices discovered on the FPGA: BUG:

Re: [PATCH v5 03/23] PCI: hotplug: Add a flag for the movable BARs feature

2019-10-15 Thread Bjorn Helgaas
On Mon, Sep 30, 2019 at 03:59:25PM +0300, Sergey Miroshnichenko wrote: > Hello Bjorn, > > On 9/28/19 1:02 AM, Bjorn Helgaas wrote: > > On Fri, Aug 16, 2019 at 07:50:41PM +0300, Sergey Miroshnichenko wrote: > > > When hot-adding a device, the bridge may have windows not big enough (or > > >

Re: [PATCH V6 0/2] mm/debug: Add tests validating architecture page table helpers

2019-10-15 Thread Qian Cai
8549][T1] [ cut here ] > [ 13.898549][T1] kernel BUG at ./include/linux/mm.h:1107! > [ 13.898549][T1] invalid opcode: [#1] SMP DEBUG_PAGEALLOC KASAN PTI > [ 13.898549][T1] CPU: 0 PID: 1 Comm: swapper/0 Not tainted > 5.4.0-rc3-next-20191015+ #

[PATCH 03/34] powerpc: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
From: Thomas Gleixner CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the entry code over to use CONFIG_PREEMPTION. Add PREEMPT_RT output in __die(). Cc: Benjamin

Re: [PATCH V6 0/2] mm/debug: Add tests validating architecture page table helpers

2019-10-15 Thread Anshuman Khandual
_BUG_ON_PAGE(PagePoisoned(p)) [ 13.898549][T1] [ cut here ] [ 13.898549][T1] kernel BUG at ./include/linux/mm.h:1107! [ 13.898549][T1] invalid opcode: [#1] SMP DEBUG_PAGEALLOC KASAN PTI [ 13.898549][T1] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.0-rc3-next-20191015+ #

Re: [PATCH v2 01/29] powerpc: Rename "notes" PT_NOTE to "note"

2019-10-15 Thread Kees Cook
On Tue, Oct 15, 2019 at 06:54:13PM +0200, Borislav Petkov wrote: > On Fri, Oct 11, 2019 at 11:25:52AM -0500, Segher Boessenkool wrote: > > Names *matter*, internal names doubly so. So why replace a good name with > > a worse name? Because it is slightly less work for you? > > So if we agree on

Re: [PATCH v2 01/29] powerpc: Rename "notes" PT_NOTE to "note"

2019-10-15 Thread Borislav Petkov
On Fri, Oct 11, 2019 at 11:25:52AM -0500, Segher Boessenkool wrote: > Names *matter*, internal names doubly so. So why replace a good name with > a worse name? Because it is slightly less work for you? So if we agree on the name "notes" and we decide to rename the other arches, this should all

Re: [PATCH V6 2/2] mm/debug: Add tests validating architecture page table helpers

2019-10-15 Thread Qian Cai
On Tue, 2019-10-15 at 14:51 +0530, Anshuman Khandual wrote: > +static unsigned long __init get_random_vaddr(void) > +{ > + unsigned long random_vaddr, random_pages, total_user_pages; > + > + total_user_pages = (TASK_SIZE - FIRST_USER_ADDRESS) / PAGE_SIZE; > + > + random_pages =

[Bug 205201] New: Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M

2019-10-15 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205201 Bug ID: 205201 Summary: Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M Product: Platform Specific/Hardware Version: 2.5 Kernel

Re: [PATCH] xfs: introduce "metasync" api to sync metadata to fsblock

2019-10-15 Thread Darrick J. Wong
On Tue, Oct 15, 2019 at 09:10:04AM -0400, Theodore Y. Ts'o wrote: > On Tue, Oct 15, 2019 at 01:01:02AM -0700, Christoph Hellwig wrote: > > On Mon, Oct 14, 2019 at 03:09:48PM -0500, Eric Sandeen wrote: > > > We're in agreement here. ;) I only worry about implementing things like > > > this > > >

Re: [PATCH V6 0/2] mm/debug: Add tests validating architecture page table helpers

2019-10-15 Thread Qian Cai
The x86 will crash with linux-next during boot due to this series (v5) with the config below plus CONFIG_DEBUG_VM_PGTABLE=y. I am not sure if v6 would address it. https://raw.githubusercontent.com/cailca/linux-mm/master/x86.config [   33.862600][T1] page:ea000900 is uninitialized and

Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-10-15 Thread Greg KH
On Tue, Oct 15, 2019 at 06:40:29PM +0800, Yunsheng Lin wrote: > On 2019/10/14 17:25, Greg KH wrote: > > On Mon, Oct 14, 2019 at 04:00:46PM +0800, Yunsheng Lin wrote: > >> On 2019/10/12 18:47, Greg KH wrote: > >>> On Sat, Oct 12, 2019 at 12:40:01PM +0200, Greg KH wrote: > On Sat, Oct 12, 2019

Re: [PATCH RFC 0/5] ARM: Raspberry Pi 4 DMA support

2019-10-15 Thread Catalin Marinas
On Tue, Oct 15, 2019 at 09:48:22AM +0200, Nicolas Saenz Julienne wrote: > A little off topic but I was wondering if you have a preferred way to refer to > the arm architecture in a way that it unambiguously excludes arm64 (for > example > arm32 would work). arm32 should be fine. Neither arm64

Re: [PATCH 03/34] powerpc: Use CONFIG_PREEMPTION

2019-10-15 Thread Christophe Leroy
Le 15/10/2019 à 21:17, Sebastian Andrzej Siewior a écrit : From: Thomas Gleixner CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the entry code over to use

Re: [PATCH] powerpc/eeh: Only dump stack once if an MMIO loop is detected

2019-10-15 Thread Sam Bobroff
On Wed, Oct 16, 2019 at 12:25:36PM +1100, Oliver O'Halloran wrote: > Many drivers don't check for errors when they get a 0xFFs response from an > MMIO load. As a result after an EEH event occurs a driver can get stuck in > a polling loop unless it some kind of internal timeout logic. > >

[PATCH] powerpc/mm/book3s64/hash: Update 4k PAGE_SIZE kernel mapping

2019-10-15 Thread Aneesh Kumar K.V
With commit: 0034d395f89d ("powerpc/mm/hash64: Map all the kernel regions in the same 0xc range"), kernel now split the 64TB address range into 4 contexts each of 16TB. That implies we can do only 16TB linear mapping. This results in boot failure on some P9 systems. Fix this by redoing the hash

[PATCH] powerpc/eeh: Only dump stack once if an MMIO loop is detected

2019-10-15 Thread Oliver O'Halloran
Many drivers don't check for errors when they get a 0xFFs response from an MMIO load. As a result after an EEH event occurs a driver can get stuck in a polling loop unless it some kind of internal timeout logic. Currently EEH tries to detect and report stuck drivers by dumping a stack trace after

Re: [PATCH v8 1/5] kasan: support backing vmalloc space with real shadow memory

2019-10-15 Thread Daniel Axtens
Mark Rutland writes: > On Tue, Oct 01, 2019 at 04:58:30PM +1000, Daniel Axtens wrote: >> Hook into vmalloc and vmap, and dynamically allocate real shadow >> memory to back the mappings. >> >> Most mappings in vmalloc space are small, requiring less than a full >> page of shadow space.

Re: [PATCH v8 1/5] kasan: support backing vmalloc space with real shadow memory

2019-10-15 Thread Daniel Axtens
>>> @@ -2497,6 +2533,9 @@ void *__vmalloc_node_range(unsigned long size, >>> unsigned long align, >>> if (!addr) >>> return NULL; >>> >>> + if (kasan_populate_vmalloc(real_size, area)) >>> + return NULL; >>> + >> >> KASAN itself uses __vmalloc_node_range() to

Re: [PATCH v8 1/5] kasan: support backing vmalloc space with real shadow memory

2019-10-15 Thread Daniel Axtens
> There is a potential problem here, as Will Deacon wrote up at: > > > https://lore.kernel.org/linux-arm-kernel/20190827131818.14724-1-w...@kernel.org/ > > ... in the section starting: > > | *** Other architecture maintainers -- start here! *** > > ... whereby the CPU can spuriously fault on

Re: [PATCH RFC 0/5] ARM: Raspberry Pi 4 DMA support

2019-10-15 Thread Nicolas Saenz Julienne
On Mon, 2019-10-14 at 21:59 +0100, Catalin Marinas wrote: > On Mon, Oct 14, 2019 at 08:31:02PM +0200, Nicolas Saenz Julienne wrote: > > the Raspberry Pi 4 offers up to 4GB of memory, of which only the first > > is DMA capable device wide. This forces us to use of bounce buffers, > > which are

Re: [PATCH] xfs: introduce "metasync" api to sync metadata to fsblock

2019-10-15 Thread Christoph Hellwig
On Tue, Oct 15, 2019 at 09:56:20AM +0800, Pingfan Liu wrote: > Agree. For the consistency of the whole fs, we need grub to be aware of > log. While this patch just assumes that files accessed by grub are > known, and the consistency is forced only on these files. > > get by freezing and unfreezing

Re: [PATCH v4 1/4] powerpc/powernv: Add OPAL API interface to access secure variable

2019-10-15 Thread Oliver O'Halloran
On Tue, 2019-10-01 at 19:41 -0400, Nayna Jain wrote: > The X.509 certificates trusted by the platform and required to secure boot > the OS kernel are wrapped in secure variables, which are controlled by > OPAL. > > This patch adds firmware/kernel interface to read and write OPAL secure >

RE: [PATCH 1/2] dma-mapping: Add dma_addr_is_phys_addr()

2019-10-15 Thread Ram Pai
On Mon, Oct 14, 2019 at 11:29:24AM +0100, Robin Murphy wrote: > On 14/10/2019 05:51, David Gibson wrote: > >On Fri, Oct 11, 2019 at 06:25:18PM -0700, Ram Pai wrote: > >>From: Thiago Jung Bauermann > >> > >>In order to safely use the DMA API, virtio needs to know whether DMA > >>addresses are in

[PATCH V6 1/2] mm/page_alloc: Make alloc_gigantic_page() available for general use

2019-10-15 Thread Anshuman Khandual
alloc_gigantic_page() implements an allocation method where it scans over various zones looking for a large contiguous memory block which could not have been allocated through the buddy allocator. A subsequent patch which tests arch page table helpers needs such a method to allocate PUD_SIZE sized

Re: [PATCH 1/2] dma-mapping: Add dma_addr_is_phys_addr()

2019-10-15 Thread Christoph Hellwig
On Mon, Oct 14, 2019 at 11:29:24AM +0100, Robin Murphy wrote: >> However, I would like to see the commit message (and maybe the inline >> comments) expanded a bit on what the distinction here is about. Some >> of the text from the next patch would be suitable, about DMA addresses >> usually being

Re: [PATCH 2/2] virtio_ring: Use DMA API if memory is encrypted

2019-10-15 Thread Christoph Hellwig
On Fri, Oct 11, 2019 at 06:25:19PM -0700, Ram Pai wrote: > From: Thiago Jung Bauermann > > Normally, virtio enables DMA API with VIRTIO_F_IOMMU_PLATFORM, which must > be set by both device and guest driver. However, as a hack, when DMA API > returns physical addresses, guest driver can use the

[PATCH V6 2/2] mm/debug: Add tests validating architecture page table helpers

2019-10-15 Thread Anshuman Khandual
This adds tests which will validate architecture page table helpers and other accessors in their compliance with expected generic MM semantics. This will help various architectures in validating changes to existing page table helpers or addition of new ones. Test page table and memory pages

Re: [PATCH] xfs: introduce "metasync" api to sync metadata to fsblock

2019-10-15 Thread Christoph Hellwig
On Mon, Oct 14, 2019 at 03:09:48PM -0500, Eric Sandeen wrote: > We're in agreement here. ;) I only worry about implementing things like this > which sound like guarantees, but aren't, and end up encouraging bad behavior > or promoting misconceptions. > > More and more, I think we should

Re: [PATCH v4 2/4] powerpc: expose secure variables to userspace via sysfs

2019-10-15 Thread Oliver O'Halloran
On Tue, 2019-10-01 at 19:41 -0400, Nayna Jain wrote: > PowerNV secure variables, which store the keys used for OS kernel > verification, are managed by the firmware. These secure variables need to > be accessed by the userspace for addition/deletion of the certificates. > > This patch adds the

[PATCH V6 0/2] mm/debug: Add tests validating architecture page table helpers

2019-10-15 Thread Anshuman Khandual
This series adds a test validation for architecture exported page table helpers. Patch in the series adds basic transformation tests at various levels of the page table. Before that it exports gigantic page allocation function from HugeTLB. This test was originally suggested by Catalin during

Re: [PATCH v7 3/8] powerpc: detect the trusted boot state of the system

2019-10-15 Thread Michael Ellerman
Nayna Jain writes: > PowerNV systems enables the IMA measurement rules only if the > trusted boot is enabled on the system. That confused me a lot. But the key is the distinction between appraisal rules vs measurement rules, right? I think it would be clearer if it was phrased as a positive

Re: [PATCH V6 1/2] mm/page_alloc: Make alloc_gigantic_page() available for general use

2019-10-15 Thread Michal Hocko
On Tue 15-10-19 14:51:41, Anshuman Khandual wrote: [...] > +/** > + * alloc_gigantic_page_order() -- tries to allocate given order of pages > + * @order: allocation order (greater than MAX_ORDER) > + * @gfp_mask:GFP mask to use during compaction > + * @nid: allocation node > + *

Re: [PATCH V6 1/2] mm/page_alloc: Make alloc_gigantic_page() available for general use

2019-10-15 Thread Anshuman Khandual
On 10/15/2019 04:15 PM, Michal Hocko wrote: > On Tue 15-10-19 14:51:41, Anshuman Khandual wrote: > [...] >> +/** >> + * alloc_gigantic_page_order() -- tries to allocate given order of pages >> + * @order: allocation order (greater than MAX_ORDER) >> + * @gfp_mask: GFP mask to use during

Re: [PATCH v7 4/8] powerpc/ima: add measurement rules to ima arch specific policy

2019-10-15 Thread Michael Ellerman
Nayna Jain writes: > This patch adds the measurement rules to the arch specific policies on > trusted boot enabled systems. > > Signed-off-by: Nayna Jain > Reviewed-by: Mimi Zohar > --- > arch/powerpc/kernel/ima_arch.c | 45 +++--- > 1 file changed, 42

Re: [PATCH v7 1/8] powerpc: detect the secure boot mode of the system

2019-10-15 Thread Michael Ellerman
Hi Nayna, Just a few comments. Nayna Jain writes: > Secure boot on PowerNV defines different IMA policies based on the secure > boot state of the system. This description has got out of sync with what the patch does I think. There's no IMA in here. I think you can just drop that sentence. >

Re: [PATCH V6 1/2] mm/page_alloc: Make alloc_gigantic_page() available for general use

2019-10-15 Thread David Hildenbrand
On 15.10.19 11:21, Anshuman Khandual wrote: alloc_gigantic_page() implements an allocation method where it scans over various zones looking for a large contiguous memory block which could not have been allocated through the buddy allocator. A subsequent patch which tests arch page table helpers

Re: [PATCH V6 1/2] mm/page_alloc: Make alloc_gigantic_page() available for general use

2019-10-15 Thread Michal Hocko
On Tue 15-10-19 13:42:03, David Hildenbrand wrote: [...] > > -static bool pfn_range_valid_gigantic(struct zone *z, > > - unsigned long start_pfn, unsigned long nr_pages) > > -{ > > - unsigned long i, end_pfn = start_pfn + nr_pages; > > - struct page *page; > > - > > - for

Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-10-15 Thread Yunsheng Lin
On 2019/10/14 17:25, Greg KH wrote: > On Mon, Oct 14, 2019 at 04:00:46PM +0800, Yunsheng Lin wrote: >> On 2019/10/12 18:47, Greg KH wrote: >>> On Sat, Oct 12, 2019 at 12:40:01PM +0200, Greg KH wrote: On Sat, Oct 12, 2019 at 05:47:56PM +0800, Yunsheng Lin wrote: > On 2019/10/12 15:40, Greg

Re: [PATCH v7 2/8] powerpc: add support to initialize ima policy rules

2019-10-15 Thread Michael Ellerman
Nayna Jain writes: > PowerNV systems uses kernel based bootloader, thus its secure boot > implementation uses kernel IMA security subsystem to verify the kernel > before kexec. Since the verification policy might differ based on the > secure boot mode of the system, the policies are defined at

Re: [PATCH V6 2/2] mm/debug: Add tests validating architecture page table helpers

2019-10-15 Thread Michal Hocko
On Tue 15-10-19 14:51:42, Anshuman Khandual wrote: > This adds tests which will validate architecture page table helpers and > other accessors in their compliance with expected generic MM semantics. > This will help various architectures in validating changes to existing > page table helpers or

Re: [PATCH V6 1/2] mm/page_alloc: Make alloc_gigantic_page() available for general use

2019-10-15 Thread David Hildenbrand
On 15.10.19 13:47, Michal Hocko wrote: On Tue 15-10-19 13:42:03, David Hildenbrand wrote: [...] -static bool pfn_range_valid_gigantic(struct zone *z, - unsigned long start_pfn, unsigned long nr_pages) -{ - unsigned long i, end_pfn = start_pfn + nr_pages; -

Re: [PATCH v7 2/8] powerpc: add support to initialize ima policy rules

2019-10-15 Thread Michael Ellerman
Mimi Zohar writes: > On Mon, 2019-10-07 at 21:14 -0400, Nayna Jain wrote: ... >> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig >> index b4a221886fcf..deb19ec6ba3d 100644 >> --- a/arch/powerpc/Kconfig >> +++ b/arch/powerpc/Kconfig >> @@ -938,6 +938,8 @@ config PPC_SECURE_BOOT >>

Re: [PATCH v2 0/3] crypto: powerpc - convert SPE AES algorithms to skcipher API

2019-10-15 Thread Ard Biesheuvel
On Tue, 15 Oct 2019 at 04:45, Eric Biggers wrote: > > This series converts the glue code for the PowerPC SPE implementations > of AES-ECB, AES-CBC, AES-CTR, and AES-XTS from the deprecated > "blkcipher" API to the "skcipher" API. This is needed in order for the > blkcipher API to be removed. > >

Re: [PATCH V6 1/2] mm/page_alloc: Make alloc_gigantic_page() available for general use

2019-10-15 Thread David Hildenbrand
On 15.10.19 13:50, David Hildenbrand wrote: On 15.10.19 13:47, Michal Hocko wrote: On Tue 15-10-19 13:42:03, David Hildenbrand wrote: [...] -static bool pfn_range_valid_gigantic(struct zone *z, - unsigned long start_pfn, unsigned long nr_pages) -{ - unsigned long i,

Re: [PATCH V6 1/2] mm/page_alloc: Make alloc_gigantic_page() available for general use

2019-10-15 Thread Michal Hocko
On Tue 15-10-19 13:50:02, David Hildenbrand wrote: > On 15.10.19 13:47, Michal Hocko wrote: > > On Tue 15-10-19 13:42:03, David Hildenbrand wrote: > > [...] > > > > -static bool pfn_range_valid_gigantic(struct zone *z, > > > > - unsigned long start_pfn, unsigned long

Re: [PATCH V6 2/2] mm/debug: Add tests validating architecture page table helpers

2019-10-15 Thread Anshuman Khandual
On 10/15/2019 05:16 PM, Michal Hocko wrote: > On Tue 15-10-19 14:51:42, Anshuman Khandual wrote: >> This adds tests which will validate architecture page table helpers and >> other accessors in their compliance with expected generic MM semantics. >> This will help various architectures in

Re: [PATCH] xfs: introduce "metasync" api to sync metadata to fsblock

2019-10-15 Thread Theodore Y. Ts'o
On Tue, Oct 15, 2019 at 01:01:02AM -0700, Christoph Hellwig wrote: > On Mon, Oct 14, 2019 at 03:09:48PM -0500, Eric Sandeen wrote: > > We're in agreement here. ;) I only worry about implementing things like > > this > > which sound like guarantees, but aren't, and end up encouraging bad

Re: [PATCH V6 1/2] mm/page_alloc: Make alloc_gigantic_page() available for general use

2019-10-15 Thread Michal Hocko
On Tue 15-10-19 14:09:56, Michal Hocko wrote: > On Tue 15-10-19 13:50:02, David Hildenbrand wrote: > > On 15.10.19 13:47, Michal Hocko wrote: > > > On Tue 15-10-19 13:42:03, David Hildenbrand wrote: > > > [...] > > > > > -static bool pfn_range_valid_gigantic(struct zone *z, > > > > > -