Re: [PATCH -rc 0/4] Protect from GCC garbage input in GCOV

2020-09-02 Thread Leon Romanovsky
On Wed, Sep 02, 2020 at 11:24:50AM -0700, Linus Torvalds wrote: > On Wed, Sep 2, 2020 at 10:52 AM Leon Romanovsky wrote: > > > > Are you suggesting something like this? > > > > diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig > > index 3110c77230c7..bc0e355f

Re: [PATCH -rc 0/4] Protect from GCC garbage input in GCOV

2020-09-02 Thread Leon Romanovsky
On Wed, Sep 02, 2020 at 10:42:55AM -0700, Linus Torvalds wrote: > On Wed, Sep 2, 2020 at 1:55 AM Leon Romanovsky wrote: > > > > Bottom line, GCOV is broken on GCC 10.2. > > The patches don't really make sense to me. > > How about we just disable GCOV with the kn

Re: [PATCH rdma-next 1/4] gcov: Open-code kmemdup() to work correctly with kernel and user space pointers

2020-09-02 Thread Leon Romanovsky
On Wed, Sep 02, 2020 at 10:38:20AM -0700, Linus Torvalds wrote: > On Wed, Sep 2, 2020 at 1:55 AM Leon Romanovsky wrote: > > > > The kernel with KASAN and GCOV enabled generates the following splat > > due to the situation that gcov_info can be both user and kernel point

Re: [PATCH] RDMA: error code handling

2020-09-02 Thread Leon Romanovsky
ile changed, 1 insertion(+), 1 deletion(-) > Fixes: 057729cb2347 ("RDMA/ocrdma: Remove driver QP state machine") Thanks, Reviewed-by: Leon Romanovsky

[PATCH rdma-next 1/4] gcov: Open-code kmemdup() to work correctly with kernel and user space pointers

2020-09-02 Thread Leon Romanovsky
From: Leon Romanovsky The kernel with KASAN and GCOV enabled generates the following splat due to the situation that gcov_info can be both user and kernel pointer. It is triggered by the memcpy() inside kmemdup(), so as a possible solution let's copy fields manually

[PATCH -rc 0/4] Protect from GCC garbage input in GCOV

2020-09-02 Thread Leon Romanovsky
From: Leon Romanovsky Hi Linus, Both Colin in Ubuntu [1] and I in FC 32 are having same kernel crashes while GCOV is enabled. The reason to it that n_fuction variable that should be provided by GCC is not initialized (or wrongly set). This patch is based on the RFC [2] which I sent to gather

[PATCH rdma-next 2/4] gcov: Use proper duplication routine for const pointer

2020-09-02 Thread Leon Romanovsky
From: Leon Romanovsky The filename is a const pointer, so use the proper string duplication routine that takes into account const identifier. Cc: Colin Ian King Signed-off-by: Leon Romanovsky --- kernel/gcov/gcc_4_7.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH rdma-next 3/4] gcov: Protect from uninitialized number of functions provided by GCC 10.2

2020-09-02 Thread Leon Romanovsky
From: Leon Romanovsky The kernel compiled with GCC 10.2.1 and KASAN together with GCOV enabled produces the following splat while reloading modules. The very similar trace was reported by Colin [1]. [ cut here ] WARNING: CPU: 0 PID: 296 at mm/page_alloc.c:4859

[PATCH rdma-next 4/4] gcov: Don't print out-of-memory print for all failed files

2020-09-02 Thread Leon Romanovsky
From: Leon Romanovsky Once GCOV fails to duplicate information, the following error is printed: gcov: could not save data for '/home/leonro/src/kernel/drivers/infiniband/hw/mlx5/std_types.gcda' (out of memory) In the event of out-of-memory such prints are seen for almost every kernel file

[PATCH rdma-next 0/2] Convert RWQ and MW to general allocation scheme

2020-09-02 Thread Leon Romanovsky
From: Leon Romanovsky Continue with allocation patches. Leon Romanovsky (2): RDMA: Clean MW allocation and free flows RDMA: Convert RWQ table logic to ib_core allocation scheme drivers/infiniband/core/device.c| 2 + drivers/infiniband/core/uverbs_cmd.c| 45

[PATCH rdma-next 0/8] Cleanup and fix the CMA state machine

2020-09-02 Thread Leon Romanovsky
From: Leon Romanovsky >From Jason: The RDMA CMA continues to attract syzkaller bugs due to its somewhat loose operation of its FSM. Audit and scrub the whole thing to follow modern expectations. Overall the design elements are broadly: - The ULP entry points MUST NOT run in parallel with e

[PATCH rdma-next v1 00/13] Track memory allocation with restrack DB help

2020-08-30 Thread Leon Romanovsky
From: Leon Romanovsky Changelog: v1: * Fixed rebase error, deleted second assignment of qp_type. * Rebased code on latests rdma-next, the changes in cma.c caused to change in patch "RDMA/cma: Delete from restrack DB after successful destroy". * Dropped patch of port

[PATCH rdma-next v1 00/10] Restore failure of destroy commands

2020-08-30 Thread Leon Romanovsky
From: Leon Romanovsky Changelog: v1: * Changed returned value in efa_destroy_ah() from EINVAL to EOPNOTSUPP v0: * https://lore.kernel.org/lkml/20200824103247.1088464-1-l...@kernel.org - Hi, This series restores

Re: [RFC PATCH -rc] gcov: Protect from uninitialized number of functions provided by GCC

2020-08-30 Thread Leon Romanovsky
On Sat, Aug 29, 2020 at 5:12 PM Colin Ian King wrote: > > On 27/08/2020 14:39, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > The kernel compiled with GCC 10.2.1 and KASAN together with GCOV enabled > > produces the following splats while reloading m

Re: [RFC PATCH -rc] gcov: Protect from uninitialized number of functions provided by GCC

2020-08-27 Thread Leon Romanovsky
On Thu, Aug 27, 2020 at 04:39:32PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > The kernel compiled with GCC 10.2.1 and KASAN together with GCOV enabled > produces the following splats while reloading modules. > > First splat [1] is generated due to the situation

[RFC PATCH -rc] gcov: Protect from uninitialized number of functions provided by GCC

2020-08-27 Thread Leon Romanovsky
From: Leon Romanovsky The kernel compiled with GCC 10.2.1 and KASAN together with GCOV enabled produces the following splats while reloading modules. First splat [1] is generated due to the situation that gcov_info can be both user and kernel pointer, the memcpy() during kmemdup() causes

[PATCH rdma-next 00/14] Track memory allocation with restrack DB help

2020-08-24 Thread Leon Romanovsky
From: Leon Romanovsky The resource tracker has built-in kref counter to synchronize object release. It makes restrack perfect choice to be responsible for the memory lifetime of any object in which restrack entry is embedded. In order to make it, the restrack was changed to be mandatory and all

[PATCH rdma-next 00/10] Restore failure of destroy commands

2020-08-24 Thread Leon Romanovsky
From: Leon Romanovsky Hi, This series restores the ability to fail on destroy commands, due to the fact that mlx5_ib DEVX implementation interleaved ib_core objects with FW objects without sharing reference counters. In a retrospective, every part of the mlx5_ib flow is correct. It started

Re: [PATCH 0/3] Fixes to GCC warnings while compiling with W=1 level

2020-08-19 Thread Leon Romanovsky
On Wed, Aug 19, 2020 at 05:16:27PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > Hi, > > The series of trivial fixes for GCC warnings seen while compiling with W=1. > > Thanks > > Leon Romanovsky (3): > fs/btfrs: Fix -Wunused-but-set-variable warnings

[PATCH 2/3] fs/btrfs: Fix -Wignored-qualifiers warnings

2020-08-19 Thread Leon Romanovsky
From: Leon Romanovsky Change function declarations to avoid the following GCC warnings while compiling with W=1 level. In file included from fs/btrfs/volumes.c:28: fs/btrfs/sysfs.h:16:1: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] 16 | const char

[PATCH 0/3] Fixes to GCC warnings while compiling with W=1 level

2020-08-19 Thread Leon Romanovsky
From: Leon Romanovsky Hi, The series of trivial fixes for GCC warnings seen while compiling with W=1. Thanks Leon Romanovsky (3): fs/btfrs: Fix -Wunused-but-set-variable warnings fs/btrfs: Fix -Wignored-qualifiers warnings fs/btrfs: Fix -Wmissing-prototypes warnings fs/btrfs

[PATCH 3/3] fs/btrfs: Fix -Wmissing-prototypes warnings

2020-08-19 Thread Leon Romanovsky
From: Leon Romanovsky Move function declaration to shared header file to fix multiple -Wmissing-prototypes warnings like below: fs/btrfs/zstd.c:369:5: warning: no previous prototype for ‘zstd_compress_pages’ [-Wmissing-prototypes] 369 | int zstd_compress_pages(struct list_head *ws, struct

[PATCH 1/3] fs/btfrs: Fix -Wunused-but-set-variable warnings

2020-08-19 Thread Leon Romanovsky
From: Leon Romanovsky The compilation with W=1 generates the following warnings: fs/btrfs/sysfs.c:1630:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] 1630 | int ret; | ^~~ fs/btrfs/sysfs.c:1629:6: warning: variable 'features' set but not used [-Wunused

[PATCH v1] fs: Add function declaration of simple_dname

2020-08-19 Thread Leon Romanovsky
From: Leon Romanovsky The simple_dname() is declared in internal header file but the declaration is missing in d_path.c. The compilation with W=1 generates the following GCC warning. fs/d_path.c:311:7: warning: no previous prototype for 'simple_dname' [-Wmissing-prototypes] 311 | char

Re: [PATCH] fs: Add function declaration of simple_dname

2020-08-19 Thread Leon Romanovsky
On Wed, Aug 19, 2020 at 12:47:55PM +0100, Matthew Wilcox wrote: > On Wed, Aug 19, 2020 at 02:40:01PM +0300, Leon Romanovsky wrote: > > On Wed, Aug 19, 2020 at 12:34:24PM +0100, Matthew Wilcox wrote: > > > On Wed, Aug 19, 2020 at 11:32:59AM +0300, Leon Romanovsky wrote:

Re: [PATCH] fs: Add function declaration of simple_dname

2020-08-19 Thread Leon Romanovsky
On Wed, Aug 19, 2020 at 12:34:24PM +0100, Matthew Wilcox wrote: > On Wed, Aug 19, 2020 at 11:32:59AM +0300, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > The simple_dname() is declared in internal header file as extern > > and this generates the followin

Re: [RFC PATCH] ceph: Delete features that are not used in the kernel

2020-08-19 Thread Leon Romanovsky
On Wed, Aug 19, 2020 at 10:47:38AM +0200, Ilya Dryomov wrote: > On Wed, Aug 19, 2020 at 9:57 AM Leon Romanovsky wrote: > > > > From: Leon Romanovsky > > > > The ceph_features.h has declaration of features that are not in-use > > in kernel code. This causes to

Re: [PATCH] mm: Fix missing function declaration

2020-08-19 Thread Leon Romanovsky
On Wed, Aug 19, 2020 at 02:16:39PM +0530, Anshuman Khandual wrote: > > > On 08/19/2020 01:30 PM, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > The compilation with CONFIG_DEBUG_RODATA_TEST set produces the following > > warning due to the missing includ

[PATCH] fs: Add function declaration of simple_dname

2020-08-19 Thread Leon Romanovsky
From: Leon Romanovsky The simple_dname() is declared in internal header file as extern and this generates the following GCC warning. fs/d_path.c:311:7: warning: no previous prototype for 'simple_dname' [-Wmissing-prototypes] 311 | char *simple_dname(struct dentry *dentry, char *buffer, int

[PATCH] mm: Fix missing function declaration

2020-08-19 Thread Leon Romanovsky
From: Leon Romanovsky The compilation with CONFIG_DEBUG_RODATA_TEST set produces the following warning due to the missing include. mm/rodata_test.c:15:6: warning: no previous prototype for 'rodata_test' [-Wmissing-prototypes] 15 | void rodata_test(void) | ^~~ Fixes

[PATCH RESEND] fs: Delete always true compilation define

2020-08-19 Thread Leon Romanovsky
From: Leon Romanovsky In commit 1027abe8827b ("[PATCH] merge locate_fd() and get_unused_fd()") the existing "#if 1" was moved from one place to another. Originally that compilation define was set for the sanity check and more than 12 years later it is safe to remove it.

[RFC PATCH] ceph: Delete features that are not used in the kernel

2020-08-19 Thread Leon Romanovsky
From: Leon Romanovsky The ceph_features.h has declaration of features that are not in-use in kernel code. This causes to seeing such compilation warnings in almost every kernel compilation. ./include/linux/ceph/ceph_features.h:14:24: warning: 'CEPH_FEATURE_UID' defined but not used [-Wunused

[PATCH rdma-next 00/14] Cleanup locking and events in ucma

2020-08-18 Thread Leon Romanovsky
From: Leon Romanovsky >From Jason: Rework how the uevents for new connections are handled so all the locking ends up simpler and a work queue can be removed. This should also speed up destruction of ucma_context's as a flush_workqueue() was replaced with cancel_work_sync(). The simpler lock

Re: [PATCH v2] overflow: Add __must_check attribute to check_*() helpers

2020-08-18 Thread Leon Romanovsky
On Mon, Aug 17, 2020 at 12:36:51PM -0700, Kees Cook wrote: > On Mon, Aug 17, 2020 at 11:08:54AM +0200, David Sterba wrote: > > On Sat, Aug 15, 2020 at 10:09:24AM -0700, Kees Cook wrote: > > > +static inline bool __must_check __must_check_overflow(bool overflow) > > > +{ > > > + return

Re: [PATCH] IB/mlx5: Fix memleak in subscribe_event_xa_alloc

2020-08-16 Thread Leon Romanovsky
("IB/mlx5: Enable subscription for device events over > DEVX") > Signed-off-by: Dinghao Liu > --- > drivers/infiniband/hw/mlx5/devx.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > Thanks, Acked-by: Leon Romanovsky

[PATCH rdma-next] MAINTAINERS: Update Mellanox and Cumulus Network addresses to new domain

2020-08-10 Thread Leon Romanovsky
From: Leon Romanovsky Mellanox and Cumulus Network were acquired by Nvidia, so change the maintainers emails to new domain name. Signed-off-by: Leon Romanovsky --- .mailmap| 2 ++ MAINTAINERS | 58 ++--- 2 files changed, 31 insertions

Re: [Linux-kernel-mentees] [PATCH net] rds: Prevent kernel-infoleak in rds_notify_queue_get()

2020-08-09 Thread Leon Romanovsky
On Sat, Aug 08, 2020 at 03:57:33PM -0700, Jack Leadford wrote: > Hello! > > Thanks to Jason for getting this conversation back on track. > > Yes: in general, {} or a partial initializer /will/ zero padding bits. > > However, there is a bug in some versions of GCC where {} will /not/ zero > padding

Re: [Linux-kernel-mentees] [PATCH net] rds: Prevent kernel-infoleak in rds_notify_queue_get()

2020-08-02 Thread Leon Romanovsky
g 01, 2020 at 08:38:33AM +0300, Leon Romanovsky wrote: > > > > > > > > > I'm using {} instead of {0} because of this GCC bug. > > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119 > > > > > > > > This is why the {} extension

Re: [Linux-kernel-mentees] [PATCH net] rds: Prevent kernel-infoleak in rds_notify_queue_get()

2020-07-31 Thread Leon Romanovsky
On Fri, Jul 31, 2020 at 07:19:24PM +0200, Greg Kroah-Hartman wrote: > On Fri, Jul 31, 2020 at 11:36:04AM -0300, Jason Gunthorpe wrote: > > On Fri, Jul 31, 2020 at 04:21:48PM +0200, Greg Kroah-Hartman wrote: > > > > > > The spec was updated in C11 to require zero'ing padding when doing > > > >

Re: [Linux-kernel-mentees] [PATCH net] rds: Prevent kernel-infoleak in rds_notify_queue_get()

2020-07-31 Thread Leon Romanovsky
On Fri, Jul 31, 2020 at 09:29:27AM +0300, Andy Shevchenko wrote: > On Friday, July 31, 2020, Greg Kroah-Hartman > wrote: > > > On Fri, Jul 31, 2020 at 07:33:06AM +0200, Greg Kroah-Hartman wrote: > > > On Fri, Jul 31, 2020 at 07:53:01AM +0300, Leon Romanovsky wrote: >

Re: [Linux-kernel-mentees] [PATCH net] rds: Prevent kernel-infoleak in rds_notify_queue_get()

2020-07-30 Thread Leon Romanovsky
On Thu, Jul 30, 2020 at 03:20:26PM -0400, Peilin Ye wrote: > rds_notify_queue_get() is potentially copying uninitialized kernel stack > memory to userspace since the compiler may leave a 4-byte hole at the end > of `cmsg`. > > In 2016 we tried to fix this issue by doing `= { 0 };` on `cmsg`, which

[PATCH rdma-rc 0/3] Simple fixes to DIM and mlx5

2020-07-30 Thread Leon Romanovsky
From: Leon Romanovsky Hi, First patch fixes an issue observed after auto-PID series was merged, but because the bug that not-initialized mutex existed before, the patch is sent to -rc. Other two patches are fixing unwind flows and appropriate for -rc. Thanks Leon Romanovsky (3): RDMA/mlx5

[PATCH rdma-next 0/3] Cleanups to flow creation paths

2020-07-30 Thread Leon Romanovsky
From: Leon Romanovsky Very straightforward cleanup. Thanks Leon Romanovsky (3): RDMA/mlx5: Simplify multiple else-if cases with switch keyword RDMA/mlx5: Replace open-coded offsetofend() macro RDMA: Remove constant domain argument from flow creation call drivers/infiniband/core

Re: linux-next: manual merge of the kspp tree with the rdma tree

2020-07-28 Thread Leon Romanovsky
On Tue, Jul 28, 2020 at 06:45:20PM +1000, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the kspp tree got a conflict in: > > drivers/infiniband/core/uverbs_cmd.c > > between commit: > > 29f3fe1d6854 ("RDMA/uverbs: Remove redundant assignments") > > from the rdma tree and

Re: [PATCH] RDMA/mlx5: fix typo in structure name

2020-07-24 Thread Leon Romanovsky
On Fri, Jul 24, 2020 at 10:41:12AM +0200, Pavel Machek wrote: > This is user API, but likely noone uses it...? Fix it before it > becomes problem. > > Signed-off-by: Pavel Machek (CIP) > > > diff --git a/include/uapi/rdma/mlx5_user_ioctl_cmds.h > b/include/uapi/rdma/mlx5_user_ioctl_cmds.h >

[PATCH rdma-next 0/4] Fix bugs around RDMA CM destroying state

2020-07-23 Thread Leon Romanovsky
From: Leon Romanovsky >From Jason: This small series simplifies some of the RDMA CM state transitions connected with DESTROYING states and in the process resolves a bug discovered by syzkaller. Thanks Jason Gunthorpe (4): RDMA/cma: Simplify DEVICE_REMOVAL for internal_id RDMA/cma: Us

Re: [PATCH for v5.9] RDS: Replace HTTP links with HTTPS ones

2020-07-21 Thread Leon Romanovsky
On Tue, Jul 21, 2020 at 08:43:00AM +0200, Alexander A. Klimov wrote: > > > Am 21.07.20 um 08:05 schrieb Leon Romanovsky: > > On Mon, Jul 20, 2020 at 11:34:00PM +0200, Alexander A. Klimov wrote: > > > > > > > > > Am 20.07.20 um 18:48 schrieb Leon Romanov

Re: [PATCH for v5.9] RDS: Replace HTTP links with HTTPS ones

2020-07-21 Thread Leon Romanovsky
On Mon, Jul 20, 2020 at 11:34:00PM +0200, Alexander A. Klimov wrote: > > > Am 20.07.20 um 18:48 schrieb Leon Romanovsky: > > On Mon, Jul 20, 2020 at 08:36:35AM -0600, Jonathan Corbet wrote: > > > On Mon, 20 Jul 2020 17:07:16 +0300 > > > Leon Romanovsky wro

[PATCH rdma-next v1 0/2] Fix warnings reported by kbuild

2020-07-20 Thread Leon Romanovsky
From: Leon Romanovsky Changelog v1: * Delete "pd" cleanup line * Moved all cleaned feilds to be last in declaration list to improve readability. v0: https://lore.kernel.org/lkml/20200719060319.77603-1-l...@kernel.org ---

Re: [PATCH for v5.9] RDS: Replace HTTP links with HTTPS ones

2020-07-20 Thread Leon Romanovsky
On Mon, Jul 20, 2020 at 08:36:35AM -0600, Jonathan Corbet wrote: > On Mon, 20 Jul 2020 17:07:16 +0300 > Leon Romanovsky wrote: > > > > Do *you* want to review that megapatch? The number of issues that have > > > come up make it clear that these patches do, indeed, nee

Re: [PATCH for v5.9] RDS: Replace HTTP links with HTTPS ones

2020-07-20 Thread Leon Romanovsky
On Mon, Jul 20, 2020 at 07:58:48AM -0600, Jonathan Corbet wrote: > On Mon, 20 Jul 2020 07:56:26 +0300 > Leon Romanovsky wrote: > > > > Documentation/networking/rds.rst | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > Why can't it be d

Re: [PATCH for v5.9] RDS: Replace HTTP links with HTTPS ones

2020-07-19 Thread Leon Romanovsky
On Sun, Jul 19, 2020 at 05:58:45PM +0200, Alexander A. Klimov wrote: > Rationale: > Reduces attack surface on kernel devs opening the links for MITM > as HTTPS traffic is much harder to manipulate. > > Deterministic algorithm: > For each file: > If not .svg: > For each line: > If

[PATCH rdma-next 0/2] Fix warnings reported by kbuild

2020-07-19 Thread Leon Romanovsky
From: Leon Romanovsky Hi, There are two change as were reported by kbuild. They are not important enough to have Fixes line. Thanks Leon Romanovsky (2): RDMA/uverbs: Remove redundant assignments RDMA/uverbs: Silence shiftTooManyBitsSigned warning drivers/infiniband/core/uverbs_cmd.c

[PATCH rdma-next v2 0/2] Align write() and ioctl() paths

2020-07-18 Thread Leon Romanovsky
From: Leon Romanovsky Changelog: v2: * Fixed warning reported by kbuild where I wrote same assignment twice. v1: https://lore.kernel.org/lkml/20200716103956.1422139-1-l...@kernel.org * v0 revealed old bug * https://lore.kernel.org/linux-rdma/20200716102059.1420681-1-l...@kernel.org

[PATCH rdma-next v1 0/2] Align write() and ioctl() paths

2020-07-16 Thread Leon Romanovsky
From: Leon Romanovsky Changelog: v1: * v0 revealed old bug https://lore.kernel.org/linux-rdma/20200716102059.1420681-1-l...@kernel.org that took a while to find. * create_cq() was rewritten to make sure that uobj is properly initialized. v0: https://lore.kernel.org/lkml

Re: [PATCH v2][next] IB/hfi1: Remove unnecessary fall-through markings

2020-07-12 Thread Leon Romanovsky
a > --- > Changes in v2: > - Remove additional overlooked fall-through markings. > > drivers/infiniband/hw/hfi1/chip.c | 27 ++- > 1 file changed, 14 insertions(+), 13 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky

Re: [PATCH][next] IB/hfi1: Use fallthrough pseudo-keyword

2020-07-08 Thread Leon Romanovsky
On Wed, Jul 08, 2020 at 01:28:35PM -0500, Gustavo A. R. Silva wrote: > Hi Leon, > > On Wed, Jul 08, 2020 at 08:47:03AM +0300, Leon Romanovsky wrote: > > On Tue, Jul 07, 2020 at 12:39:42PM -0500, Gustavo A. R. Silva wrote: > > > Replace the existing /* fall through */ c

[PATCH rdma-next 0/2] Align write() and ioctl() paths

2020-07-08 Thread Leon Romanovsky
From: Leon Romanovsky Hi, The discussion about RWQ table patch revealed incosistency with use of usecnt, complex unwind flows without any reason and difference between write() and ioctl() paths. This series extends infrastructure to be consistent, reliable and predicable in regards of commit

Re: [PATCH][next] IB/hfi1: Use fallthrough pseudo-keyword

2020-07-07 Thread Leon Romanovsky
On Tue, Jul 07, 2020 at 12:39:42PM -0500, Gustavo A. R. Silva wrote: > Replace the existing /* fall through */ comments and its variants with > the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary > fall-through markings when it is the case. > > [1] >

Re: [PATCH] rds: send: Replace sg++ with sg = sg_next(sg)

2020-07-07 Thread Leon Romanovsky
On Wed, Jul 08, 2020 at 03:42:52AM +, Xu Wang wrote: > Replace sg++ with sg = sg_next(sg). > > Signed-off-by: Xu Wang > --- > net/rds/send.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/rds/send.c b/net/rds/send.c > index 68e2bdb08fd0..57d03a6753de 100644 >

[PATCH rdma-rc 0/3] Fixes to mlx5_ib driver

2020-07-07 Thread Leon Romanovsky
From: Leon Romanovsky Hi, This is patchset of independent fixes to mlx5_ib driver. Thanks Aya Levin (1): IB/mlx5: Fix 50G per lane indication Leon Romanovsky (1): RDMA/mlx5: Set PD pointers for the error flow unwind Maor Gottlieb (1): RDMA/mlx5: Use xa_lock_irqsave when access to SRQ

[PATCH rdma-next v2 0/3] Convert XRC to use xarray

2020-07-06 Thread Leon Romanovsky
From: Leon Romanovsky Changelog: v2: Rewrote mlx5 part to avoid ib_xrcd allocation. v1: https://lore.kernel.org/lkml/20200623111531.1227013-1-l...@kernel.org Changed ib_dealloc_xrcd_user() do not iterate over tgt list, because it is expected to be empty. v0: https://lore.kernel.org/lkml

Re: [PATCH] Replace HTTP links with HTTPS ones: VMWare PVRDMA driver

2020-07-05 Thread Leon Romanovsky
On Sun, Jul 05, 2020 at 11:45:28PM +0200, Alexander A. Klimov wrote: > Rationale: > Reduces attack surface on kernel devs opening the links for MITM > as HTTPS traffic is much harder to manipulate. > > Deterministic algorithm: > For each file: > If not .svg: > For each line: > If

Re: [PATCH rdma-next 0/6] Cleanup mlx5_ib main file

2020-07-02 Thread Leon Romanovsky
On Thu, Jul 02, 2020 at 10:08:09AM -0300, Jason Gunthorpe wrote: > On Thu, Jul 02, 2020 at 11:18:03AM +0300, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > Over the years, the main.c file grew above all imagination and was >8K > > LOC of the code. This c

[PATCH rdma-next 0/3] Global per-type support for QP counters

2020-07-02 Thread Leon Romanovsky
From: Leon Romanovsky Hi, This series from Mark extends netlink interface to allow automatic binding of QP counters based on their type, in very similar manner to already existing per-PID ability. Thanks Mark Zhang (3): RDMA/counter: Add PID category support in auto mode RDMA/counter

[PATCH rdma-next 0/6] Cleanup mlx5_ib main file

2020-07-02 Thread Leon Romanovsky
From: Leon Romanovsky Over the years, the main.c file grew above all imagination and was >8K LOC of the code. This caused to a huge burden while I started to work on ib_flow allocation patches. This series implements long standing "internal" wish to move flow logic from the mai

Re: [PATCH rdma-next v1 0/4] ib_core allocation patches

2020-06-30 Thread Leon Romanovsky
On Tue, Jun 30, 2020 at 01:18:51PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > Changelog > v1: > * Removed empty "//" comment > * Deleted destroy_rwq_ind_table from object tree > * One patch was accepted, so rebased on latest for-upstream >

[PATCH rdma-next v1 0/4] ib_core allocation patches

2020-06-30 Thread Leon Romanovsky
From: Leon Romanovsky Changelog v1: * Removed empty "//" comment * Deleted destroy_rwq_ind_table from object tree * One patch was accepted, so rebased on latest for-upstream v0: https://lore.kernel.org/lkml/20200624105422.1452290-1-l...@

[PATCH rdma-next v1 0/7] Introduce UAPIs to query UCONTEXT, PD and MR properties

2020-06-30 Thread Leon Romanovsky
From: Leon Romanovsky Changelog v1: * Replaced "KABI" word with "UAPI". * Set IOVA as an optional attribute upon query MR. v0: https://lore.kernel.org/lkml/20200616105531.2428010-1-l...@kernel.org ---

Re: [PATCH v4] IB/sa: Resolving use-after-free in ib_nl_send_msg

2020-06-25 Thread Leon Romanovsky
On Thu, Jun 25, 2020 at 10:11:07AM -0700, Divya Indi wrote: > Hi Leon, > > Please find my comments inline - > > On 6/25/20 3:09 AM, Leon Romanovsky wrote: > > On Tue, Jun 23, 2020 at 07:13:09PM -0700, Divya Indi wrote: > >> Commit 3ebd2fd0d011 ("IB/sa: Put ne

Re: [PATCH v4] IB/sa: Resolving use-after-free in ib_nl_send_msg

2020-06-25 Thread Leon Romanovsky
On Tue, Jun 23, 2020 at 07:13:09PM -0700, Divya Indi wrote: > Commit 3ebd2fd0d011 ("IB/sa: Put netlink request into the request list before > sending")' > - > 1. Adds the query to the request list before ib_nl_snd_msg. > 2. Moves ib_nl_send_msg out of spinlock, hence safe to use gfp_mask as is. >

[PATCH rdma-next 0/5] ib_core allocation patches

2020-06-24 Thread Leon Romanovsky
From: Leon Romanovsky Let's continue my allocation work. Leon Romanovsky (5): RDMA/core: Create and destroy counters in the ib_core RDMA: Clean MW allocation and free flows RDMA: Move XRCD to be under ib_core responsibility RDMA/core: Delete not-used create RWQ table function RDMA

[PATCH rdma-next v1 0/2] Convert XRC to use xarray

2020-06-23 Thread Leon Romanovsky
From: Leon Romanovsky Changelog: v1: Changed ib_dealloc_xrcd_user() do not iterate over tgt list, because it is expected to be empty. v0: https://lore.kernel.org/lkml/20200621104110.53509-1-l...@kernel.org Two small patches to simplify and improve XRC logic. Thanks Maor Gottlieb (2): RDMA

[PATCH rdma-next 0/4] Bag of fixes and refactoring in MAD layer

2020-06-21 Thread Leon Romanovsky
From: Leon Romanovsky Hi, This is combination of fixes and refactoring in MAD layer. Because everything here is "old", I'm sending it to rdma-next and not "wasting" our time in attempt to separate fix patches from refactoring ones. Thanks Shay Drory (4): IB/mad: Fix

[PATCH rdma-next 0/2] Convert XRC to use xarray

2020-06-21 Thread Leon Romanovsky
From: Leon Romanovsky Two small patches to simplify and improve XRC logic. Maor Gottlieb (2): RDMA: Clean ib_alloc_xrcd() and reuse it to allocate XRC domain RDMA/core: Optimize XRC target lookup drivers/infiniband/core/uverbs_cmd.c | 12 ++--- drivers/infiniband/core/verbs.c | 69

Re: [PATCH v3] IB/sa: Resolving use-after-free in ib_nl_send_msg

2020-06-21 Thread Leon Romanovsky
On Wed, Jun 17, 2020 at 03:23:00PM -0300, Jason Gunthorpe wrote: > On Wed, Jun 17, 2020 at 08:17:39AM +0300, Leon Romanovsky wrote: > > > > My thoughts that everything here hints me that state machine and > > locking are implemented wrongly. In ideal world, the expectation &g

[PATCH rdma-rc 0/2] Two small fixes to the mlx5_ib

2020-06-18 Thread Leon Romanovsky
From: Leon Romanovsky Hi, The following two fixes are user-visible one. The first patch is needed to continue to use RAW_PACKET QPs after PR [1] is merged and new FW will be released. The second patch fixes wrongly reported GID. Thanks [1] https://github.com/linux-rdma/rdma-core/pull/745

Re: [PATCH rdma-next 0/7] Introduce KABIs to query UCONTEXT, PD and MR properties

2020-06-17 Thread Leon Romanovsky
On Wed, Jun 17, 2020 at 01:34:50AM -0700, Christoph Hellwig wrote: > On Wed, Jun 17, 2020 at 11:31:38AM +0300, Leon Romanovsky wrote: > > On Wed, Jun 17, 2020 at 01:29:16AM -0700, Christoph Hellwig wrote: > > > I think you are talking about UABIs (which in linux we actuall

Re: [PATCH rdma-next 0/7] Introduce KABIs to query UCONTEXT, PD and MR properties

2020-06-17 Thread Leon Romanovsky
On Wed, Jun 17, 2020 at 01:29:16AM -0700, Christoph Hellwig wrote: > I think you are talking about UABIs (which in linux we actually call > uapis). Yes, I used Yishai's cover letter as is. >

Re: [PATCH v3] IB/sa: Resolving use-after-free in ib_nl_send_msg

2020-06-16 Thread Leon Romanovsky
On Tue, Jun 16, 2020 at 10:56:53AM -0700, Divya Indi wrote: > Hi Leon, > > Please find my comments inline - > > On 6/13/20 11:41 PM, Leon Romanovsky wrote: > > On Tue, Jun 09, 2020 at 07:45:21AM -0700, Divya Indi wrote: > >> Hi Leon, > >> > >> Thanks

[PATCH rdma-next 0/7] Introduce KABIs to query UCONTEXT, PD and MR properties

2020-06-16 Thread Leon Romanovsky
From: Leon Romanovsky >From Yishai, This series introduce KABIs to query existing UCONTEXT, PD and MR for their properties. By those KABIs a user space application which owns the command FD of the device can retrieve and rebuild the above objects despite that it wasn't their crea

Re: [PATCH v2] IB/srpt: Remove WARN_ON from srpt_cm_req_recv

2020-06-16 Thread Leon Romanovsky
On Tue, Jun 16, 2020 at 09:17:15AM +0800, Jing Xiangfeng wrote: > It's easy to show that sdev and req are always valid, > so we remove unnecessary WARN_ON. So show it in the commit message, please. > > Signed-off-by: Jing Xiangfeng > --- > drivers/infiniband/ulp/srpt/ib_srpt.c | 3 --- > 1

Re: [PATCH v3] IB/sa: Resolving use-after-free in ib_nl_send_msg

2020-06-14 Thread Leon Romanovsky
On Tue, Jun 09, 2020 at 07:45:21AM -0700, Divya Indi wrote: > Hi Leon, > > Thanks for taking the time to review. > > Please find my comments inline - > > On 6/9/20 12:00 AM, Leon Romanovsky wrote: > > On Mon, Jun 08, 2020 at 07:46:16AM -0700, Divya Indi wrote: > >&

Re: [PATCH] checkpatch.pl: perform commit ID check from external to git folder

2020-06-11 Thread Leon Romanovsky
On Thu, Jun 11, 2020 at 11:22:41AM -0700, Joe Perches wrote: > On Thu, 2020-06-11 at 15:59 +0300, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > The execution of scripts/checkpatch.pl in folder outside of git produces > > complains about invalid commit I

[PATCH] fs: Delete always true compilation define

2020-06-11 Thread Leon Romanovsky
From: Leon Romanovsky In commit 1027abe8827b ("[PATCH] merge locate_fd() and get_unused_fd()") the existing "#if 1" was moved from one place to another. Originally that compilation define was set for the sanity check and more than 12 years later it is safe to remove it.

[PATCH] checkpatch.pl: perform commit ID check from external to git folder

2020-06-11 Thread Leon Romanovsky
From: Leon Romanovsky The execution of scripts/checkpatch.pl in folder outside of git produces complains about invalid commit ID, despite having valid one. ➜ /tmp /home/leonro/src/kernel/scripts/checkpatch.pl \ --root=/home/leonro/src/kernel \ --color=always \ --summary

Re: Review Request

2020-06-09 Thread Leon Romanovsky
On Mon, Jun 08, 2020 at 07:46:15AM -0700, Divya Indi wrote: > [PATCH v3] IB/sa: Resolving use-after-free in ib_nl_send_msg > > Hi, > > Please review the patch that follows. Please read Documentation/process/submitting-patches.rst 14) The canonical patch format You don't need an extra email

Re: [PATCH v3] IB/sa: Resolving use-after-free in ib_nl_send_msg

2020-06-09 Thread Leon Romanovsky
On Mon, Jun 08, 2020 at 07:46:16AM -0700, Divya Indi wrote: > Commit 3ebd2fd0d011 ("IB/sa: Put netlink request into the request list before > sending")' > - > 1. Adds the query to the request list before ib_nl_snd_msg. > 2. Removes ib_nl_send_msg from within the spinlock which also makes it >

Re: [PATCH][next] RDMA/mlx5: remove duplicated assignment to resp.response_length

2020-06-07 Thread Leon Romanovsky
nused value") > Signed-off-by: Colin Ian King > --- > drivers/infiniband/hw/mlx5/qp.c | 2 -- > 1 file changed, 2 deletions(-) > Thanks, Acked-by: Leon Romanovsky

Re: [PATCH] net/mlx5: Add a missing macro undefinition

2020-06-07 Thread Leon Romanovsky
et/mellanox/mlx5/core/main.c | 2 ++ > 1 file changed, 2 insertions(+) "should be undefined" is s little bit over statement, but overall the patch is good. Fixes: fca22e7e595f ("net/mlx5: ODP support for XRC transport is not enabled by default in FW") Thanks, Reviewed-by: Leon Romanovsky

Re: [PATCH 09/10] treewide: Remove uninitialized_var() usage

2020-06-04 Thread Leon Romanovsky
d/sch_fq_codel.c | 2 +- > net/sched/sch_fq_pie.c | 2 +- > net/sched/sch_hfsc.c | 2 +- > net/sched/sch_htb.c | 2 +- > net/sched/sch_sfq.c | 2 +- > net/sunrpc/svcsock.c | 4 ++-- > net/sunrpc/xprtsock.c| 10 +- > net/tls/tls_sw.c | 2 +- > sound/core/control_compat.c | 2 +- > sound/isa/sb/sb16_csp.c | 2 +- > sound/usb/endpoint.c | 2 +- > 184 files changed, 284 insertions(+), 285 deletions(-) Thanks, Reviewed-by: Leon Romanovsky # drivers/infiniband and mlx4/mlx5

Re: [PATCH net-next] mlx5: Restore err assignment in mlx5_mdev_init

2020-06-02 Thread Leon Romanovsky
On Mon, Jun 01, 2020 at 09:07:48PM -0700, Nathan Chancellor wrote: > On Sun, May 31, 2020 at 12:58:10PM +0300, Leon Romanovsky wrote: > > On Fri, May 29, 2020 at 10:54:48PM -0700, Nathan Chancellor wrote: > > > Clang warns: > > > > > > drivers/net/ethernet/mella

Re: [PATCH] RDMA/hns: Uninitialized variable in modify_qp_init_to_rtr()

2020-05-31 Thread Leon Romanovsky
> --- > drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Thanks, Reviewed-by: Leon Romanovsky

Re: [PATCH net-next] mlx5: Restore err assignment in mlx5_mdev_init

2020-05-31 Thread Leon Romanovsky
On Fri, May 29, 2020 at 10:54:48PM -0700, Nathan Chancellor wrote: > Clang warns: > > drivers/net/ethernet/mellanox/mlx5/core/main.c:1278:6: warning: variable > 'err' is used uninitialized whenever 'if' condition is true > [-Wsometimes-uninitialized] > if (!priv->dbg_root) { >

[PATCH rdma-next v3 0/6] Add Enhanced Connection Established (ECE)

2020-05-26 Thread Leon Romanovsky
From: Leon Romanovsky Changelog: v3: * Rebased on top of ebd6e96b33a2 RDMA/ipoib: Remove can_sleep parameter from iboib_mcast_alloc * Updated rdma_reject patch to include newly added RTR ulp * Remove empty hunks added by rebase * Changed signature of rdma_reject so kernel users

[PATCH rdma-next v2 0/7] Enable asynchronous event FD per object

2020-05-19 Thread Leon Romanovsky
From: Leon Romanovsky Changelog: v2: * Added READ_ONCE to all default_async_file calls * Rebased on latest rdma/wip/jgg-for-next * Removed uninitalized_var?() * Simplified uverbs_free_srq() * Put uverbs_finalize_uobj_create() after object is finalized v1: https://lore.kernel.org/lkml

Re: [PATCH rdma-next v1 00/10] Enable asynchronous event FD per object

2020-05-18 Thread Leon Romanovsky
On Sun, May 17, 2020 at 08:37:13PM -0300, Jason Gunthorpe wrote: > On Wed, May 06, 2020 at 11:24:34AM +0300, Leon Romanovsky wrote: > > > RDMA/core: Consolidate ib_create_srq flows > > IB/uverbs: Cleanup wq/srq context usage from uverbs layer > > IB/uverbs: Fix cr

Re: linux-next: manual merge of the mlx5-next tree with the rdma tree

2020-05-13 Thread Leon Romanovsky
On Thu, May 14, 2020 at 12:59:20PM +1000, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the mlx5-next tree got a conflict in: > > drivers/infiniband/hw/mlx5/main.c > > between commit: > > 2be08c308f10 ("RDMA/mlx5: Delete create QP flags obfuscation") > > from the rdma tree

Re: [PATCH] IB/mlx4: Replace zero-length array with flexible-array

2020-05-13 Thread Leon Romanovsky
On Wed, May 13, 2020 at 03:33:35PM -0300, Jason Gunthorpe wrote: > On Thu, May 07, 2020 at 01:59:21PM -0500, Gustavo A. R. Silva wrote: > > The current codebase makes use of the zero-length array language > > extension to the C90 standard, but the preferred mechanism to declare > > variable-length

Re: [PATCH 2/3] kasan: move kasan_report() into report.c

2020-05-12 Thread Leon Romanovsky
On Tue, May 12, 2020 at 05:33:20PM +0200, Andrey Konovalov wrote: > The kasan_report() functions belongs to report.c, as it's a common > functions that does error reporting. > > Reported-by: Leon Romanovsky > Signed-off-by: Andrey Konovalov > --- > m

<    1   2   3   4   5   6   7   8   9   10   >