Re: [Virtio-fs] [PATCH v3 1/3] dax: Add an enum for specifying dax wakup mode

2021-04-20 Thread Greg Kurz
t; explicity at the callsite itself. Easier to read code. > > This patch should not introduce any change of behavior. > > Suggested-by: Dan Williams > Signed-off-by: Vivek Goyal > --- Reviewed-by: Greg Kurz > fs/dax.c | 23 +-- > 1 file ch

Re: [Virtio-fs] [PATCH v3 2/3] dax: Add a wakeup mode parameter to put_unlocked_entry()

2021-04-20 Thread Greg Kurz
s simple enough, so I'd simply drop it. This is minor though and it shouldn't prevent this fix to go forward. Reviewed-by: Greg Kurz > if (entry && !dax_is_conflict(entry)) > - dax_wake_entry(xas, entry, WAKE_NEXT); > + dax_wake_entry(xas, en

[PATCH] virtiofs: propagate sync() to file server

2021-04-19 Thread Greg Kurz
l FUSE file server is an untrusted piece of software running in userspace, this is disabled by default. Only enable it with virtiofs for now since virtiofsd is supposedly trusted by the guest kernel. Reported-by: Robert Krawitz Signed-off-by: Greg Kurz --- Can be tested using the following custom QEMU with F

[PATCH v2] powerpc/pseries: Don't enforce MSI affinity with kdump

2021-02-15 Thread Greg Kurz
kdump. Simply revert to the previous working behavior of ignoring affinity masks in this case only. Fixes: 9ea69a55b3b9 ("powerpc/pseries: Pass MSI affinity to irq_create_mapping()") Cc: lviv...@redhat.com Cc: sta...@vger.kernel.org Reviewed-by: Laurent Vivier Reviewed-by: Cédric Le Go

[PATCH] powerpc/pseries: Don't enforce MSI affinity with kdump

2021-02-12 Thread Greg Kurz
kdump. Simply revert to the previous working behavior of ignoring affinity masks in this case only. Fixes: 9ea69a55b3b9 ("powerpc/pseries: Pass MSI affinity to irq_create_mapping()") Cc: lviv...@redhat.com Cc: sta...@vger.kernel.org Signed-off-by: Greg Kurz --- arch/powerp

[PATCH] KVM: PPC: Book3S HV: XIVE: Fix vCPU id sanity check

2020-11-30 Thread Greg Kurz
_xive_vcpu_id_valid() so that it checks the packed vCPU id is below xive->nr_servers, which is explicitly what we want. Fixes: 062cfab7069f ("KVM: PPC: Book3S HV: XIVE: Make VP block size configurable") Cc: sta...@vger.kernel.org # v5.5+ Signed-off-by: Greg Kurz --- arch/powerpc

Re: [PATCH v3 2/2] powerpc/pseries: pass MSI affinity to irq_create_mapping()

2020-11-25 Thread Greg Kurz
On Wed, 25 Nov 2020 16:42:30 + Marc Zyngier wrote: > On 2020-11-25 16:24, Laurent Vivier wrote: > > On 25/11/2020 17:05, Denis Kirjanov wrote: > >> On 11/25/20, Laurent Vivier wrote: > >>> With virtio multiqueue, normally each queue IRQ is mapped to a CPU. > >>> > >>> But since commit

Re: [PATCH v2 1/2] genirq: add an irq_create_mapping_affinity() function

2020-11-25 Thread Greg Kurz
t; to pass NULL for the affinity parameter. > > No functional change. > > Signed-off-by: Laurent Vivier > --- Reviewed-by: Greg Kurz > include/linux/irqdomain.h | 12 ++-- > kernel/irq/irqdomain.c| 13 - > 2 files changed, 18 insertions(+), 7 delet

Re: [PATCH v2 2/2] powerpc/pseries: pass MSI affinity to irq_create_mapping()

2020-11-25 Thread Greg Kurz
rtqueues are correctly dispatched between the CPUs > on pseries. > Since it is public, maybe add: BugId: https://bugzilla.redhat.com/show_bug.cgi?id=1702939 ? > Signed-off-by: Laurent Vivier > --- Anyway, Reviewed-by: Greg Kurz > arch/powerpc/platforms/pseries/msi.c | 3 ++- &

Re: [PATCH] KVM: PPC: Book3S: Assign boolean values to a bool variable

2020-11-06 Thread Greg Kurz
NG: Assignment of 0/1 to bool > variable > > Reported-by: Tosk Robot > Signed-off-by: Kaixu Xia > --- Reviewed-by: Greg Kurz > arch/powerpc/kvm/book3s_xics.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/kvm/book3s

[PATCH v3 3/3] vhost: Don't call log_access_ok() when using IOTLB

2020-10-03 Thread Greg Kurz
the used structure when there isn't an IOTLB device around. Signed-off-by: Greg Kurz --- drivers/vhost/vhost.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 9d2c225fb518..9ad45e1d27f0 100644 ---

[PATCH v3 1/3] vhost: Don't call access_ok() when using IOTLB

2020-10-03 Thread Greg Kurz
t.com CC: sta...@vger.kernel.org # 4.14+ Signed-off-by: Greg Kurz Acked-by: Jason Wang --- drivers/vhost/vhost.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index b45519ca66a7..c3b49975dc28 100644 --- a/drivers/vhost/

[PATCH v3 2/3] vhost: Use vhost_get_used_size() in vhost_vring_set_addr()

2020-10-03 Thread Greg Kurz
The open-coded computation of the used size doesn't take the event into account when the VIRTIO_RING_F_EVENT_IDX feature is present. Fix that by using vhost_get_used_size(). Signed-off-by: Greg Kurz --- drivers/vhost/vhost.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH v3 0/3] vhost: Skip access checks on GIOVAs

2020-10-03 Thread Greg Kurz
v2 v2: - patch 1: move the (vq->ioltb) check from vhost_vq_access_ok() to vq_access_ok() as suggested by MST - patch 2: new patch --- Greg Kurz (3): vhost: Don't call access_ok() when using IOTLB vhost: Use vhost_get_used_size() in vhost_vring_set_addr() vh

Re: [PATCH RFC v2 4/4] 9p: fix race issue in fid contention.

2020-09-24 Thread Greg Kurz
On Thu, 24 Sep 2020 08:38:01 + Jianyong Wu wrote: > > Given the other thread, what did you test this with? > Er, I just use Greg's qemu of https://github.com/gkurz/qemu.git: > 9p-attr-fixes. I should have referenced it in commit message. ... which is a pretty old QEMU version BTW.

Re: [V9fs-developer] [PATCH RFC 0/4] 9p: fix open-unlink-f*syscall bug

2020-09-16 Thread Greg Kurz
On Mon, 14 Sep 2020 17:46:30 +0200 Greg Kurz wrote: > On Mon, 14 Sep 2020 17:19:20 +0200 > Christian Schoenebeck wrote: > > > On Montag, 14. September 2020 14:43:25 CEST Greg Kurz wrote: > > > > So yes, looks like this also requires changes to the 9pfs 'local' fs

Re: [V9fs-developer] [PATCH RFC 0/4] 9p: fix open-unlink-f*syscall bug

2020-09-14 Thread Greg Kurz
On Mon, 14 Sep 2020 17:19:20 +0200 Christian Schoenebeck wrote: > On Montag, 14. September 2020 14:43:25 CEST Greg Kurz wrote: > > > So yes, looks like this also requires changes to the 9pfs 'local' fs > > > driver on QEMU side: > > > https://lists.nongnu.org/a

Re: [V9fs-developer] [PATCH RFC 0/4] 9p: fix open-unlink-f*syscall bug

2020-09-14 Thread Greg Kurz
On Mon, 14 Sep 2020 13:06:34 +0200 Christian Schoenebeck wrote: > On Montag, 14. September 2020 10:35:46 CEST Greg Kurz wrote: > > On Mon, 14 Sep 2020 11:37:50 +0800 > > > > Jianyong Wu wrote: > > > open-unlink-f*syscall bug is a well-known bug in 9p, we try to f

Re: [V9fs-developer] [PATCH RFC 0/4] 9p: fix open-unlink-f*syscall bug

2020-09-14 Thread Greg Kurz
h 4/4, I fix the fid race issue > exists in Greg's patch. > IIRC some patches were needed on the QEMU side as well... I'm spending less time on 9pfs in QEMU, so Cc'ing the new maintainer: Christian Schoenebeck > Eric Van Hensbergen (1): > fs/9p: fix create-unlink-getattr idiom >

Re: [PATCH RFC 1/4] fs/9p: fix create-unlink-getattr idiom

2020-09-14 Thread Greg Kurz
On Mon, 14 Sep 2020 08:00:36 +0200 Dominique Martinet wrote: > Jianyong Wu wrote on Mon, Sep 14, 2020: > > Signed-off-by: Greg Kurz > > Just on a note on that mail: gk...@linux.vnet.ibm.com has no longer been > working for a while, probably want to update to gr...@kaod.org i

[PATCH] mailmap: Add entry for Greg Kurz

2020-08-12 Thread Greg Kurz
I had stopped using gk...@linux.vnet.ibm.com a while back already but this email address was shutdown last June when I quit IBM. It's about time to map it to gr...@kaod.org. Signed-off-by: Greg Kurz --- .mailmap |1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index

Re: [V9fs-developer] [PATCH kernel] 9p/trans_fd: Check file mode at opening

2020-07-29 Thread Greg Kurz
On Wed, 29 Jul 2020 09:50:21 +1000 Alexey Kardashevskiy wrote: > > > On 29/07/2020 03:42, Greg Kurz wrote: > > Hi Alexey, > > > > Working on 9p now ?!? ;-) > > No, I am running syzkaller and seeing things :) > :) > > > Cc'ing Dominique Martine

Re: [V9fs-developer] [PATCH kernel] 9p/trans_fd: Check file mode at opening

2020-07-29 Thread Greg Kurz
On Wed, 29 Jul 2020 08:14:49 +0200 Dominique Martinet wrote: > Greg Kurz wrote on Tue, Jul 28, 2020: > > > The "fd" transport layer uses 2 file descriptors passed externally > > > and calls kernel_write()/kernel_read() on these. If files were opened >

Re: [V9fs-developer] [PATCH kernel] 9p/trans_fd: Check file mode at opening

2020-07-28 Thread Greg Kurz
Hi Alexey, Working on 9p now ?!? ;-) Cc'ing Dominique Martinet who appears to be the person who takes care of 9p these days. On Tue, 28 Jul 2020 22:41:29 +1000 Alexey Kardashevskiy wrote: > The "fd" transport layer uses 2 file descriptors passed externally > and calls

Re: [PATCH -next] powerpc/xive: Remove unused inline function xive_kexec_teardown_cpu()

2020-07-15 Thread Greg Kurz
On Wed, 15 Jul 2020 10:50:40 +0800 YueHaibing wrote: > commit e27e0a94651e ("powerpc/xive: Remove xive_kexec_teardown_cpu()") > left behind this, remove it. > > Signed-off-by: YueHaibing > --- Reviewed-by: Greg Kurz > arch/powerpc/include/asm/xive.h | 1 - &

Re: [PATCH] KVM: PPC: Book3S HV: relax check on H_SVM_INIT_ABORT

2020-05-20 Thread Greg Kurz
On Wed, 20 May 2020 18:51:10 +0200 Laurent Dufour wrote: > The commit 8c47b6ff29e3 ("KVM: PPC: Book3S HV: Check caller of H_SVM_* > Hcalls") added checks of secure bit of SRR1 to filter out the Hcall > reserved to the Ultravisor. > > However, the Hcall H_SVM_INIT_ABORT is made by the Ultravisor

Re: [PATCH v2] KVM: PPC: Book3S HV: relax check on H_SVM_INIT_ABORT

2020-05-20 Thread Greg Kurz
ABORT, this hcall will be > filtered out in kvmppc_h_svm_init_abort() because kvm->arch.secure_guest is > not set in that case. > > Fixes: 8c47b6ff29e3 ("KVM: PPC: Book3S HV: Check caller of H_SVM_* Hcalls") > Signed-off-by: Laurent Dufour > --- Reviewed-by: Greg Ku

[PATCH] scripts/sorttable: Correctly handle mmap() returning MAP_FAILED

2020-05-18 Thread Greg Kurz
had the same issue. It got fixed in a similar manner by commit 3f1df12019f3 ("recordmcount: Rewrite error/success handling"). Cc: sta...@vger.kernel.org # v3.5 Fixes: a79f248b9b30 ("scripts: Add sortextable to sort the kernel's exception table.") Signed-off-by: Greg Kurz --- scr

[PATCH] powerpc/xive: Fix bogus error code returned by OPAL

2019-09-23 Thread Greg Kurz
URCE which is the usual error returned upon resource exhaustion. Cc: sta...@vger.kernel.org # v4.12+ Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/156821713818.1985334.14123187368108582810.st...@bahia.lan (cherry picked f

Re: [PATCH trivial] KVM: PPC: Remove superfluous check for non-zero return value

2019-09-18 Thread Greg Kurz
On Wed, 18 Sep 2019 18:44:36 +0200 Greg Kurz wrote: > On Wed, 11 Sep 2019 21:52:35 +0200 > Thomas Huth wrote: > > > After the kfree()s haven been removed in the previous > > commit 9798f4ea71ea ("fix rollback when kvmppc_xive_create fails"), > > the code

Re: [PATCH trivial] KVM: PPC: Remove superfluous check for non-zero return value

2019-09-18 Thread Greg Kurz
> > Signed-off-by: Thomas Huth > --- This looks like a good candidate for trivial, hence Cc'ing Jiri and adding trivial keyword in subject. Reviewed-by: Greg Kurz > arch/powerpc/kvm/book3s_xive.c| 5 + > arch/powerpc/kvm/book3s_xive_native.c | 5 + > 2 files change

Re: [PATCH] powerpc/xive: Fix bogus error code returned by OPAL

2019-09-11 Thread Greg Kurz
On Thu, 12 Sep 2019 00:26:19 +1000 Michael Ellerman wrote: > Hi Greg, > Bom dia ! :) > Couple of comments ... > > Greg Kurz writes: > > There's a bug in skiboot that causes the OPAL_XIVE_ALLOCATE_IRQ call > > to return the 32-bit value 0x wh

[PATCH v2] powerpc/xive: Fix bogus error code returned by OPAL

2019-09-11 Thread Greg Kurz
URCE which is the usual error returned upon resource exhaustion. Cc: sta...@vger.kernel.org # v4.12+ Signed-off-by: Greg Kurz --- v2: - fix syntax error in changelog - Cc stable - rename original OPAL wrapper - rewrite fixup wrapper (style, use s64 and u32) --- arch/powerpc/include/

[PATCH] powerpc/xive: Fix bogus error code returned by OPAL

2019-09-10 Thread Greg Kurz
URCE which is the usual error returned upon resource exhaustion. Signed-off-by: Greg Kurz --- arch/powerpc/sysdev/xive/native.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/xive/native.c b/arch/powerpc/sysdev/xive/native.c index 37

Re: [PATCH 2/2] powerpc/xive: Add a check for memory allocation failure

2019-08-01 Thread Greg Kurz
On Thu, 1 Aug 2019 10:32:42 +0200 Christophe JAILLET wrote: > The result of this kzalloc is not checked. Add a check and corresponding > error handling code. > > Signed-off-by: Christophe JAILLET > --- Reviewed-by: Greg Kurz > Note that 'xive_irq_bitmap_add()' failur

Re: [PATCH 1/2] powerpc/xive: Use GFP_KERNEL instead of GFP_ATOMIC in 'xive_irq_bitmap_add()'

2019-08-01 Thread Greg Kurz
On Thu, 1 Aug 2019 10:32:31 +0200 Christophe JAILLET wrote: > There is no need to use GFP_ATOMIC here. GFP_KERNEL should be enough. > GFP_KERNEL is also already used for another allocation just a few lines > below. > > Signed-off-by: Christophe JAILLET > --- Good catch.

[PATCH] KVM: PPC: Book3S HV: XIVE: Fix typo in comment

2019-07-03 Thread Greg Kurz
Cc: triv...@kernel.org Signed-off-by: Greg Kurz --- arch/powerpc/kvm/book3s_xive.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_xive.c b/arch/powerpc/kvm/book3s_xive.c index 1fcb3d6f1db8..e3169e8bf1fc 100644 --- a/arch/powerpc/kvm/book3s_xive.c

Re: [PATCH] powerpc/pseries: Fix xive=off command line

2019-05-17 Thread Greg Kurz
On Wed, 15 May 2019 10:54:42 + Sasha Levin wrote: > Hi, > Hi, > [This is an automated email] > > This commit has been processed because it contains a "Fixes:" tag, > fixing commit: eac1e731b59e powerpc/xive: guest exploitation of the XIVE > interrupt controller. > > The bot has tested

[PATCH] powerpc/pseries: Fix xive=off command line

2019-05-15 Thread Greg Kurz
s XIVE. Fixes: eac1e731b59e ("powerpc/xive: guest exploitation of the XIVE interrupt controller") Cc: sta...@vger.kernel.org # v4.20 Reported-by: Pavithra R. Prakash Signed-off-by: Greg Kurz --- eac1e731b59e is a v4.16 commit actually but this patch only applies cleanly to v4.20 and ne

Re: [PATCH] powerpc/powernv/npu: Fix reference leak

2019-05-14 Thread Greg Kurz
On Tue, 14 May 2019 21:13:40 +1000 Michael Ellerman wrote: > Greg Kurz writes: > > Michael, > > > > Any comments on this patch ? Should I repost with a shorter comment > > as suggested by Alexey ? > > No the longer comment seems fine to me. > > I'm not

Re: [PATCH] powerpc/powernv/npu: Fix reference leak

2019-05-13 Thread Greg Kurz
Michael, Any comments on this patch ? Should I repost with a shorter comment as suggested by Alexey ? Cheers, -- Greg On Mon, 29 Apr 2019 12:36:59 +0200 Greg Kurz wrote: > On Mon, 29 Apr 2019 16:01:29 +1000 > Alexey Kardashevskiy wrote: > > > On 20/04/2019 01:34,

Re: [PATCH] vfio-pci/nvlink2: Fix potential VMA leak

2019-05-07 Thread Greg Kurz
On Tue, 7 May 2019 11:52:44 +1000 Sam Bobroff wrote: > On Mon, May 06, 2019 at 03:58:45PM -0600, Alex Williamson wrote: > > On Fri, 19 Apr 2019 17:37:17 +0200 > > Greg Kurz wrote: > > > > > If vfio_pci_register_dev_region() fails then we should rollback >

[PATCH] vfio-pci/nvlink2: Fix potential VMA leak

2019-04-19 Thread Greg Kurz
If vfio_pci_register_dev_region() fails then we should rollback previous changes, ie. unmap the ATSD registers. Signed-off-by: Greg Kurz --- drivers/vfio/pci/vfio_pci_nvlink2.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/vfio/pci/vfio_pci_nvlink2.c b/drivers/vfio/pci

Re: [PATCH 2/5] ocxl: Clean up printf formats

2019-03-13 Thread Greg Kurz
On Wed, 13 Mar 2019 15:06:58 +1100 "Alastair D'Silva" wrote: > From: Alastair D'Silva > > Use %# instead of using a literal '0x' > > Signed-off-by: Alastair D'Silva > --- Reviewed-by: Greg Kurz > drivers/misc/ocxl/config.c | 6 +++--- > drivers/misc

Re: [PATCH 1/5] ocxl: Rename struct link to ocxl_link

2019-02-27 Thread Greg Kurz
, 27 February 2019 6:55 PM > >>> To: Alastair D'Silva ; 'Alastair D'Silva' > >>> > >>> Cc: 'Greg Kurz' ; 'Frederic Barrat' > >>> ; 'Arnd Bergmann' ; 'Greg Kroah- > >>> Hartman' ; linuxppc-...@lists.ozlabs.org; > >>> linux-kerne

Re: [PATCH 1/5] ocxl: Rename struct link to ocxl_link

2019-02-27 Thread Greg Kurz
On Wed, 27 Feb 2019 15:57:37 +1100 "Alastair D'Silva" wrote: > From: Alastair D'Silva > > The term 'link' is ambiguous (especially when the struct is used for a > list), so rename it for clarity. > > Signed-off-by: Alastair D'Silva > Reviewed-by: Greg Kurz &g

Re: [PATCH] radix tree: Don't return internal entries on lookup

2018-12-13 Thread Greg Kurz
On Thu, 6 Dec 2018 17:21:02 +0100 Greg Kurz wrote: > On Thu, 6 Dec 2018 05:36:20 -0800 > Matthew Wilcox wrote: > > > On Thu, Dec 06, 2018 at 08:54:03AM +0100, Greg Kurz wrote: > > > Commit 66ee620f06f9 ("idr: Permit any valid kernel pointer to > > > be

Re: [PATCH] radix tree: Don't return internal entries on lookup

2018-12-06 Thread Greg Kurz
On Thu, 6 Dec 2018 05:36:20 -0800 Matthew Wilcox wrote: > On Thu, Dec 06, 2018 at 08:54:03AM +0100, Greg Kurz wrote: > > Commit 66ee620f06f9 ("idr: Permit any valid kernel pointer to > > be stored") changed the radix tree lookup so that it stops when > >

Re: [PATCH] radix tree: Don't return internal entries on lookup

2018-12-06 Thread Greg Kurz
On Thu, 6 Dec 2018 05:36:20 -0800 Matthew Wilcox wrote: > On Thu, Dec 06, 2018 at 08:54:03AM +0100, Greg Kurz wrote: > > Commit 66ee620f06f9 ("idr: Permit any valid kernel pointer to > > be stored") changed the radix tree lookup so that it stops when > >

[PATCH] radix tree: Don't return internal entries on lookup

2018-12-06 Thread Greg Kurz
lookup(), ie, 0x406 == RADIX_TREE_RETRY. Fix this by not breaking out of the loop if the node points to an internal entry. Fixes: 66ee620f06f9 ("idr: Permit any valid kernel pointer to be stored") Signed-off-by: Greg Kurz --- lib/radix-tree.c |2 +- 1 file changed, 1 insertion(+), 1

[PATCH] radix tree: Don't return internal entries on lookup

2018-12-06 Thread Greg Kurz
lookup(), ie, 0x406 == RADIX_TREE_RETRY. Fix this by not breaking out of the loop if the node points to an internal entry. Fixes: 66ee620f06f9 ("idr: Permit any valid kernel pointer to be stored") Signed-off-by: Greg Kurz --- lib/radix-tree.c |2 +- 1 file changed, 1 insertion(+), 1

Re: [V9fs-developer] [PATCH v2] net/9p/trans_virtio.c: add null terminal for mount tag

2018-08-02 Thread Greg Kurz
On Thu, 2 Aug 2018 09:59:38 +0800 piaojun wrote: > Hi Dominique, > > On 2018/8/2 9:54, Dominique Martinet wrote: > > piaojun wrote on Thu, Aug 02, 2018: > >> chan->tag is Non-null terminated which will result in printing messy code > >> when debugging code. So we should add '\0' for tag to

Re: [V9fs-developer] [PATCH v2] net/9p/trans_virtio.c: add null terminal for mount tag

2018-08-02 Thread Greg Kurz
On Thu, 2 Aug 2018 09:59:38 +0800 piaojun wrote: > Hi Dominique, > > On 2018/8/2 9:54, Dominique Martinet wrote: > > piaojun wrote on Thu, Aug 02, 2018: > >> chan->tag is Non-null terminated which will result in printing messy code > >> when debugging code. So we should add '\0' for tag to

Re: [PATCH v2 1/2] net/9p: embed fcall in req to round down buffer allocs

2018-08-02 Thread Greg Kurz
y fragmentation. > > Suggested-by: Matthew Wilcox > Signed-off-by: Dominique Martinet > Cc: Matthew Wilcox > Cc: Greg Kurz > Cc: Jun Piao > --- > > v2: > - Add extra label to not free uninitialized memory on alloc failure > - Rename p9_fcall_alloc to 9p_fcall_init &

Re: [PATCH v2 1/2] net/9p: embed fcall in req to round down buffer allocs

2018-08-02 Thread Greg Kurz
y fragmentation. > > Suggested-by: Matthew Wilcox > Signed-off-by: Dominique Martinet > Cc: Matthew Wilcox > Cc: Greg Kurz > Cc: Jun Piao > --- > > v2: > - Add extra label to not free uninitialized memory on alloc failure > - Rename p9_fcall_alloc to 9p_fcall_init &

Re: [V9fs-developer] [PATCH 1/2] net/9p: embed fcall in req to round down buffer allocs

2018-08-01 Thread Greg Kurz
On Wed, 1 Aug 2018 16:38:40 +0200 Dominique Martinet wrote: > Greg Kurz wrote on Wed, Aug 01, 2018: > > > @@ -263,13 +261,13 @@ p9_tag_alloc(struct p9_client *c, int8_t type, > > > unsigned int max_size) > > > if (!req) > > > return NULL;

Re: [V9fs-developer] [PATCH 1/2] net/9p: embed fcall in req to round down buffer allocs

2018-08-01 Thread Greg Kurz
On Wed, 1 Aug 2018 16:38:40 +0200 Dominique Martinet wrote: > Greg Kurz wrote on Wed, Aug 01, 2018: > > > @@ -263,13 +261,13 @@ p9_tag_alloc(struct p9_client *c, int8_t type, > > > unsigned int max_size) > > > if (!req) > > > return NULL;

Re: [V9fs-developer] [PATCH 2/2] net/9p: add a per-client fcall kmem_cache

2018-08-01 Thread Greg Kurz
On Mon, 30 Jul 2018 11:34:23 +0200 Dominique Martinet wrote: > From: Dominique Martinet > > Having a specific cache for the fcall allocations helps speed up > allocations a bit, especially in case of non-"round" msizes. > > The caches will automatically be merged if there are multiple caches

Re: [V9fs-developer] [PATCH 2/2] net/9p: add a per-client fcall kmem_cache

2018-08-01 Thread Greg Kurz
On Mon, 30 Jul 2018 11:34:23 +0200 Dominique Martinet wrote: > From: Dominique Martinet > > Having a specific cache for the fcall allocations helps speed up > allocations a bit, especially in case of non-"round" msizes. > > The caches will automatically be merged if there are multiple caches

Re: [V9fs-developer] [PATCH 1/2] net/9p: embed fcall in req to round down buffer allocs

2018-08-01 Thread Greg Kurz
On Mon, 30 Jul 2018 11:34:22 +0200 Dominique Martinet wrote: > From: Dominique Martinet > > 'msize' is often a power of two, or at least page-aligned, so avoiding > an overhead of two dozen bytes for each allocation will help the > allocator do its work and reduce memory fragmentation. > >

Re: [V9fs-developer] [PATCH 1/2] net/9p: embed fcall in req to round down buffer allocs

2018-08-01 Thread Greg Kurz
On Mon, 30 Jul 2018 11:34:22 +0200 Dominique Martinet wrote: > From: Dominique Martinet > > 'msize' is often a power of two, or at least page-aligned, so avoiding > an overhead of two dozen bytes for each allocation will help the > allocator do its work and reduce memory fragmentation. > >

Re: [PATCH] net/9p/trans_virtio.c: add a terminal char for mount tag

2018-08-01 Thread Greg Kurz
On Wed, 1 Aug 2018 16:24:27 +0800 piaojun wrote: > Hi Dominique, > > On 2018/8/1 16:11, Dominique Martinet wrote: > > piaojun wrote on Wed, Aug 01, 2018: > >> chan->tag has no terminal char at last which will result in printing messy > >> code when debugging code. So we should add '\0' for

Re: [PATCH] net/9p/trans_virtio.c: add a terminal char for mount tag

2018-08-01 Thread Greg Kurz
On Wed, 1 Aug 2018 16:24:27 +0800 piaojun wrote: > Hi Dominique, > > On 2018/8/1 16:11, Dominique Martinet wrote: > > piaojun wrote on Wed, Aug 01, 2018: > >> chan->tag has no terminal char at last which will result in printing messy > >> code when debugging code. So we should add '\0' for

Re: [PATCH v2 5/6] 9p: Use a slab for allocating requests

2018-07-23 Thread Greg Kurz
On Mon, 23 Jul 2018 14:25:31 +0200 Dominique Martinet wrote: > Greg Kurz wrote on Mon, Jul 23, 2018: > > The patch is quite big and I'm not sure I can find time to review it > > carefully, but I'll try to help anyway. > > No worry, thanks for this already. > >

Re: [PATCH v2 5/6] 9p: Use a slab for allocating requests

2018-07-23 Thread Greg Kurz
On Mon, 23 Jul 2018 14:25:31 +0200 Dominique Martinet wrote: > Greg Kurz wrote on Mon, Jul 23, 2018: > > The patch is quite big and I'm not sure I can find time to review it > > carefully, but I'll try to help anyway. > > No worry, thanks for this already. > >

Re: [PATCH v2 5/6] 9p: Use a slab for allocating requests

2018-07-23 Thread Greg Kurz
On Wed, 18 Jul 2018 12:05:54 +0200 Dominique Martinet wrote: > +Cc Greg, I could use your opinion on this if you have a moment. > Hi Dominique, The patch is quite big and I'm not sure I can find time to review it carefully, but I'll try to help anyway. > Matthew Wilcox wrote on Wed, Jul 11,

Re: [PATCH v2 5/6] 9p: Use a slab for allocating requests

2018-07-23 Thread Greg Kurz
On Wed, 18 Jul 2018 12:05:54 +0200 Dominique Martinet wrote: > +Cc Greg, I could use your opinion on this if you have a moment. > Hi Dominique, The patch is quite big and I'm not sure I can find time to review it carefully, but I'll try to help anyway. > Matthew Wilcox wrote on Wed, Jul 11,

Re: [V9fs-developer] [PATCH v2 4/6] 9p: Embed wait_queue_head into p9_req_t

2018-07-12 Thread Greg Kurz
On Thu, 12 Jul 2018 16:40:12 +0200 Dominique Martinet wrote: > Greg Kurz wrote on Thu, Jul 12, 2018: > > This is true when all tags have been used at least once. But the current > > code > > lazily allocates the wait_queue_head_t, ie, only when a tag is used for the >

Re: [V9fs-developer] [PATCH v2 4/6] 9p: Embed wait_queue_head into p9_req_t

2018-07-12 Thread Greg Kurz
On Thu, 12 Jul 2018 16:40:12 +0200 Dominique Martinet wrote: > Greg Kurz wrote on Thu, Jul 12, 2018: > > This is true when all tags have been used at least once. But the current > > code > > lazily allocates the wait_queue_head_t, ie, only when a tag is used for the >

Re: [V9fs-developer] [PATCH v2 4/6] 9p: Embed wait_queue_head into p9_req_t

2018-07-12 Thread Greg Kurz
s changed, 7 insertions(+), 16 deletions(-) > ... and the diffstat is nice :) so Reviewed-by: Greg Kurz > diff --git a/include/net/9p/client.h b/include/net/9p/client.h > index e405729cd1c7..0fa0fbab33b0 100644 > --- a/include/net/9p/client.h > +++ b/include/net/9p/client

Re: [V9fs-developer] [PATCH v2 4/6] 9p: Embed wait_queue_head into p9_req_t

2018-07-12 Thread Greg Kurz
s changed, 7 insertions(+), 16 deletions(-) > ... and the diffstat is nice :) so Reviewed-by: Greg Kurz > diff --git a/include/net/9p/client.h b/include/net/9p/client.h > index e405729cd1c7..0fa0fbab33b0 100644 > --- a/include/net/9p/client.h > +++ b/include/net/9p/client

Re: [V9fs-developer] [PATCH v2 2/6] 9p: Change p9_fid_create calling convention

2018-07-12 Thread Greg Kurz
atthew Wilcox > --- Reviewed-by: Greg Kurz > net/9p/client.c | 23 +-- > 1 file changed, 9 insertions(+), 14 deletions(-) > > diff --git a/net/9p/client.c b/net/9p/client.c > index 999eceb8af98..389a2904b7b3 100644 > --- a/net/9p/client.c > +++ b

Re: [V9fs-developer] [PATCH v2 2/6] 9p: Change p9_fid_create calling convention

2018-07-12 Thread Greg Kurz
atthew Wilcox > --- Reviewed-by: Greg Kurz > net/9p/client.c | 23 +-- > 1 file changed, 9 insertions(+), 14 deletions(-) > > diff --git a/net/9p/client.c b/net/9p/client.c > index 999eceb8af98..389a2904b7b3 100644 > --- a/net/9p/client.c > +++ b

Re: [V9fs-developer] [PATCH v2 1/6] 9p: Fix comment on smp_wmb

2018-07-12 Thread Greg Kurz
On Wed, 11 Jul 2018 14:02:20 -0700 Matthew Wilcox wrote: > The previous comment misled me into thinking the barrier wasn't needed > at all. > > Signed-off-by: Matthew Wilcox > --- Reviewed-by: Greg Kurz > net/9p/client.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [V9fs-developer] [PATCH v2 1/6] 9p: Fix comment on smp_wmb

2018-07-12 Thread Greg Kurz
On Wed, 11 Jul 2018 14:02:20 -0700 Matthew Wilcox wrote: > The previous comment misled me into thinking the barrier wasn't needed > at all. > > Signed-off-by: Matthew Wilcox > --- Reviewed-by: Greg Kurz > net/9p/client.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [V9fs-developer] [PATCH] net/9p/client.c: put refcount of trans_mod in error case in parse_opts()

2018-07-09 Thread Greg Kurz
fcount of trans_mod in error case. > > Fixes: 9421c3e64137ec ("net/9p/client.c: fix potential refcnt problem of > trans module") > > Signed-off-by: Jun Piao > --- Reviewed-by: Greg Kurz > net/9p/client.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [V9fs-developer] [PATCH] net/9p/client.c: put refcount of trans_mod in error case in parse_opts()

2018-07-09 Thread Greg Kurz
fcount of trans_mod in error case. > > Fixes: 9421c3e64137ec ("net/9p/client.c: fix potential refcnt problem of > trans module") > > Signed-off-by: Jun Piao > --- Reviewed-by: Greg Kurz > net/9p/client.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [PATCH] net/9p: avoid -ERESTARTSYS leak to userspace

2018-03-10 Thread Greg Kurz
Hi Andrew, Thank you very much for taking care of this. Please find my answers to your remarks below. On Fri, 9 Mar 2018 14:12:52 -0800 Andrew Morton <a...@linux-foundation.org> wrote: > On Fri, 09 Mar 2018 21:41:38 +0100 Greg Kurz <gr...@kaod.org> wrote: > > &g

Re: [PATCH] net/9p: avoid -ERESTARTSYS leak to userspace

2018-03-10 Thread Greg Kurz
Hi Andrew, Thank you very much for taking care of this. Please find my answers to your remarks below. On Fri, 9 Mar 2018 14:12:52 -0800 Andrew Morton wrote: > On Fri, 09 Mar 2018 21:41:38 +0100 Greg Kurz wrote: > > > If it was interrupted by a signal, the 9p client may need

[PATCH] net/9p: avoid -ERESTARTSYS leak to userspace

2018-03-09 Thread Greg Kurz
functions with a trivial label+goto. Thanks to Laurent Dufour for his help and suggestions on how to find the root cause and how to fix it. Signed-off-by: Greg Kurz <gr...@kaod.org> --- net/9p/client.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/9p/client.c

[PATCH] net/9p: avoid -ERESTARTSYS leak to userspace

2018-03-09 Thread Greg Kurz
functions with a trivial label+goto. Thanks to Laurent Dufour for his help and suggestions on how to find the root cause and how to fix it. Signed-off-by: Greg Kurz --- net/9p/client.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/9p/client.c b/net/9p/client.c

Re: [V9fs-developer] [PATCH] net/9p: avoid -ERESTARTSYS leak to userspace

2018-02-20 Thread Greg Kurz
Hi Al, It's been two years without any sign of life from 9p maintainers... :-\ Would you apply (or nack) this patch ? Thanks, -- Greg PS: in the case you apply it, probable Cc sta...@vger.kernel.org as well On Thu, 08 Feb 2018 18:38:49 +0100 Greg Kurz <gr...@kaod.org>

Re: [V9fs-developer] [PATCH] net/9p: avoid -ERESTARTSYS leak to userspace

2018-02-20 Thread Greg Kurz
Hi Al, It's been two years without any sign of life from 9p maintainers... :-\ Would you apply (or nack) this patch ? Thanks, -- Greg PS: in the case you apply it, probable Cc sta...@vger.kernel.org as well On Thu, 08 Feb 2018 18:38:49 +0100 Greg Kurz wrote: > If it was interrup

Re: [V9fs-developer] [RFC] we should solve create-unlink-getattr idiom

2018-02-09 Thread Greg Kurz
On Fri, 9 Feb 2018 08:21:52 +0100 Veaceslav Falico wrote: > Hi Yiwen, all, > > On 2/9/2018 8:10 AM, jiangyiwen wrote: > > Hi Eric and Greg, > > > > I encountered the similar problem with create-unlink-getattr idiom. > > I use the testcase that create-unlink-setattr

Re: [V9fs-developer] [RFC] we should solve create-unlink-getattr idiom

2018-02-09 Thread Greg Kurz
On Fri, 9 Feb 2018 08:21:52 +0100 Veaceslav Falico wrote: > Hi Yiwen, all, > > On 2/9/2018 8:10 AM, jiangyiwen wrote: > > Hi Eric and Greg, > > > > I encountered the similar problem with create-unlink-getattr idiom. > > I use the testcase that create-unlink-setattr idiom, and I see the > > bug

Re: [V9fs-developer] [RFC] we should solve create-unlink-getattr idiom

2018-02-09 Thread Greg Kurz
On Fri, 9 Feb 2018 15:10:46 +0800 jiangyiwen wrote: > Hi Eric and Greg, > > I encountered the similar problem with create-unlink-getattr idiom. > I use the testcase that create-unlink-setattr idiom, and I see the > bug is reported at

Re: [V9fs-developer] [RFC] we should solve create-unlink-getattr idiom

2018-02-09 Thread Greg Kurz
On Fri, 9 Feb 2018 15:10:46 +0800 jiangyiwen wrote: > Hi Eric and Greg, > > I encountered the similar problem with create-unlink-getattr idiom. > I use the testcase that create-unlink-setattr idiom, and I see the > bug is reported at https://bugs.launchpad.net/qemu/+bug/1336794. > Then I also

Re: [V9fs-developer] [PATCH] 9p/trans_virtio: discard zero-length reply

2018-02-08 Thread Greg Kurz
Ping ? Michael, Since this is virtio code and you have acked the QEMU part of the fix already, would you be kind enough to take this through your tree ? Cheers, -- Greg On Mon, 22 Jan 2018 22:02:05 +0100 Greg Kurz <gr...@kaod.org> wrote: > When a 9p request is successfull

Re: [V9fs-developer] [PATCH] 9p/trans_virtio: discard zero-length reply

2018-02-08 Thread Greg Kurz
Ping ? Michael, Since this is virtio code and you have acked the QEMU part of the fix already, would you be kind enough to take this through your tree ? Cheers, -- Greg On Mon, 22 Jan 2018 22:02:05 +0100 Greg Kurz wrote: > When a 9p request is successfully flushed, the server is expec

[PATCH] net/9p: avoid -ERESTARTSYS leak to userspace

2018-02-08 Thread Greg Kurz
with a trivial label+goto. Thanks to Laurent Dufour for his help and suggestions on how to find the root cause and how to fix it. Signed-off-by: Greg Kurz <gr...@kaod.org> --- net/9p/client.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/9p/client.c b/

[PATCH] net/9p: avoid -ERESTARTSYS leak to userspace

2018-02-08 Thread Greg Kurz
with a trivial label+goto. Thanks to Laurent Dufour for his help and suggestions on how to find the root cause and how to fix it. Signed-off-by: Greg Kurz --- net/9p/client.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/9p/client.c b/net/9p/client.c index

[PATCH] 9p/trans_virtio: discard zero-length reply

2018-01-22 Thread Greg Kurz
the client will erroneously assume the request has not been flushed. Signed-off-by: Greg Kurz <gr...@kaod.org> --- net/9p/trans_virtio.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 0845aad4ba51..ca08c72ef4de 100644 ---

[PATCH] 9p/trans_virtio: discard zero-length reply

2018-01-22 Thread Greg Kurz
the client will erroneously assume the request has not been flushed. Signed-off-by: Greg Kurz --- net/9p/trans_virtio.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 0845aad4ba51..ca08c72ef4de 100644 --- a/net/9p/trans_virtio.c

Re: [PATCH 1/2] virtio: allow to detach a buffer from the virtqueue

2018-01-20 Thread Greg Kurz
On Fri, 19 Jan 2018 21:49:38 +0200 "Michael S. Tsirkin" <m...@redhat.com> wrote: > On Wed, Dec 20, 2017 at 06:46:42PM +0100, Greg Kurz wrote: > > It is possible for a device to stop using buffers without pushing them > > back to the driver. This is the case

Re: [PATCH 1/2] virtio: allow to detach a buffer from the virtqueue

2018-01-20 Thread Greg Kurz
On Fri, 19 Jan 2018 21:49:38 +0200 "Michael S. Tsirkin" wrote: > On Wed, Dec 20, 2017 at 06:46:42PM +0100, Greg Kurz wrote: > > It is possible for a device to stop using buffers without pushing them > > back to the driver. This is the case for example with the 9p virtio

Re: [PATCH 0/2] 9p/trans_virtio: handle request cancellation

2018-01-08 Thread Greg Kurz
Hi Michael, I wish you a happy new year, and I really need some feedback on this series because it holds down some patches on the QEMU side. Thanks, -- Greg On Wed, 20 Dec 2017 18:46:27 +0100 Greg Kurz <gr...@kaod.org> wrote: > The 9p protocol mostly relies on a request/reply dialo

Re: [PATCH 0/2] 9p/trans_virtio: handle request cancellation

2018-01-08 Thread Greg Kurz
Hi Michael, I wish you a happy new year, and I really need some feedback on this series because it holds down some patches on the QEMU side. Thanks, -- Greg On Wed, 20 Dec 2017 18:46:27 +0100 Greg Kurz wrote: > The 9p protocol mostly relies on a request/reply dialog between the >

[PATCH 1/2] virtio: allow to detach a buffer from the virtqueue

2017-12-20 Thread Greg Kurz
the dialog with the device, ie, serialize all I/Os. This patch hence gives the possibility for device specific code to explicitly detach a given buffer from the used ring and put it back to the free list. [*] http://man.cat-v.org/plan_9/5/flush Signed-off-by: Greg Kurz <gr...@kaod.org> ---

[PATCH 1/2] virtio: allow to detach a buffer from the virtqueue

2017-12-20 Thread Greg Kurz
the dialog with the device, ie, serialize all I/Os. This patch hence gives the possibility for device specific code to explicitly detach a given buffer from the used ring and put it back to the free list. [*] http://man.cat-v.org/plan_9/5/flush Signed-off-by: Greg Kurz --- drivers/virtio/virtio_rin

[PATCH 0/2] 9p/trans_virtio: handle request cancellation

2017-12-20 Thread Greg Kurz
server in QEMU had a bug and would always reply to flushed requests. But this will be fixed soon, so it is time to implement the 'cancelled' operation in the 9p virtio transport. -- Greg --- Greg Kurz (2): virtio: allow to detach a buffer from the virtqueue 9p/trans_virtio: implement

  1   2   3   4   5   >