Re: [block] 52f019d43c: ndctl.test-libndctl.fail

2021-03-05 Thread Jeff Moyer
Christoph Hellwig writes: > Dan, > > can you make any sense of thos report? > > name='nfit_test' > path='/lib/modules/5.11.0-rc5-3-g52f019d43c22/extra/test/nfit_test.ko' >> check_set_config_data: dimm: 0 read2 data miscompare: 0 >> check_set_config_data: dimm: 0x1 read2 data miscompare: 0 >>

Re: [PATCH ndctl] dimm: re-fix potential fd leakage in dimm_action()

2021-02-15 Thread Jeff Moyer
Michal Suchanek writes: > There are cases not covered by the original fix and cases added by the > latter patch. > > Also there is one case of usage added without returning from the > function. > > Fixes: ff434d87ccbd ("dimm: fix potential fd leakage in dimm_action()") > Fixes: 41a7e24af5db

[ndctl patch] zero_info_block: skip seed devices

2021-02-09 Thread Jeff Moyer
mode":"raw", "size":0, "uuid":"----", "sector_size":512, "state":"disabled" } This patch skips over namespaces with size=0 when zeroing out info blocks. Fixes: 46654c2d60b70

Re: [PATCH] ACPI: NFIT: Fix input validation of bus-family

2020-11-24 Thread Jeff Moyer
!test_bit(family, _desc->bus_family_mask)) > return -EINVAL; > + family = array_index_nospec(family, > + NVDIMM_BUS_FAMILY_MAX + 1); > dsm_mask = acpi_desc->family_dsm_mask[family]; > gu

Re: [ndctl PATCH 0/8] fix serverl issues reported by Coverity

2020-11-20 Thread Jeff Moyer
ctl/namespace.c | 23 ++- > test/libndctl.c| 16 +++- > test/parent-uuid.c | 2 +- > util/help.c| 8 +++- > util/json.c| 3 +++ > 9 files changed, 59 insertions(+), 17 deletions(-) Except

Re: [ndctl PATCH 4/8] dimm: fix potential fd leakage in dimm_action()

2020-11-20 Thread Jeff Moyer
display_json_array(actx.f_out, actx.jdimms, flags); > } > > - if (actx.f_out != stdout) > - fclose(actx.f_out); > - > + out_close_fin_fout: > if (actx.f_in != stdin) > fclose(actx.f_in); > > + out_close_fout: > + if (actx.f_ou

Re: [ndctl PATCH 3/8] libdaxctl: fix memory leakage in add_dax_region()

2020-11-20 Thread Jeff Moyer
", base, attrs); > if (sysfs_read_attr(ctx, path, buf) == 0) > @@ -314,6 +316,7 @@ static struct daxctl_region *add_dax_region(void *parent, > int id, > err_read: > free(region->region_buf); > free(region->

Re: [ndctl PATCH 2/8] lib/libndctl: fix memory leakage problem in add_bus

2020-11-20 Thread Jeff Moyer
d_bus(void *parent, int id, const char > *ctl_base) > free(bus->wait_probe_path); > free(bus->scrub_path); > free(bus->provider); > + free(bus->bus_path); > free(bus->bus_buf); > free(bus); > err_bus: Acked-by: Jeff Moyer

Re: [ndctl PATCH 1/8] namespace: check whether pfn|dax|btt is NULL in setup_namespace

2020-11-20 Thread Jeff Moyer
rt is pre-v1.2 namespace labels Minor inconsistency in the last hunk. The empty line should come after the return, no? Other than that, LGTM. Acked-by: Jeff Moyer ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [5.4-stable PATCH 0/7] libnvdimm: Cross-arch compatible namespace alignment

2020-05-26 Thread Jeff Moyer
Dan Williams writes: >> What problems with 5.4.y and 5.6.y is this series fixing >> that used to work before? > > The "used to work" bug fixed by this set is the fact that the kernel > used to force a 128MB (memory hotplug section size) alignment padding > on all persistent memory namespaces to

Re: [PATCH v2 3/5] libnvdimm/nvdimm/flush: Allow architecture to override the flush barrier

2020-05-21 Thread Jeff Moyer
Dan Williams writes: >> But I agree with your concern that if we have older kernel/applications >> that continue to use `dcbf` on future hardware we will end up >> having issues w.r.t powerfail consistency. The plan is what you outlined >> above as tighter ecosystem control. Considering we don't

Re: [PATCH 0/5] Manual definition of Soft Reserved memory devices

2020-03-06 Thread Jeff Moyer
Dan Williams writes: > Given the current dearth of systems that supply an ACPI HMAT table, and > the utility of being able to manually define device-dax "hmem" instances > via the efi_fake_mem= option, relax the requirements for creating these > devices. Specifically, add an option (numa=nohmat)

Re: [ndctl PATCH 1/2] ndctl/region: Support ndctl_region_{get, set}_align()

2020-02-26 Thread Jeff Moyer
Dan Williams writes: > On Wed, Feb 26, 2020 at 1:52 PM Jeff Moyer wrote: >> >> Dan Williams writes: >> >> >> Missing doctext. Specifically, there should be a big, fat warning >> >> against changing the region alignment. >> > >

Re: [ndctl PATCH 1/2] ndctl/region: Support ndctl_region_{get, set}_align()

2020-02-26 Thread Jeff Moyer
Dan Williams writes: >> Missing doctext. Specifically, there should be a big, fat warning >> against changing the region alignment. > > I don't mind adding one, but is this the right place to document an > API warning? If the audience is future ndctl developers that should be > warned to keep

Re: [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-25 Thread Jeff Moyer
Dan Williams writes: > On Mon, Feb 24, 2020 at 1:53 PM Jeff Moyer wrote: >> >> Dan Williams writes: >> >> >> Let's just focus on reporting errors when we know we have them. >> > >> > That's the problem in my eyes. If software needs to cont

Re: [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-24 Thread Jeff Moyer
Dan Williams writes: >> Let's just focus on reporting errors when we know we have them. > > That's the problem in my eyes. If software needs to contend with > latent error reporting then it should always contend otherwise > software has multiple error models to wrangle. The only way for an

Re: [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-24 Thread Jeff Moyer
Dan Williams writes: > On Sun, Feb 23, 2020 at 3:03 PM Dave Chinner wrote: >> >> On Fri, Feb 21, 2020 at 03:17:59PM -0500, Vivek Goyal wrote: >> > On Fri, Feb 21, 2020 at 01:32:48PM -0500, Jeff Moyer wrote: >> > > Vivek Goyal writes: >> > > &

Re: [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-21 Thread Jeff Moyer
Dan Williams writes: > Oh you misunderstood my comment, the "move badblocks to filesystem" > proposal is long term / down the road thing to consider. In the near > term this unaligned block zeroing facility is an improvement. I'm not sure I agree. I'm going to think about it and get back to

Re: [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-21 Thread Jeff Moyer
Vivek Goyal writes: > On Thu, Feb 20, 2020 at 04:35:17PM -0500, Jeff Moyer wrote: >> Vivek Goyal writes: >> >> > Currently pmem_clear_poison() expects offset and len to be sector aligned. >> > Atleast that seems to be the assumption with which code has been wri

Re: [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-20 Thread Jeff Moyer
Vivek Goyal writes: > Currently pmem_clear_poison() expects offset and len to be sector aligned. > Atleast that seems to be the assumption with which code has been written. > It is called only from pmem_do_bvec() which is called only from pmem_rw_page() > and pmem_make_request() which will only

Re: [ndctl PATCH] ndctl/list: Drop named list objects from verbose listing

2020-02-19 Thread Jeff Moyer
Dan Williams writes: > On Wed, Feb 19, 2020 at 9:56 AM Jeff Moyer wrote: >> >> Dan Williams writes: >> >> > The only expected difference between "ndctl list -R" and "ndctl list >> > -Rv" is some additional output fields. Instead it

Re: [ndctl PATCH 1/2] ndctl/region: Support ndctl_region_{get, set}_align()

2020-02-19 Thread Jeff Moyer
Dan Williams writes: > > +NDCTL_EXPORT unsigned long ndctl_region_get_align(struct ndctl_region > *region) > +{ > + return region->align; > +} > + > +NDCTL_EXPORT int ndctl_region_set_align(struct ndctl_region *region, > + unsigned long align) > +{ > + struct ndctl_ctx

Re: [ndctl PATCH] ndctl/list: Drop named list objects from verbose listing

2020-02-19 Thread Jeff Moyer
Dan Williams writes: > The only expected difference between "ndctl list -R" and "ndctl list > -Rv" is some additional output fields. Instead it currently results in > the region array being contained in a named "regions" list object. > > # ndctl list -R -r 0 > [ > { > "dev":"region0", >

Re: [ndctl V2] namespace/create: Don't create multiple namespaces unless greedy

2020-02-18 Thread Jeff Moyer
Dan Williams writes: >> diff --git a/ndctl/namespace.c b/ndctl/namespace.c >> index 7fb0007..b1f2158 100644 >> --- a/ndctl/namespace.c >> +++ b/ndctl/namespace.c >> @@ -1388,11 +1388,9 @@ static int do_xaction_namespace(const char *namespace, >>

Re: [ndctl PATCH] ndctl/lib: make dimm_ops in private.h extern

2020-02-18 Thread Jeff Moyer
struct ndctl_dimm_ops * const msft_dimm_ops; > +extern struct ndctl_dimm_ops * const hyperv_dimm_ops; > > static inline struct ndctl_bus *cmd_to_bus(struct ndctl_cmd *cmd) > { Acked-by: Jeff Moyer ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH ndctl] ndctl, test: add bus-id parameter for start-scrub/wait-scrub operation

2020-02-18 Thread Jeff Moyer
Yi Zhang writes: > On some NVDIMM servers, scrub operation will take long time to be finished > as it start on all nvdimm buses in the system, add the bus-id parameter to > do the scrub on the NFIT_TEST_BUS0 > > Signed-off-by: Yi Zhang Reviewed-by: Jeff Moyer > --- >

Re: [PATCH] mm: get rid of WARN if failed to cow user pages

2020-02-18 Thread Jeff Moyer
Dan Williams writes: > [ drop Ross, add Kirill, linux-mm, and lkml ] > > On Tue, Dec 24, 2019 at 9:42 PM Murphy Zhou wrote: >> >> By running xfstests with fsdax enabled, generic/437 always hits this >> warning[1] since this commit: >> >> commit 83d116c53058d505ddef051e90ab27f57015b025 >>

Re: [PATCH] libnvdimm/of_pmem: Fix leaking bus_desc.provider_name in some paths

2020-02-18 Thread Jeff Moyer
_region_remove(struct platform_device > *pdev) > struct of_pmem_private *priv = platform_get_drvdata(pdev); > > nvdimm_bus_unregister(priv->bus); > + kfree(priv->bus_desc.provider_name); > kfree(priv); > > return 0; Reviewed-by: J

Re: [PATCH] libnvdimm/bus: return the outvar 'cmd_rc' error code in __nd_ioctl()

2020-02-18 Thread Jeff Moyer
if (cmd_rc < 0) { > + rc = cmd_rc; > + goto out_unlock; > + } > + > if (!nvdimm && cmd == ND_CMD_CLEAR_ERROR && cmd_rc >= 0) { > struct nd_cmd_clear_error *clear_err = buf; Looks good to me. Reviewed-by

Re: [RFC][PATCH] dax: Do not try to clear poison for partial pages

2020-02-18 Thread Jeff Moyer
Dan Williams writes: > Right now the kernel does not install a pte on faults that land on a > page with known poison, but only because the error clearing path is so > convoluted and could only claim that fallocate(PUNCH_HOLE) cleared > errors because that was guaranteed to send 512-byte aligned

Re: [PATCH v2 0/4] libnvdimm: Cross-arch compatible namespace alignment

2020-02-14 Thread Jeff Moyer
Dan Williams writes: > --- > > Explicit review requests, but any other feedback is of course > appreciated: > > Patch1 needs an ack from ppc arch maintainers, and I'd like a tested-by > from Aneesh that this still works to solve the ppc issue. Jeff, does > this look good to you? OK, I've

Re: [PATCH v2 1/4] mm/memremap_pages: Introduce memremap_compat_align()

2020-02-14 Thread Jeff Moyer
Dan Williams writes: > On Thu, Feb 13, 2020 at 8:58 AM Jeff Moyer wrote: >> I have just a couple of questions. >> >> First, can you please add a comment above the generic implementation of >> memremap_compat_align describing its purpose, and why a platfor

Re: [PATCH v2 4/4] libnvdimm/region: Introduce an 'align' attribute

2020-02-14 Thread Jeff Moyer
ize: trim free space to current align > > ...to keep the free space accounting conforming to the dynamic align > setting. > > Reported-by: Aneesh Kumar K.V > Reported-by: Jeff Moyer > Signed-off-by: Dan Williams > Reviewed-by: Aneesh Kumar K.V > Link: > https://lore

Re: [PATCH v2 2/4] libnvdimm/namespace: Enforce memremap_compat_align()

2020-02-13 Thread Jeff Moyer
> pmem_attach_disk+0x188/0x770 > nvdimm_bus_probe+0xd8/0x470 > > With the assumption that only memremap_pages() has alignment > constraints, enforce memremap_compat_align() for > pmem_should_map_pages(), nd_pfn, or nd_dax cases. > > Reported-by: Aneesh Kumar K.V > Cc

Re: [PATCH v2 3/4] libnvdimm/region: Introduce NDD_LABELING

2020-02-13 Thread Jeff Moyer
test_bit(NDD_ALIASING, >flags) ? "alias " : "", > + test_bit(NDD_LABELING, >flags) ? "label" : "", ^ Missing a space. The rest looks sane. Reviewed-by: Jeff Moyer

Re: [PATCH v2 1/4] mm/memremap_pages: Introduce memremap_compat_align()

2020-02-13 Thread Jeff Moyer
What's the relationship, there, and can we please have a comment explaining it? Thanks! Jeff > > Link: > http://lore.kernel.org/r/capcyv4gbgnp95apyabcsocea50tqj9b5h__83vgngjq3oug...@mail.gmail.com > Reported-by: Aneesh Kumar K.V > Reported-by: Jeff Moyer > Cc: Benjamin Herrenschmidt

Re: [PATCH] tools/testing/nvdimm: Fix compilation failure without CONFIG_DEV_DAX_PMEM_COMPAT

2020-02-12 Thread Jeff Moyer
Jan Kara writes: > When a kernel is configured without CONFIG_DEV_DAX_PMEM_COMPAT, the > compilation of tools/testing/nvdimm fails with: > > Building modules, stage 2. > MODPOST 11 modules > ERROR: "dax_pmem_compat_test" [tools/testing/nvdimm/test/nfit_test.ko] > undefined! > > Fix the

Re: [patch] dax: pass NOWAIT flag to iomap_apply

2020-02-06 Thread Jeff Moyer
Jan Kara writes: > On Thu 06-02-20 09:33:39, Jeff Moyer wrote: >> Jan Kara writes: >> >> > On Wed 05-02-20 14:15:58, Jeff Moyer wrote: >> >> fstests generic/471 reports a failure when run with MOUNT_OPTIONS="-o >> >> dax"

Re: [patch] dax: pass NOWAIT flag to iomap_apply

2020-02-06 Thread Jeff Moyer
Jan Kara writes: > On Wed 05-02-20 14:15:58, Jeff Moyer wrote: >> fstests generic/471 reports a failure when run with MOUNT_OPTIONS="-o >> dax". The reason is that the initial pwrite to an empty file with the >> RWF_NOWAIT flag set does not return -EAGAIN. It

[patch] dax: pass NOWAIT flag to iomap_apply

2020-02-05 Thread Jeff Moyer
d, generic/471 passes for me. Signed-off-by: Jeff Moyer diff --git a/fs/dax.c b/fs/dax.c index 1f1f0201cad1..0b0d8819cb1b 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -1207,6 +1207,9 @@ dax_iomap_rw(struct kiocb *iocb, struct iov_iter *iter, lockdep_assert_hel

Re: [PATCH 01/19] dax: remove block device dependencies

2020-01-15 Thread Jeff Moyer
Hi, Dan, Dan Williams writes: > I'm going to take a look at how hard it would be to develop a kpartx > fallback in udev. If that can live across the driver transition then > maybe this can be a non-event for end users that already have that > udev update deployed. I just wanted to remind you

Re: [RFC PATCH] libnvdimm: Update the meaning for persistence_domain values

2020-01-15 Thread Jeff Moyer
"Aneesh Kumar K.V" writes: >> /* >>  * Platform provides mechanisms to flush outstanding write data >>  * to pmem on system power loss. >>  */ >> > > Wanted to add more details. So with the above interpretation, if the > persistence_domain is found to be 'cpu_cache', application can expect >

Re: [RFC PATCH] libnvdimm: Update the meaning for persistence_domain values

2020-01-15 Thread Jeff Moyer
"Aneesh Kumar K.V" writes: >> Would you also update of_pmem to indicate the persistence domain, >> please? >> > > sure. Thanks! >>> diff --git a/include/linux/libnvdimm.h b/include/linux/libnvdimm.h >>> index f2a33f2e3ba8..9126737377e1 100644 >>> --- a/include/linux/libnvdimm.h >>> +++

Re: [RFC PATCH] libnvdimm: Update the meaning for persistence_domain values

2020-01-15 Thread Jeff Moyer
"Aneesh Kumar K.V" writes: > Currently, kernel shows the below values > "persistence_domain":"cpu_cache" > "persistence_domain":"memory_controller" > "persistence_domain":"unknown" > > This patch updates the meaning of these values such that > > "cpu_cache" indicates no extra

Re: [PATCH v3 1/6] libnvdimm/namespace: Make namespace size validation arch dependent

2020-01-10 Thread Jeff Moyer
Hi, Aneesh, After applying this patch series, several of my namespaces no longer enumerate: Before: # ndctl list [ { "dev":"namespace0.2", "mode":"sector", "size":106541672960, "uuid":"ea1122b2-c219-424c-b09c-38a6e94a1042", "sector_size":512, "blockdev":"pmem0.2s" },

Re: [PATCH] virtio pmem: fix async flush ordering

2019-11-22 Thread Jeff Moyer
Dan Williams writes: > On Fri, Nov 22, 2019 at 8:09 AM Jeff Moyer wrote: >> >> Dan Williams writes: >> >> > On Wed, Nov 20, 2019 at 9:26 AM Jeff Moyer wrote: >> >> >> >> Pankaj Gupta writes: >> >> >> >> > R

Re: [PATCH] virtio pmem: fix async flush ordering

2019-11-22 Thread Jeff Moyer
Dan Williams writes: > On Wed, Nov 20, 2019 at 9:26 AM Jeff Moyer wrote: >> >> Pankaj Gupta writes: >> >> > Remove logic to create child bio in the async flush function which >> > causes child bio to get executed after parent bio 'pmem_make_request'

Re: [PATCH] virtio pmem: fix async flush ordering

2019-11-20 Thread Jeff Moyer
e performing flush from the parent bio to maintain the > correct order. Also, returning from function 'pmem_make_request' if > REQ_PREFLUSH returns an error. > > Reported-by: Jeff Moyer > Signed-off-by: Pankaj Gupta There's a slight change in behavior for the error path in the vir

Re: [PATCH 4/4] modpost: do not set ->preloaded for symbols from Module.symvers

2019-11-01 Thread Jeff Moyer
Masahiro Yamada writes: > On Fri, Nov 1, 2019 at 1:51 AM Jeff Moyer wrote: >> >> Masahiro Yamada writes: >> >> > Now that there is no overwrap between symbols from ELF files and >> > ones from Module.symvers. >> > >> > So, the

Re: [PATCH 4/4] modpost: do not set ->preloaded for symbols from Module.symvers

2019-10-31 Thread Jeff Moyer
Masahiro Yamada writes: > Now that there is no overwrap between symbols from ELF files and > ones from Module.symvers. > > So, the 'exported twice' warning should be reported irrespective > of where the symbol in question came from. Only the exceptional case > is when __crc_ symbol appears

Re: [ndctl patch 3/4] query_fw_finish_status: get rid of redundant variable

2019-10-28 Thread Jeff Moyer
Ira Weiny writes: > On Mon, Oct 28, 2019 at 03:37:48PM -0400, Jeff Moyer wrote: >> Ira Weiny writes: >> >> >> (Watching the unit test run fall into an infinite loop..) Nope, the >> >> break is in the switch scope, the while loop needs the 'goto out'. >

Re: [ndctl patch 3/4] query_fw_finish_status: get rid of redundant variable

2019-10-28 Thread Jeff Moyer
Ira Weiny writes: > On Mon, Oct 28, 2019 at 03:37:48PM -0400, Jeff Moyer wrote: >> Ira Weiny writes: >> >> >> (Watching the unit test run fall into an infinite loop..) Nope, the >> >> break is in the switch scope, the while loop needs the 'goto out'. >

Re: [ndctl patch 3/4] query_fw_finish_status: get rid of redundant variable

2019-10-28 Thread Jeff Moyer
Ira Weiny writes: >> (Watching the unit test run fall into an infinite loop..) Nope, the >> break is in the switch scope, the while loop needs the 'goto out'. >> >> Yes this bit definitely needs to be refactored :) > > How about this patch instead? Untested. I'm not a fan of the looping with

Re: [PATCH] fs/dax: Fix pmd vs pte conflict detection

2019-10-21 Thread Jeff Moyer
Dan Williams writes: > Check for NULL entries before checking the entry order, otherwise NULL > is misinterpreted as a present pte conflict. The 'order' check needs to > happen before the locked check as an unlocked entry at the wrong order > must fallback to lookup the correct order. Please

Re: [ndctl patch 3/4] query_fw_finish_status: get rid of redundant variable

2019-10-18 Thread Jeff Moyer
Ira Weiny writes: > On Fri, Oct 18, 2019 at 04:23:01PM -0400, Jeff Moyer wrote: >> The 'done' variable only adds confusion. >> >> Signed-off-by: Jeff Moyer >> --- >> ndctl/dimm.c | 7 +-- >> 1 file changed, 1 insertion(+), 6 deletions(-) >>

[ndctl patch 3/4] query_fw_finish_status: get rid of redundant variable

2019-10-18 Thread Jeff Moyer
The 'done' variable only adds confusion. Signed-off-by: Jeff Moyer --- ndctl/dimm.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ndctl/dimm.c b/ndctl/dimm.c index c8821d6..f28b9c1 100644 --- a/ndctl/dimm.c +++ b/ndctl/dimm.c @@ -682,7 +682,6 @@ static int

[ndctl patch 2/4] fix building of tags tables

2019-10-18 Thread Jeff Moyer
Make currently fails with: make[1]: *** No rule to make target 'libndctl.h', needed by 'tags-am'. Stop. The path to libndctl.h is wrong in ndctl/lib/Makefile.am. Fix it. Signed-off-by: Jeff Moyer --- ndctl/lib/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[ndctl patch 1/4] util/abspath: cleanup prefix_filename

2019-10-18 Thread Jeff Moyer
Static checkers complain about the unused assignment to pfx_len. The code can obviously be simplified. Signed-off-by: Jeff Moyer --- util/abspath.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/util/abspath.c b/util/abspath.c index 09bbd27..e44236f 100644 --- a/util

[ndctl patch 4/4] load-keys: get rid of duplicate assignment

2019-10-18 Thread Jeff Moyer
Signed-off-by: Jeff Moyer --- ndctl/load-keys.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ndctl/load-keys.c b/ndctl/load-keys.c index 981f80f..f0b7a5a 100644 --- a/ndctl/load-keys.c +++ b/ndctl/load-keys.c @@ -185,7 +185,6 @@ static int load_keys(struct loadkeys *lk_ctx, const char

Re: [ndctl RFC PATCH] ndctl/namespace: create namespaces greedily

2019-08-28 Thread Jeff Moyer
create-namespace > semantics unchanged, and introduce a new command - 'create-namespaces' > or 'create-names-ace-greedy' with the new behavior. I'm not sure if > users will care deeply about either of the two points above, hence > sending this as an RFC. > > Link: https://github.

Re: [PATCH v2 1/3] libnvdimm/security: Introduce a 'frozen' attribute

2019-08-28 Thread Jeff Moyer
ns need 'frozen' to show up in the primary 'security' > attribute. The expectation is that communicating 'frozen' is mostly a > helper for debug and status monitoring. > > Reviewed-by: Dave Jiang > Reported-by: Jeff Moyer > Signed-off-by: Dan Williams Reviewed-by: J

Re: [PATCH v2 2/3] libnvdimm/security: Tighten scope of nvdimm->busy vs security operations

2019-08-28 Thread Jeff Moyer
rather than each of the helper routines to enable > freeze to be run regardless of busy state. > > Reviewed-by: Dave Jiang > Signed-off-by: Dan Williams Reviewed-by: Jeff Moyer > --- > drivers/nvdimm/dimm_devs.c | 33 - > drivers/nvdimm/sec

[patch] libnvdimm/pfn: Fix namespace creation on misaligned addresses

2019-08-28 Thread Jeff Moyer
as before the introduction of the offending commit. [1] https://lists.01.org/pipermail/linux-nvdimm/2019-July/022813.html Fixes: commit a3619190d62e ("libnvdimm/pfn: stop padding pmem namespaces ...") Reported-and-tested-by: Yi Zhang Signed-off-by: Jeff Moyer diff --git a/drivers/nvdimm/pfn_dev

Re: create devdax with "-a 1g" failed from 5.3.0-rc1

2019-08-26 Thread Jeff Moyer
Dan, we should probably fix this before 5.3 ships. Do you have any concerns with the patch I attached? If not, I'll submit a proper one. -Jeff Jeff Moyer writes: > Hi, Yi, > > Yi Zhang writes: > >> Hi Dan >> >> As subject, I found it failed from bellow co

Re: [ndctl PATCH 2/2] libdaxctl: point to migrate-device-model for dax-class errors

2019-08-22 Thread Jeff Moyer
Vishal Verma writes: > When a dax-bus vs. dax-class expectation causes a failure, such as when > reconfiguring device modes, print an error message directly pointing the > user to the daxctl-migrate-device-model command. > > Reported-by: Dave Hansen > Reported-by: Jeff Moyer

Re: [PATCH 2/2] drivers/dax/kmem: give a warning if CONFIG_DEV_DAX_PMEM_COMPAT is enabled

2019-08-22 Thread Jeff Moyer
Jia He writes: > commit c221c0b0308f ("device-dax: "Hotplug" persistent memory for use > like normal RAM") helps to add persistent memory as normal RAM blocks. > But this driver doesn't work if CONFIG_DEV_DAX_PMEM_COMPAT is enabled. > > Here is the debugging call trace when

Re: [PATCH 2/3] libnvdimm/security: Tighten scope of nvdimm->busy vs security operations

2019-08-19 Thread Jeff Moyer
Dan Williams writes: > On Fri, Aug 16, 2019 at 1:49 PM Jeff Moyer wrote: >> >> Dan Williams writes: >> >> > The blanket blocking of all security operations while the DIMM is in >> > active use in a region is too restrictive. The only security operations &

Re: [PATCH 3/3] libnvdimm/security: Consolidate 'security' operations

2019-08-16 Thread Jeff Moyer
ects, just move the > __security_store() entry point to live with the helpers. > > Cc: Dave Jiang > Signed-off-by: Dan Williams Fine by me. Acked-by: Jeff Moyer ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH 2/3] libnvdimm/security: Tighten scope of nvdimm->busy vs security operations

2019-08-16 Thread Jeff Moyer
Dan Williams writes: > The blanket blocking of all security operations while the DIMM is in > active use in a region is too restrictive. The only security operations > that need to be aware of the ->busy state are those that mutate the > state of data, i.e. erase and overwrite. > > Refactor the

Re: [PATCH 1/3] libnvdimm/security: Introduce a 'frozen' attribute

2019-08-16 Thread Jeff Moyer
ns need 'frozen' to show up in the primary 'security' > attribute. The expectation is that communicating 'frozen' is mostly a > helper for debug and status monitoring. > > Cc: Dave Jiang > Reported-by: Jeff Moyer > Signed-off-by: Dan Williams > --- > drivers/acpi/nfit

Re: create devdax with "-a 1g" failed from 5.3.0-rc1

2019-08-16 Thread Jeff Moyer
Hi, Yi, Yi Zhang writes: > Hi Dan > > As subject, I found it failed from bellow commit[1], steps list here > [2] and I've attached the full dmesg, let me know if you need more > info, thanks. > > [1] > commit a3619190d62ed9d66416891be2416f6bea2b3ca4 (refs/bisect/bad) > Author: Dan Williams >

Re: [PATCH v3] ndctl, check: Ensure mmap of BTT sections work with 64K page-sizes

2019-08-13 Thread Jeff Moyer
Vaibhav Jain writes: > Thanks for reviewing this patch Jeff. > > Jeff Moyer writes: > >> Vaibhav Jain writes: >> >>> On PPC64 which uses a 64K page-size, ndtl-check command fails on a BTT >>> namespace with following error: >>>

Re: [PATCH v3] ndctl, check: Ensure mmap of BTT sections work with 64K page-sizes

2019-08-12 Thread Jeff Moyer
Vaibhav Jain writes: > On PPC64 which uses a 64K page-size, ndtl-check command fails on a BTT > namespace with following error: > > $ sudo ndctl check-namespace namespace0.0 -vv > namespace0.0: namespace_check: checking namespace0.0 > namespace0.0: btt_discover_arenas: found 1 BTT arena >

Re: [ndctl PATCH] daxctl/test: Skip daxctl-devices.sh on older kernels

2019-08-12 Thread Jeff Moyer
Dan Williams writes: > On Mon, Aug 12, 2019 at 1:45 PM Jeff Moyer wrote: >> >> Dan Williams writes: >> >> > If the 'kmem' module is missing skip the test to support running the >> > unit tests on older -stable kernels pre-v5.1. >> > >> >

Re: [PATCH] mm/memremap: Fix reuse of pgmap instances with internal references

2019-08-12 Thread Jeff Moyer
Dan Williams writes: > On Mon, Aug 12, 2019 at 8:51 AM Jeff Moyer wrote: >> >> Dan Williams writes: >> >> > Currently, attempts to shutdown and re-enable a device-dax instance >> > trigger: >> >> What does "shutdown and re-enable&qu

Re: [ndctl PATCH] daxctl/test: Skip daxctl-devices.sh on older kernels

2019-08-12 Thread Jeff Moyer
Dan Williams writes: > If the 'kmem' module is missing skip the test to support running the > unit tests on older -stable kernels pre-v5.1. > > Signed-off-by: Dan Williams Note that the kernel module could also just not be configured. > --- > test/daxctl-devices.sh |7 +++ > 1 file

Re: [PATCH] mm/memremap: Fix reuse of pgmap instances with internal references

2019-08-12 Thread Jeff Moyer
Dan Williams writes: > Currently, attempts to shutdown and re-enable a device-dax instance > trigger: What does "shutdown and re-enable" translate to? If I disable and re-enable a device-dax namespace, I don't see this behavior. -Jeff > > Missing reference count teardown definition >

Re: [ndctl PATCH] ndctl/test: Add xfs reflink dependency

2019-08-12 Thread Jeff Moyer
o dax $pmem $mnt Agreed. In the future, the options may not be mutually exclusive, but I don't see any harm in always testing with reflink=0 for the existing tests. Acked-by: Jeff Moyer > > Cc: Jeff Moyer > Signed-off-by: Dan Williams > --- > test/dax.sh |4 ++-- > test/mmap.sh

Re: [patch] nfit: report frozen security state

2019-08-08 Thread Jeff Moyer
Dan Williams writes: > ...but ABIs are forever, and ndctl has shipped: > > if (strcmp(buf, "disabled") == 0) > return NDCTL_SECURITY_DISABLED; > else if (strcmp(buf, "unlocked") == 0) > return NDCTL_SECURITY_UNLOCKED; > else if (strcmp(buf,

Re: [ndctl PATCH v2] Documentation/namespace-description: Clarify label-less restrictions

2019-08-08 Thread Jeff Moyer
> Cc: Dan Williams > Signed-off-by: Vishal Verma > --- > > v2: > - Remove the part about an address abstraction mechanism; It didn't add > any value (Jeff) > - Add an additional sentence about space reclamation semantics (Dan) LGTM Reviewed-by: Jeff Moyer -Jeff > >

Re: [ndctl PATCH] Documentation/namespace-description: Clarify label-less restrictions

2019-08-08 Thread Jeff Moyer
Vishal Verma writes: > In the ndctl-create-namespace (and related) man pages, add a > clarification note regarding some of the restrictions a user may see > when operating on label-less namespaces. > > Link: https://github.com/pmem/ndctl/issues/52 > Reported-by: Jane Chu > Cc: Dan Williams >

Re: [patch] nfit: report frozen security state

2019-08-07 Thread Jeff Moyer
Dan Williams writes: > On Thu, Aug 1, 2019 at 2:55 PM Jeff Moyer wrote: >> >> If a dimm is frozen, it is currently reported as being "locked". While >> that's not technically wrong, it is misleading as the dimm can't be >> unlocked. Fix the confusion. >

Re: [ndctl PATCH v3 1/8] ndctl/build: Suppress -Waddress-of-packed-member

2019-08-05 Thread Jeff Moyer
Dan Williams writes: > On Mon, Aug 5, 2019 at 10:06 AM Jeff Moyer wrote: >> >> Dan Williams writes: >> >> > gcc 9.1.1 emits a slew of warnings for many of the command field >> > accesses. I.e. warnings of the form: >> > >> > lib

Re: [ndctl PATCH v3 1/8] ndctl/build: Suppress -Waddress-of-packed-member

2019-08-05 Thread Jeff Moyer
Dan Williams writes: > gcc 9.1.1 emits a slew of warnings for many of the command field > accesses. I.e. warnings of the form: > > libndctl.c:2586:21: warning: taking address of packed member of ‘struct > nd_cmd_get_config_data_hdr’ may result in an unaligned pointer value >

[patch] nfit: report frozen security state

2019-08-01 Thread Jeff Moyer
If a dimm is frozen, it is currently reported as being "locked". While that's not technically wrong, it is misleading as the dimm can't be unlocked. Fix the confusion. Thanks to Dan for pointing this out. Signed-off-by: Jeff Moyer diff --git a/drivers/acpi/nfit/intel.c b/drivers

Re: [PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-22 Thread Jeff Moyer
Dan Williams writes: > On Mon, Apr 22, 2019 at 8:59 AM Jeff Moyer wrote: >> >> Dan Williams writes: >> >> > On Thu, Apr 18, 2019 at 9:18 AM Christoph Hellwig >> > wrote: >> >> >> >> On Thu, Apr 18, 2019 at 09:05:05AM -0700,

Re: [PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-22 Thread Jeff Moyer
Dan Williams writes: > On Thu, Apr 18, 2019 at 9:18 AM Christoph Hellwig wrote: >> >> On Thu, Apr 18, 2019 at 09:05:05AM -0700, Dan Williams wrote: >> > > > I'd either add a comment about avoiding retpoline overhead here or just >> > > > make ->flush == NULL mean generic_nvdimm_flush(). Just so

Re: [PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-18 Thread Jeff Moyer
Dan Williams writes: > On Fri, Apr 12, 2019 at 6:12 AM Jeff Moyer wrote: >> >> Jan Kara writes: >> >> > On Thu 11-04-19 07:51:48, Dan Williams wrote: >> >> On Tue, Apr 9, 2019 at 9:09 PM Pankaj Gupta wrote: >> >> > + } else

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

2019-04-18 Thread Jeff Moyer
Dan Williams writes: >> On Wed, Apr 17, 2019 at 3:59 PM Dan Williams >> wrote: >> >> On Wed, Apr 17, 2019 at 3:04 PM Andrew Morton >> wrote: >> > >> > On Wed, 17 Apr 2019 11:38:55 -0700 Dan Williams >> > wrote: >> > >> > > The memory hotplug section is an arbitrary / convenient unit for

Re: [patch] libnvdimm/label: Check for a disabled nmem when deleting labels

2019-04-16 Thread Jeff Moyer
Dan Williams writes: > On Mon, Apr 15, 2019 at 1:32 PM Jeff Moyer wrote: >> >> Hi, >> >> We ran into a situation where one dimm's label area was corrupt (it had >> multiple entries for the same DPA), and so that nmem was disabled. The >> region as a w

[patch] libnvdimm/label: Check for a disabled nmem when deleting labels

2019-04-15 Thread Jeff Moyer
in this case. Check for that. Signed-off-by: Jeff Moyer Reported-by: Zhang Yi diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c index f3d753d3169c..da1f28d8c9e6 100644 --- a/drivers/nvdimm/label.c +++ b/drivers/nvdimm/label.c @@ -1217,7 +1217,7 @@ static int del_labels(struct

Re: [PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-12 Thread Jeff Moyer
Jan Kara writes: > On Thu 11-04-19 07:51:48, Dan Williams wrote: >> On Tue, Apr 9, 2019 at 9:09 PM Pankaj Gupta wrote: >> > + } else { >> > + if (nd_region->flush(nd_region)) >> > + rc = -EIO; >> >> Given the common case wants to be fast and

Re: [PATCH] libnvdimm, pmem: fix a possible OOB access when read and write pmem

2019-04-05 Thread Jeff Moyer
> support THP)" > Co-developed-by: Liang ZhiCheng > Signed-off-by: Liang ZhiCheng > Signed-off-by: Li RongQing Reviewed-by: Jeff Moyer > --- > drivers/nvdimm/pmem.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers

Re: [PATCH v5 00/10] mm: Sub-section memory hotplug support

2019-03-25 Thread Jeff Moyer
Michal Hocko writes: >> > and I would like to know that you are >> > not just shifting the problem to a smaller unit and a new/creative HW >> > will force us to go even more complicated. >> >> HW will not do this to us. It's software that has the problem. >> Namespace creation is unnecessarily

Re: [PATCH 7/7] libnvdimm/pfn: Fix 'start_pad' implementation

2019-02-22 Thread Jeff Moyer
Dan Williams writes: >> Great! Now let's create another one. >> >> # ndctl create-namespace -m fsdax -s 132m >> libndctl: ndctl_pfn_enable: pfn1.1: failed to enable >> Error: namespace1.2: failed to enable >> >> failed to create namespace: No such device or address >> >> (along with a kernel

Re: [PATCH 7/7] libnvdimm/pfn: Fix 'start_pad' implementation

2019-02-22 Thread Jeff Moyer
Dan Williams writes: >> > However, to fix this situation a non-backwards compatible change >> > needs to be made to the interpretation of the nd_pfn info-block. >> > ->start_pad needs to be accounted in ->map.map_offset (formerly >> > ->data_offset), and ->map.map_base (formerly ->phys_addr)

Re: [PATCH 7/7] libnvdimm/pfn: Fix 'start_pad' implementation

2019-02-21 Thread Jeff Moyer
Hi, Dan, Thanks for the comprehensive write-up. Comments below. Dan Williams writes: > In the beginning the pmem driver simply passed the persistent memory > resource range to memremap and was done. With the introduction of > devm_memremap_pages() and vmem_altmap the implementation needed to

Re: [PATCH v3 1/2] nfit, mce: only handle uncorrectable machine checks

2019-02-21 Thread Jeff Moyer
Dan Williams writes: > On Wed, Feb 20, 2019 at 11:26 AM Jeff Moyer wrote: >> >> Borislav Petkov writes: >> >> > Drop stable@ >> > >> > On Wed, Feb 20, 2019 at 01:59:15PM -0500, Jeff Moyer wrote: >> >> Sorry for necroposting. I though

Re: [PATCH v3 1/2] nfit, mce: only handle uncorrectable machine checks

2019-02-20 Thread Jeff Moyer
Borislav Petkov writes: > Drop stable@ > > On Wed, Feb 20, 2019 at 01:59:15PM -0500, Jeff Moyer wrote: >> Sorry for necroposting. I thought the point of the CEC was to make sure >> that the other registered decoders only ever saw uncorrected errors. > > Ha, good

Re: [PATCH v3 1/2] nfit, mce: only handle uncorrectable machine checks

2019-02-20 Thread Jeff Moyer
Hi, Vishal, Vishal Verma writes: > The mce handler for 'nfit' devices is called for memory errors on a > Non-Volatile DIMM, and adds the error location to a 'badblocks' list. > This list is used by the various NVDIMM drivers to avoid consuming known > poison locations during IO. > > The mce

  1   2   3   >