Re: [PATCH v2 08/17] kunit: test: add support for test abort

2019-05-06 Thread Brendan Higgins
On Fri, May 3, 2019 at 5:33 AM Logan Gunthorpe wrote: > > > > On 2019-05-03 12:48 a.m., Brendan Higgins wrote: > > On Thu, May 2, 2019 at 8:15 PM Logan Gunthorpe wrote: > >> On 2019-05-01 5:01 p.m., Brendan Higgins wrote: > >>> +/* > >>> + * struct kunit_try_catch - provides a generic way to run

Re: [PATCH v2 11/17] kunit: test: add test managed resource tests

2019-05-06 Thread Brendan Higgins
On Fri, May 3, 2019 at 7:34 AM shuah wrote: > > On 5/1/19 5:01 PM, Brendan Higgins wrote: > > From: Avinash Kondareddy > > > > Tests how tests interact with test managed resources in their lifetime. > > > > Signed-off-by: Avinash Kondareddy > > Signed-off-by: Brendan Higgins > > --- > > I think

Re: [PATCH v2 15/17] MAINTAINERS: add entry for KUnit the unit testing framework

2019-05-06 Thread Brendan Higgins
On Fri, May 3, 2019 at 7:38 AM shuah wrote: > > On 5/1/19 5:01 PM, Brendan Higgins wrote: > > Add myself as maintainer of KUnit, the Linux kernel's unit testing > > framework. > > > > Signed-off-by: Brendan Higgins > > --- > > MAINTAINERS | 10 ++ > > 1 file changed, 10 insertions(+) >

李总:如何业绩倍增,业务拓展不再难

2019-05-06 Thread 李总
原邮件信息 - 发件人:李总 收件人:linux-nvdimm 发送时间:2019-5-6 19:16:29 ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH v2 12/17] kunit: tool: add Python wrappers for running KUnit tests

2019-05-06 Thread Kees Cook
On Sun, May 5, 2019 at 5:19 PM Frank Rowand wrote: > You can see the full version 14 document in the submitter's repo: > > $ git clone https://github.com/isaacs/testanything.github.io.git > $ cd testanything.github.io > $ git checkout tap14 > $ ls tap-version-14-specification.md > > My und

Re: [v5 2/3] mm/hotplug: make remove_memory() interface useable

2019-05-06 Thread Dave Hansen
> -static inline void remove_memory(int nid, u64 start, u64 size) {} > +static inline bool remove_memory(int nid, u64 start, u64 size) > +{ > + return -EBUSY; > +} This seems like an appropriate place for a WARN_ONCE(), if someone manages to call remove_memory() with hotplug disabled. BTW, I

Re: [v5 2/3] mm/hotplug: make remove_memory() interface useable

2019-05-06 Thread Dave Hansen
On 5/6/19 11:01 AM, Dan Williams wrote: >>> +void __remove_memory(int nid, u64 start, u64 size) >>> { >>> + >>> + /* >>> + * trigger BUG() is some memory is not offlined prior to calling this >>> + * function >>> + */ >>> + if (try_remove_memory(nid, start, size)) >>> +

Re: [v5 2/3] mm/hotplug: make remove_memory() interface useable

2019-05-06 Thread Dan Williams
On Mon, May 6, 2019 at 10:57 AM Dave Hansen wrote: > > > -static inline void remove_memory(int nid, u64 start, u64 size) {} > > +static inline bool remove_memory(int nid, u64 start, u64 size) > > +{ > > + return -EBUSY; > > +} > > This seems like an appropriate place for a WARN_ONCE(), if some

Re: [v5 2/3] mm/hotplug: make remove_memory() interface useable

2019-05-06 Thread Pavel Tatashin
On Mon, May 6, 2019 at 2:04 PM Dave Hansen wrote: > > On 5/6/19 11:01 AM, Dan Williams wrote: > >>> +void __remove_memory(int nid, u64 start, u64 size) > >>> { > >>> + > >>> + /* > >>> + * trigger BUG() is some memory is not offlined prior to calling > >>> this > >>> + * function >

Re: [v5 2/3] mm/hotplug: make remove_memory() interface useable

2019-05-06 Thread Pavel Tatashin
On Mon, May 6, 2019 at 1:57 PM Dave Hansen wrote: > > > -static inline void remove_memory(int nid, u64 start, u64 size) {} > > +static inline bool remove_memory(int nid, u64 start, u64 size) > > +{ > > + return -EBUSY; > > +} > > This seems like an appropriate place for a WARN_ONCE(), if someo

Re: [PATCH v2 12/17] kunit: tool: add Python wrappers for running KUnit tests

2019-05-06 Thread Brendan Higgins
> On 5/3/19 4:14 PM, Brendan Higgins wrote: > >> On 5/2/19 10:36 PM, Brendan Higgins wrote: > >>> On Thu, May 2, 2019 at 6:45 PM Frank Rowand > >>> wrote: > > On 5/2/19 4:45 PM, Brendan Higgins wrote: > > On Thu, May 2, 2019 at 2:16 PM Frank Rowand > > wrote: > >> > >>

Re: [PATCH v2 12/17] kunit: tool: add Python wrappers for running KUnit tests

2019-05-06 Thread Brendan Higgins
> On Sun, May 5, 2019 at 5:19 PM Frank Rowand wrote: > > You can see the full version 14 document in the submitter's repo: > > > > $ git clone https://github.com/isaacs/testanything.github.io.git > > $ cd testanything.github.io > > $ git checkout tap14 > > $ ls tap-version-14-specification

Re: [ndctl PATCH 0/8] daxctl: add a new reconfigure-device command

2019-05-06 Thread Dave Hansen
This all looks quite nice to me. Thanks, Vishal! One minor nit: for those of us new to daxctl and friends, they can be a bit hard to get started with. Could you maybe add a few example invocations to the Documentation, or even this cover letter to help us newbies get started? ___

Re: [ndctl PATCH 0/8] daxctl: add a new reconfigure-device command

2019-05-06 Thread Verma, Vishal L
On Mon, 2019-05-06 at 14:50 -0700, Dave Hansen wrote: > This all looks quite nice to me. Thanks, Vishal! > > One minor nit: for those of us new to daxctl and friends, they can be > a > bit hard to get started with. Could you maybe add a few example > invocations to the Documentation, or even thi

Re: [ndctl PATCH 0/8] daxctl: add a new reconfigure-device command

2019-05-06 Thread Verma, Vishal L
On Mon, 2019-05-06 at 22:14 +, Verma, Vishal L wrote: > On Mon, 2019-05-06 at 14:50 -0700, Dave Hansen wrote: > > This all looks quite nice to me. Thanks, Vishal! > > > > One minor nit: for those of us new to daxctl and friends, they can > > be > > a > > bit hard to get started with. Could

[PATCH v8 05/12] mm/sparsemem: Convert kmalloc_section_memmap() to populate_section_memmap()

2019-05-06 Thread Dan Williams
Allow sub-section sized ranges to be added to the memmap. populate_section_memmap() takes an explict pfn range rather than assuming a full section, and those parameters are plumbed all the way through to vmmemap_populate(). There should be no sub-section usage in current deployments. New warnings a

[PATCH v8 04/12] mm/hotplug: Prepare shrink_{zone, pgdat}_span for sub-section removal

2019-05-06 Thread Dan Williams
Sub-section hotplug support reduces the unit of operation of hotplug from section-sized-units (PAGES_PER_SECTION) to sub-section-sized units (PAGES_PER_SUBSECTION). Teach shrink_{zone,pgdat}_span() to consider PAGES_PER_SUBSECTION boundaries as the points where pfn_valid(), not valid_section(), can

[PATCH v8 02/12] mm/memremap: Rename and consolidate SECTION_SIZE

2019-05-06 Thread Dan Williams
From: Robin Murphy Trying to activate ZONE_DEVICE for arm64 reveals that memremap's internal helpers for sparsemem sections conflict with and arm64's definitions for hugepages, which inherit the name of "sections" from earlier versions of the ARM architecture. Disambiguate memremap (and now HMM

[PATCH v8 01/12] mm/sparsemem: Introduce struct mem_section_usage

2019-05-06 Thread Dan Williams
Towards enabling memory hotplug to track partial population of a section, introduce 'struct mem_section_usage'. A pointer to a 'struct mem_section_usage' instance replaces the existing pointer to a 'pageblock_flags' bitmap. Effectively it adds one more 'unsigned long' beyond the 'pageblock_flags'

[PATCH v8 03/12] mm/sparsemem: Add helpers track active portions of a section at boot

2019-05-06 Thread Dan Williams
Prepare for hot{plug,remove} of sub-ranges of a section by tracking a sub-section active bitmask, each bit representing a PMD_SIZE span of the architecture's memory hotplug section size. The implications of a partially populated section is that pfn_valid() needs to go beyond a valid_section() chec

[PATCH v8 00/12] mm: Sub-section memory hotplug support

2019-05-06 Thread Dan Williams
Changes since v7 [1]: - Make subsection helpers pfn based rather than physical-address based (Oscar and Pavel) - Make subsection bitmap definition scalable for different section and sub-section sizes across architectures. As a result: unsigned long map_active ...is converted to:

[PATCH v8 06/12] mm/hotplug: Kill is_dev_zone() usage in __remove_pages()

2019-05-06 Thread Dan Williams
The zone type check was a leftover from the cleanup that plumbed altmap through the memory hotplug path, i.e. commit da024512a1fa "mm: pass the vmem_altmap to arch_remove_memory and __remove_pages". Cc: Michal Hocko Cc: Logan Gunthorpe Cc: Pavel Tatashin Reviewed-by: David Hildenbrand Reviewed

[PATCH v8 08/12] mm/sparsemem: Prepare for sub-section ranges

2019-05-06 Thread Dan Williams
Prepare the memory hot-{add,remove} paths for handling sub-section ranges by plumbing the starting page frame and number of pages being handled through arch_{add,remove}_memory() to sparse_{add,remove}_one_section(). This is simply plumbing, small cleanups, and some identifier renames. No intended

[PATCH v8 07/12] mm: Kill is_dev_zone() helper

2019-05-06 Thread Dan Williams
Given there are no more usages of is_dev_zone() outside of 'ifdef CONFIG_ZONE_DEVICE' protection, kill off the compilation helper. Cc: Michal Hocko Cc: Logan Gunthorpe Acked-by: David Hildenbrand Reviewed-by: Oscar Salvador Reviewed-by: Pavel Tatashin Signed-off-by: Dan Williams --- include

[PATCH v8 10/12] mm/devm_memremap_pages: Enable sub-section remap

2019-05-06 Thread Dan Williams
Teach devm_memremap_pages() about the new sub-section capabilities of arch_{add,remove}_memory(). Effectively, just replace all usage of align_start, align_end, and align_size with res->start, res->end, and resource_size(res). The existing sanity check will still make sure that the two separate rem

[PATCH v8 12/12] libnvdimm/pfn: Stop padding pmem namespaces to section alignment

2019-05-06 Thread Dan Williams
Now that the mm core supports section-unaligned hotplug of ZONE_DEVICE memory, we no longer need to add padding at pfn/dax device creation time. The kernel will still honor padding established by older kernels. Reported-by: Jeff Moyer Signed-off-by: Dan Williams --- drivers/nvdimm/pfn.h |

[PATCH v8 11/12] libnvdimm/pfn: Fix fsdax-mode namespace info-block zero-fields

2019-05-06 Thread Dan Williams
At namespace creation time there is the potential for the "expected to be zero" fields of a 'pfn' info-block to be filled with indeterminate data. While the kernel buffer is zeroed on allocation it is immediately overwritten by nd_pfn_validate() filling it with the current contents of the on-media

[PATCH v8 09/12] mm/sparsemem: Support sub-section hotplug

2019-05-06 Thread Dan Williams
The libnvdimm sub-system has suffered a series of hacks and broken workarounds for the memory-hotplug implementation's awkward section-aligned (128MB) granularity. For example the following backtrace is emitted when attempting arch_add_memory() with physical address ranges that intersect 'System RA

Re: [PATCH v2 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework

2019-05-06 Thread Frank Rowand
On 5/1/19 4:01 PM, Brendan Higgins wrote: > ## TLDR > > I rebased the last patchset on 5.1-rc7 in hopes that we can get this in > 5.2. > > Shuah, I think you, Greg KH, and myself talked off thread, and we agreed > we would merge through your tree when the time came? Am I remembering > correctly?

[PATCH AUTOSEL 5.0 05/99] libnvdimm/namespace: Fix a potential NULL pointer dereference

2019-05-06 Thread Sasha Levin
From: Kangjie Lu [ Upstream commit 55c1fc0af29a6c1b92f217b7eb7581a882e0c07c ] In case kmemdup fails, the fix goes to blk_err to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Signed-off-by: Dan Williams Signed-off-by: Sasha Levin --- drivers/nvdimm/namespace_devs.c | 5 - 1 f

[PATCH AUTOSEL 5.0 16/99] libnvdimm/security: provide fix for secure-erase to use zero-key

2019-05-06 Thread Sasha Levin
From: Dave Jiang [ Upstream commit 037c8489ade669e0f09ad40d5b91e5e1159a14b1 ] Add a zero key in order to standardize hardware that want a key of 0's to be passed. Some platforms defaults to a zero-key with security enabled rather than allow the OS to enable the security. The zero key would allow

[PATCH AUTOSEL 5.0 09/99] libnvdimm/btt: Fix a kmemdup failure check

2019-05-06 Thread Sasha Levin
From: Aditya Pakki [ Upstream commit 486fa92df4707b5df58d6508728bdb9321a59766 ] In case kmemdup fails, the fix releases resources and returns to avoid the NULL pointer dereference. Signed-off-by: Aditya Pakki Signed-off-by: Dan Williams Signed-off-by: Sasha Levin --- drivers/nvdimm/btt_devs

[PATCH AUTOSEL 5.0 04/99] acpi/nfit: Always dump _DSM output payload

2019-05-06 Thread Sasha Levin
From: Dan Williams [ Upstream commit 351f339faa308c1c1461314a18c832239a841ca0 ] The dynamic-debug statements for command payload output only get emitted when the command is not ND_CMD_CALL. Move the output payload dumping ahead of the early return path for ND_CMD_CALL. Fixes: 31eca76ba2fc9 ("..

[PATCH AUTOSEL 5.0 18/99] libnvdimm/pmem: fix a possible OOB access when read and write pmem

2019-05-06 Thread Sasha Levin
From: Li RongQing [ Upstream commit 9dc6488e84b0f64df17672271664752488cd6a25 ] If offset is not zero and length is bigger than PAGE_SIZE, this will cause to out of boundary access to a page memory Fixes: 98cc093cba1e ("block, THP: make block_device_operations.rw_page support THP") Co-developed

[PATCH AUTOSEL 4.19 09/81] libnvdimm/btt: Fix a kmemdup failure check

2019-05-06 Thread Sasha Levin
From: Aditya Pakki [ Upstream commit 486fa92df4707b5df58d6508728bdb9321a59766 ] In case kmemdup fails, the fix releases resources and returns to avoid the NULL pointer dereference. Signed-off-by: Aditya Pakki Signed-off-by: Dan Williams Signed-off-by: Sasha Levin --- drivers/nvdimm/btt_devs

[PATCH AUTOSEL 4.19 04/81] acpi/nfit: Always dump _DSM output payload

2019-05-06 Thread Sasha Levin
From: Dan Williams [ Upstream commit 351f339faa308c1c1461314a18c832239a841ca0 ] The dynamic-debug statements for command payload output only get emitted when the command is not ND_CMD_CALL. Move the output payload dumping ahead of the early return path for ND_CMD_CALL. Fixes: 31eca76ba2fc9 ("..

[PATCH AUTOSEL 4.19 17/81] libnvdimm/pmem: fix a possible OOB access when read and write pmem

2019-05-06 Thread Sasha Levin
From: Li RongQing [ Upstream commit 9dc6488e84b0f64df17672271664752488cd6a25 ] If offset is not zero and length is bigger than PAGE_SIZE, this will cause to out of boundary access to a page memory Fixes: 98cc093cba1e ("block, THP: make block_device_operations.rw_page support THP") Co-developed

[PATCH AUTOSEL 4.19 05/81] libnvdimm/namespace: Fix a potential NULL pointer dereference

2019-05-06 Thread Sasha Levin
From: Kangjie Lu [ Upstream commit 55c1fc0af29a6c1b92f217b7eb7581a882e0c07c ] In case kmemdup fails, the fix goes to blk_err to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Signed-off-by: Dan Williams Signed-off-by: Sasha Levin --- drivers/nvdimm/namespace_devs.c | 5 - 1 f

[PATCH AUTOSEL 4.14 02/95] libnvdimm/namespace: Fix a potential NULL pointer dereference

2019-05-06 Thread Sasha Levin
From: Kangjie Lu [ Upstream commit 55c1fc0af29a6c1b92f217b7eb7581a882e0c07c ] In case kmemdup fails, the fix goes to blk_err to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Signed-off-by: Dan Williams Signed-off-by: Sasha Levin --- drivers/nvdimm/namespace_devs.c | 5 - 1 f

[PATCH AUTOSEL 4.14 06/95] libnvdimm/btt: Fix a kmemdup failure check

2019-05-06 Thread Sasha Levin
From: Aditya Pakki [ Upstream commit 486fa92df4707b5df58d6508728bdb9321a59766 ] In case kmemdup fails, the fix releases resources and returns to avoid the NULL pointer dereference. Signed-off-by: Aditya Pakki Signed-off-by: Dan Williams Signed-off-by: Sasha Levin --- drivers/nvdimm/btt_devs

[PATCH AUTOSEL 4.9 06/25] libnvdimm/btt: Fix a kmemdup failure check

2019-05-06 Thread Sasha Levin
From: Aditya Pakki [ Upstream commit 486fa92df4707b5df58d6508728bdb9321a59766 ] In case kmemdup fails, the fix releases resources and returns to avoid the NULL pointer dereference. Signed-off-by: Aditya Pakki Signed-off-by: Dan Williams Signed-off-by: Sasha Levin --- drivers/nvdimm/btt_devs

[PATCH AUTOSEL 4.9 02/25] libnvdimm/namespace: Fix a potential NULL pointer dereference

2019-05-06 Thread Sasha Levin
From: Kangjie Lu [ Upstream commit 55c1fc0af29a6c1b92f217b7eb7581a882e0c07c ] In case kmemdup fails, the fix goes to blk_err to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Signed-off-by: Dan Williams Signed-off-by: Sasha Levin --- drivers/nvdimm/namespace_devs.c | 5 - 1 f

[PATCH AUTOSEL 4.4 04/14] libnvdimm/btt: Fix a kmemdup failure check

2019-05-06 Thread Sasha Levin
From: Aditya Pakki [ Upstream commit 486fa92df4707b5df58d6508728bdb9321a59766 ] In case kmemdup fails, the fix releases resources and returns to avoid the NULL pointer dereference. Signed-off-by: Aditya Pakki Signed-off-by: Dan Williams Signed-off-by: Sasha Levin --- drivers/nvdimm/btt_devs