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: > &g

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 > > > > parti

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 {} exten

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

[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: [PATCH v2] overflow: Add __must_check attribute to check_*() helpers

2020-08-17 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 unlikely(over

[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

[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

[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) | ^~~~

[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 *b

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

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 se

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 following GCC

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:

[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]

[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

[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

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

Re: [RFC PATCH v2 1/1] platform-msi: Add platform check for subdevice irq domain

2021-01-11 Thread Leon Romanovsky
On Tue, Jan 12, 2021 at 01:17:11PM +0800, Lu Baolu wrote: > Hi, > > On 1/7/21 3:16 PM, Leon Romanovsky wrote: > > On Thu, Jan 07, 2021 at 06:55:16AM +, Tian, Kevin wrote: > > > > From: Leon Romanovsky > > > > Sent: Thursday, January 7, 2021 2:09 PM >

Re: [RFC PATCH v2 1/1] platform-msi: Add platform check for subdevice irq domain

2021-01-11 Thread Leon Romanovsky
On Tue, Jan 12, 2021 at 06:59:35AM +, Tian, Kevin wrote: > > From: Leon Romanovsky > > Sent: Tuesday, January 12, 2021 1:53 PM > > > > On Tue, Jan 12, 2021 at 01:17:11PM +0800, Lu Baolu wrote: > > > Hi, > > > > > > On 1/7/21 3:16 PM, Leon R

Re: [PATCH v2 07/17] driver core: Add fwnode_init()

2020-12-07 Thread Leon Romanovsky
On Mon, Dec 07, 2020 at 11:25:15AM -0800, Saravana Kannan wrote: > On Sat, Dec 5, 2020 at 11:26 PM Leon Romanovsky wrote: > > > > On Fri, Nov 20, 2020 at 06:02:22PM -0800, Saravana Kannan wrote: > > > There are multiple locations in the kernel where a struct fwnode_han

Re: [PATCH v2 08/17] driver core: Add fwnode link support

2020-12-07 Thread Leon Romanovsky
On Mon, Dec 07, 2020 at 11:25:03AM -0800, Saravana Kannan wrote: > On Sat, Dec 5, 2020 at 11:48 PM Leon Romanovsky wrote: > > > > On Fri, Nov 20, 2020 at 06:02:23PM -0800, Saravana Kannan wrote: > > > Add support for creating supplier-consumer links between fwnodes.

Re: [PATCH v2 07/17] driver core: Add fwnode_init()

2020-12-07 Thread Leon Romanovsky
On Mon, Dec 07, 2020 at 12:36:43PM -0800, Saravana Kannan wrote: > On Mon, Dec 7, 2020 at 11:54 AM Leon Romanovsky wrote: > > > > On Mon, Dec 07, 2020 at 11:25:15AM -0800, Saravana Kannan wrote: > > > On Sat, Dec 5, 2020 at 11:26 PM Leon Romanovsky wrote: > > >

Re: [PATCH] RDMA/restrack: update kernel documentation for ib_create_named_qp()

2020-12-07 Thread Leon Romanovsky
description of the > same argument in other related functions. > > Signed-off-by: Lukas Bulwahn > --- Thanks, Reviewed-by: Leon Romanovsky

[PATCH rdma-next 0/3] Various fixes collected over time

2020-12-07 Thread Leon Romanovsky
From: Leon Romanovsky Hi, This is set of various and unrelated fixes that we collected over time. Thanks Avihai Horon (1): RDMA/uverbs: Fix incorrect variable type Jack Morgenstein (2): RDMA/core: Clean up cq pool mechanism RDMA/core: Do not indicate device ready when device enablement

Re: [PATCH v13 0/4] userspace MHI client interface driver

2020-12-08 Thread Leon Romanovsky
On Tue, Dec 08, 2020 at 10:29:27PM +0530, Manivannan Sadhasivam wrote: > On Sun, Dec 06, 2020 at 10:33:02AM +0200, Leon Romanovsky wrote: > > On Tue, Dec 01, 2020 at 09:59:53PM -0700, Jeffrey Hugo wrote: > > > On 12/1/2020 7:55 PM, Jakub Kicinski wrote: > > > > On

Re: [PATCH v4] PCI: endpoint: Fix NULL pointer dereference for ->get_features()

2021-01-12 Thread Leon Romanovsky
On Tue, Jan 12, 2021 at 07:32:25PM +0530, Shradha Todi wrote: > get_features ops of pci_epc_ops may return NULL, causing NULL pointer > dereference in pci_epf_test_bind function. Let us add a check for > pci_epc_feature pointer in pci_epf_test_bind before we access it to avoid > any such NULL point

Re: [RESEND PATCH v5 2/2] PCI: sprd: Add support for Unisoc SoCs' PCIe controller

2021-01-14 Thread Leon Romanovsky
On Thu, Jan 14, 2021 at 04:29:28PM +0800, Hongtao Wu wrote: > From: Hongtao Wu > > This series adds PCIe controller driver for Unisoc SoCs. > This controller is based on DesignWare PCIe IP. > > Signed-off-by: Hongtao Wu > --- > drivers/pci/controller/dwc/Kconfig | 12 ++ > drivers/pci/contr

Re: [RESEND PATCH v5 2/2] PCI: sprd: Add support for Unisoc SoCs' PCIe controller

2021-01-14 Thread Leon Romanovsky
On Thu, Jan 14, 2021 at 08:00:50PM +0800, Hongtao Wu wrote: > On Thu, Jan 14, 2021 at 4:52 PM Leon Romanovsky wrote: > > > > On Thu, Jan 14, 2021 at 04:29:28PM +0800, Hongtao Wu wrote: > > > From: Hongtao Wu > > > > > > This series adds PCIe con

Re: [RFC PATCH v3 1/2] iommu: Add capability IOMMU_CAP_VIOMMU

2021-01-14 Thread Leon Romanovsky
On Thu, Jan 14, 2021 at 09:30:02AM +0800, Lu Baolu wrote: > Some vendor IOMMU drivers are able to declare that it is running in a VM > context. This is very valuable for the features that only want to be > supported on bare metal. Add a capability bit so that it could be used. And how is it used?

Re: [RFC PATCH v3 1/2] iommu: Add capability IOMMU_CAP_VIOMMU

2021-01-14 Thread Leon Romanovsky
On Fri, Jan 15, 2021 at 07:49:47AM +0800, Lu Baolu wrote: > Hi Leon, > > On 1/14/21 9:26 PM, Leon Romanovsky wrote: > > On Thu, Jan 14, 2021 at 09:30:02AM +0800, Lu Baolu wrote: > > > Some vendor IOMMU drivers are able to declare that it is running in a VM > > > c

Re: [PATCH] RDMA/ocrdma: fix use after free in ocrdma_dealloc_ucontext_pd()

2020-12-29 Thread Leon Romanovsky
rbs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Thanks, Reviewed-by: Leon Romanovsky

Re: [PATCH -next] mlx5: use DEFINE_MUTEX (and mutex_init() had been too late)

2020-12-23 Thread Leon Romanovsky
On Wed, Dec 23, 2020 at 10:12:23PM +0800, Zheng Yongjun wrote: > Signed-off-by: Zheng Yongjun > --- > drivers/infiniband/hw/mlx5/main.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) It is unclear what you wanted to achieve, because the commit message is missing and subject doesn't h

Re: [PATCH] net/mlx5e: remove h from printk format specifier

2020-12-23 Thread Leon Romanovsky
| 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky

Re: [PATCH v2 -next] mlx5: use DEFINE_MUTEX() for mutex lock

2020-12-26 Thread Leon Romanovsky
On Thu, Dec 24, 2020 at 09:23:23PM +0800, Zheng Yongjun wrote: > mutex lock can be initialized automatically with DEFINE_MUTEX() > rather than explicitly calling mutex_init(). > > Signed-off-by: Zheng Yongjun > --- > drivers/infiniband/hw/mlx5/main.c | 4 +--- > 1 file changed, 1 insertion(+), 3

Re: [PATCH] IB/sa: Fix memleak in ib_nl_make_request

2020-12-26 Thread Leon Romanovsky
On Sun, Dec 20, 2020 at 04:13:14PM +0800, Dinghao Liu wrote: > When rdma_nl_multicast() fails, skb should be freed > just like when ibnl_put_msg() fails. It is not so simple as you wrote in the description. There are no other places in the linux kernel that free SKBs after netlink_multicast() fai

Re: [PATCH] RDMA/usnic: Fix memleak in find_free_vf_and_create_qp_grp

2020-12-26 Thread Leon Romanovsky
t; 1 file changed, 3 insertions(+) > Fixes: e3cf00d0a87f ("IB/usnic: Add Cisco VIC low-level hardware driver") Thanks, Reviewed-by: Leon Romanovsky

Re: [PATCH] net/mlx5e: Fix memleak in mlx5e_create_l2_table_groups

2020-12-27 Thread Leon Romanovsky
d-off-by: Dinghao Liu > --- > drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 1 + > 1 file changed, 1 insertion(+) > Fixes: 33cfaaa8f36f ("net/mlx5e: Split the main flow steering table") Thanks, Reviewed-by: Leon Romanovsky

Re: [PATCH] RDMA/hns: remove h from printk format specifier

2020-12-27 Thread Leon Romanovsky
; Standard integer promotion is already done and %hx and %hhx is useless > so do not encourage the use of %hh[xudi] or %h[xudi]. > > Signed-off-by: Tom Rix > --- > 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/mlx5e: Fix two double free cases

2020-12-27 Thread Leon Romanovsky
On Mon, Dec 21, 2020 at 04:50:31PM +0800, Dinghao Liu wrote: > mlx5e_create_ttc_table_groups() frees ft->g on failure of > kvzalloc(), but such failure will be caught by its caller > in mlx5e_create_ttc_table() and ft->g will be freed again > in mlx5e_destroy_flow_table(). The same issue also occur

Re: [PATCH] [v2] net/mlx5e: Fix two double free cases

2020-12-28 Thread Leon Romanovsky
quot;) > Signed-off-by: Dinghao Liu > --- > > Changelog: > > v2: - Set ft->g to NULL after kfree() instead of removing kfree(). > Refine commit message. > --- > drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 2 ++ > 1 file changed, 2 insertions(+) > Thanks, Reviewed-by: Leon Romanovsky

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-24 Thread Leon Romanovsky
On Mon, Mar 22, 2021 at 11:10:03AM -0600, Alex Williamson wrote: > On Sun, 21 Mar 2021 10:40:55 +0200 > Leon Romanovsky wrote: > > > On Sat, Mar 20, 2021 at 08:59:42AM -0600, Alex Williamson wrote: > > > On Sat, 20 Mar 2021 11:10:08 +0200 > > > Leon Romanovsky

Re: [PATCH 1/2] net: ipv4: route.c: add likely() statements

2021-03-24 Thread Leon Romanovsky
On Wed, Mar 24, 2021 at 11:09:22AM +0800, Yejune Deng wrote: > Add likely() statements in ipv4_confirm_neigh() for 'rt->rt_gw_family > == AF_INET'. Why? Such macros are beneficial in only specific cases, most of the time, likely/unlikely is cargo cult. > > Signed-off-by: Yejune Deng > --- > ne

Re: [PATCH 1/2] net: ipv4: route.c: add likely() statements

2021-03-24 Thread Leon Romanovsky
cult. Please support your claim with performance numbers when this likely/unlikely will give any difference. Thanks > > On Wed, Mar 24, 2021 at 6:34 PM Leon Romanovsky wrote: > > > > On Wed, Mar 24, 2021 at 11:09:22AM +0800, Yejune Deng wrote: > > > Add likely() sta

Re: [PATCH -next] IB/srpt: Fix passing zero to 'PTR_ERR'

2021-03-24 Thread Leon Romanovsky
On Wed, Mar 24, 2021 at 10:09:39PM +0800, YueHaibing wrote: > Fix smatch warning: > > drivers/infiniband/ulp/srpt/ib_srpt.c:2341 srpt_cm_req_recv() warn: passing > zero to 'PTR_ERR' > > Use PTR_ERR_OR_ZERO instead of PTR_ERR > > Fixes: 847462de3a0a ("IB/srpt: Fix srpt_cm_req_recv() error path (

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-24 Thread Leon Romanovsky
On Wed, Mar 24, 2021 at 08:37:43AM -0600, Alex Williamson wrote: > On Wed, 24 Mar 2021 12:03:00 +0200 > Leon Romanovsky wrote: > > > On Mon, Mar 22, 2021 at 11:10:03AM -0600, Alex Williamson wrote: > > > On Sun, 21 Mar 2021 10:40:55 +0200 > > > Leon Romanovsk

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-25 Thread Leon Romanovsky
On Wed, Mar 24, 2021 at 11:17:29AM -0600, Alex Williamson wrote: > On Wed, 24 Mar 2021 17:13:56 +0200 > Leon Romanovsky wrote: <...> > > Yes, and real testing/debugging almost always requires kernel rebuild. > > Everything else is waste of time. > > Sorry, this i

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-25 Thread Leon Romanovsky
On Thu, Mar 25, 2021 at 08:55:04AM -0600, Alex Williamson wrote: > On Thu, 25 Mar 2021 10:37:54 +0200 > Leon Romanovsky wrote: > > > On Wed, Mar 24, 2021 at 11:17:29AM -0600, Alex Williamson wrote: > > > On Wed, 24 Mar 2021 17:13:56 +0200 >

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-25 Thread Leon Romanovsky
On Thu, Mar 25, 2021 at 09:56:37PM +0530, Amey Narkhede wrote: > On 21/03/25 10:37AM, Leon Romanovsky wrote: > > On Wed, Mar 24, 2021 at 11:17:29AM -0600, Alex Williamson wrote: > > > On Wed, 24 Mar 2021 17:13:56 +0200 > > > Leon Romanovsky wrote: <...> >

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-25 Thread Leon Romanovsky
On Thu, Mar 25, 2021 at 10:52:57PM +0530, Amey Narkhede wrote: > On 21/03/25 06:09PM, Leon Romanovsky wrote: > > On Thu, Mar 25, 2021 at 08:55:04AM -0600, Alex Williamson wrote: > > > On Thu, 25 Mar 2021 10:37:54 +0200 > > > Leon Romanovsky wrote: > > > > &

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-18 Thread Leon Romanovsky
On Thu, Mar 18, 2021 at 10:39:35AM -0600, Alex Williamson wrote: > On Thu, 18 Mar 2021 11:09:34 +0200 > Leon Romanovsky wrote: <...> > > I'm lost here, does vfio-pci use sysfs interface or internal to the kernel > > API? > > > > If it is latter then we

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-18 Thread Leon Romanovsky
On Thu, Mar 18, 2021 at 10:31:43PM +0530, Amey Narkhede wrote: > On 21/03/18 04:57PM, Leon Romanovsky wrote: > > On Thu, Mar 18, 2021 at 07:52:52PM +0530, Amey Narkhede wrote: > > > On 21/03/18 11:09AM, Leon Romanovsky wrote: > > > > On Wed, Mar 17, 2021 at 11:31:40A

Re: [PATCH master] module: remove never implemented MODULE_SUPPORTED_DEVICE

2021-03-18 Thread Leon Romanovsky
On Thu, Mar 18, 2021 at 10:36:36AM -0700, Linus Torvalds wrote: > On Thu, Mar 18, 2021 at 12:55 AM Leon Romanovsky wrote: > > > > > > Also, your email seems to have swallowed spaces at the ends of lines. > > > > > > I can (and did) apply the patch

Re: [PATCH net-next 3/4] net: ipa: introduce ipa_assert()

2021-03-18 Thread Leon Romanovsky
On Thu, Mar 18, 2021 at 11:29:22PM -0500, Alex Elder wrote: > Create a new macro ipa_assert() to verify that a condition is true. > This produces a build-time error if the condition can be evaluated > at build time; otherwise __ipa_assert_runtime() is called (described > below). > > Another macro,

Re: [PATCH net-next 4/4] net: ipa: activate some commented assertions

2021-03-18 Thread Leon Romanovsky
On Thu, Mar 18, 2021 at 11:29:23PM -0500, Alex Elder wrote: > Convert some commented assertion statements into real calls to > ipa_assert(). If the IPA device pointer is available, provide it, > otherwise pass NULL for that. > > There are lots more places to convert, but this serves as an initial

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-19 Thread Leon Romanovsky
On Thu, Mar 18, 2021 at 07:34:56PM +0100, Enrico Weigelt, metux IT consult wrote: > On 18.03.21 18:22, Leon Romanovsky wrote: > > > Which email client do you use? > > Your responses are grouped as one huge block without any chance to respond > > to you on specific

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-19 Thread Leon Romanovsky
On Thu, Mar 18, 2021 at 11:13:44PM +0530, Amey Narkhede wrote: > On 21/03/18 07:35PM, Leon Romanovsky wrote: > > On Thu, Mar 18, 2021 at 10:31:43PM +0530, Amey Narkhede wrote: > > > On 21/03/18 04:57PM, Leon Romanovsky wrote: > > > > On Thu, Mar 18, 2021 at 07:52:5

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-19 Thread Leon Romanovsky
On Thu, Mar 18, 2021 at 06:58:25PM +0100, Enrico Weigelt, metux IT consult wrote: > On 18.03.21 18:35, Leon Romanovsky wrote: > > > I see it as a good example of cheap solution. Vendor won't fix your > > touchpad because distros provide workaround. The same will be w

Re: [PATCH net-next 4/4] net: ipa: activate some commented assertions

2021-03-19 Thread Leon Romanovsky
On Fri, Mar 19, 2021 at 07:40:21AM -0500, Alex Elder wrote: > On 3/19/21 12:00 AM, Leon Romanovsky wrote: > > On Thu, Mar 18, 2021 at 11:29:23PM -0500, Alex Elder wrote: > > > Convert some commented assertion statements into real calls to > > > ipa_assert(). If the IPA

Re: [PATCH net-next 3/4] net: ipa: introduce ipa_assert()

2021-03-19 Thread Leon Romanovsky
On Fri, Mar 19, 2021 at 07:38:26AM -0500, Alex Elder wrote: > On 3/18/21 11:55 PM, Leon Romanovsky wrote: > > On Thu, Mar 18, 2021 at 11:29:22PM -0500, Alex Elder wrote: > > > Create a new macro ipa_assert() to verify that a condition is true. > > > This produce

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-19 Thread Leon Romanovsky
On Fri, Mar 19, 2021 at 08:53:17PM +0530, Amey Narkhede wrote: > On 21/03/19 03:05PM, Leon Romanovsky wrote: <...> > > > > It was exactly the reason why I think that VM usecase presented by > > > > you is not viable. > > > > > > > Well I d

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-19 Thread Leon Romanovsky
On Fri, Mar 19, 2021 at 02:48:12PM +0100, Enrico Weigelt, metux IT consult wrote: > On 19.03.21 13:59, Leon Romanovsky wrote: <...> > In any case, I still fail to see why giving operators an debug knob > should make anything worse. I see this patch as a workaround to stop and

Re: linux-next: manual merge of the net tree with Linus' tree

2021-03-19 Thread Leon Romanovsky
On Fri, Mar 19, 2021 at 08:29:39AM +1100, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the net tree got a conflict in: > > drivers/net/can/usb/peak_usb/pcan_usb_fd.c > > between commit: > > 6417f03132a6 ("module: remove never implemented MODULE_SUPPORTED_DEVICE") > > f

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-19 Thread Leon Romanovsky
On Fri, Mar 19, 2021 at 10:57:11AM -0500, Bjorn Helgaas wrote: > On Fri, Mar 19, 2021 at 02:59:47PM +0200, Leon Romanovsky wrote: > > On Thu, Mar 18, 2021 at 07:34:56PM +0100, Enrico Weigelt, metux IT consult > > wrote: > > > On 18.03.21 18:22, Leon Romanovsky wrote: &g

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-20 Thread Leon Romanovsky
On Fri, Mar 19, 2021 at 10:23:13AM -0600, Alex Williamson wrote: > On Fri, 19 Mar 2021 14:59:47 +0200 > Leon Romanovsky wrote: > > > On Thu, Mar 18, 2021 at 07:34:56PM +0100, Enrico Weigelt, metux IT consult > > wrote: > > > On 18.03.21 18:22, Leon Romanovsky wrote

Re: [PATCH master] module: remove never implemented MODULE_SUPPORTED_DEVICE

2021-03-20 Thread Leon Romanovsky
On Thu, Mar 18, 2021 at 10:55:51AM -0700, Linus Torvalds wrote: > On Thu, Mar 18, 2021 at 10:49 AM Leon Romanovsky wrote: > > > > No, I opened patch and added the note manually, so it is definitely my VIM. > > Most likely this part of my .vimrc caused it. > > Ok,

Re: [PATCH v2] infiniband: Fix a use after free in isert_connect_request

2021-03-24 Thread Leon Romanovsky
t; 1 file changed, 8 insertions(+), 8 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky

Re: [PATCH v2] net: make unregister netdev warning timeout configurable

2021-03-24 Thread Leon Romanovsky
net/core/dev.c | 6 +- > net/core/sysctl_net_core.c | 10 ++++++ > 4 files changed, 27 insertions(+), 1 deletion(-) > Thanks, Reviewed-by: Leon Romanovsky

[PATCH rdma-next 0/4] Clean the mlx5 MR deregistration logic

2021-03-04 Thread Leon Romanovsky
From: Leon Romanovsky Hi, The following patchset is a cleanup of mlx5_ib_mr dereg logic. Thanks Jason Gunthorpe (4): RDMA/mlx5: Zero out ODP related items in the mlx5_ib_mr RDMA/mlx5: Use a union inside mlx5_ib_mr RDMA/mlx5: Consolidate MR destruction to mlx5_ib_dereg_mr() RDMA/mlx5

Re: [PATCH] mm: add ___GFP_NOINIT flag which disables zeroing on alloc

2021-03-30 Thread Leon Romanovsky
On Mon, Mar 29, 2021 at 07:12:55PM +0900, Hyunsoon Kim wrote: > On Mon, Mar 29, 2021 at 09:34:31AM +0300, Leon Romanovsky wrote: > > On Mon, Mar 29, 2021 at 02:29:10PM +0900, Hyunsoon Kim wrote: > > > This patch allows programmer to avoid zero initialization on page > > &g

Re: [PATCH net-next v2 2/2] net: ipa: fix IPA validation

2021-03-21 Thread Leon Romanovsky
On Sat, Mar 20, 2021 at 09:17:29AM -0500, Alex Elder wrote: > There are blocks of IPA code that sanity-check various values, at > compile time where possible. Most of these checks can be done once > during development but skipped for normal operation. These checks > permit the driver to make cert

Re: [PATCH] net: make unregister netdev warning timeout configurable

2021-03-21 Thread Leon Romanovsky
nux-kernel@vger.kernel.org > --- > net/Kconfig| 12 > net/core/dev.c | 4 +++- > 2 files changed, 15 insertions(+), 1 deletion(-) > Our verification team would like to see this change too. Thanks, Reviewed-by: Leon Romanovsky

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-21 Thread Leon Romanovsky
On Sat, Mar 20, 2021 at 08:59:42AM -0600, Alex Williamson wrote: > On Sat, 20 Mar 2021 11:10:08 +0200 > Leon Romanovsky wrote: > > On Fri, Mar 19, 2021 at 10:23:13AM -0600, Alex Williamson wrote: > > > > > > What if we taint the kernel or pci_warn() for cases wh

Re: linux-next: manual merge of the net tree with Linus' tree

2021-03-21 Thread Leon Romanovsky
On Sat, Mar 20, 2021 at 12:42:06PM -0700, Linus Torvalds wrote: > On Sat, Mar 20, 2021 at 12:28 PM Marc Kleine-Budde > wrote: > > > > Good idea. I'll send a pull request to David and Jakub. > > I don't think the revert is necessary. The conflict is so trivial that > it doesn't really matter. <.

Re: [PATCH net-next v2 2/2] net: ipa: fix IPA validation

2021-03-21 Thread Leon Romanovsky
On Sun, Mar 21, 2021 at 08:21:24AM -0500, Alex Elder wrote: > On 3/21/21 3:21 AM, Leon Romanovsky wrote: > > On Sat, Mar 20, 2021 at 09:17:29AM -0500, Alex Elder wrote: > > > There are blocks of IPA code that sanity-check various values, at > > > compile time where poss

Re: [PATCH net-next v2 2/2] net: ipa: fix IPA validation

2021-03-21 Thread Leon Romanovsky
On Sun, Mar 21, 2021 at 12:19:02PM -0500, Alex Elder wrote: > On 3/21/21 8:49 AM, Leon Romanovsky wrote: > > On Sun, Mar 21, 2021 at 08:21:24AM -0500, Alex Elder wrote: > >> On 3/21/21 3:21 AM, Leon Romanovsky wrote: > >>> On Sat, Mar 20, 2021 at 09:17:29AM -0500,

Re: [PATCH net-next 1/5] misdn: avoid -Wempty-body warning

2021-03-22 Thread Leon Romanovsky
On Mon, Mar 22, 2021 at 11:43:31AM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > gcc warns about a pointless condition: > > drivers/isdn/hardware/mISDN/hfcmulti.c: In function 'hfcmulti_interrupt': > drivers/isdn/hardware/mISDN/hfcmulti.c:2752:17: error: suggest braces around > empty bo

Re: [PATCH net-next 1/5] misdn: avoid -Wempty-body warning

2021-03-22 Thread Leon Romanovsky
On Mon, Mar 22, 2021 at 12:24:20PM +0100, Arnd Bergmann wrote: > On Mon, Mar 22, 2021 at 11:55 AM Leon Romanovsky wrote: > > On Mon, Mar 22, 2021 at 11:43:31AM +0100, Arnd Bergmann wrote: > > > From: Arnd Bergmann > > > > > > gcc warns about a pointless

Re: [PATCH net-next] [v2] misdn: avoid -Wempty-body warning

2021-03-22 Thread Leon Romanovsky
ggest braces around > empty body in an 'if' statement [-Werror=empty-body] > 2752 | ; /* external IRQ */ > > As the check has no effect, just remove it. > > Suggested-by: Leon Romanovsky > Signed-off-by: Arnd Bergmann > --- > v2: remove t

Re: [PATCH rdma-next 0/2] Spring cleanup

2021-03-22 Thread Leon Romanovsky
On Mon, Mar 22, 2021 at 10:00:12AM -0300, Jason Gunthorpe wrote: > On Sun, Mar 14, 2021 at 03:39:06PM +0200, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > Bunch of cleanup in RDMA subsystem. > > > > Leon Romanovsky (2): > > RDMA: Fix ker

Re: [PATCH net-next v2 0/2] net: ipa: fix validation

2021-03-22 Thread Leon Romanovsky
pots and IPA_VALIDATION in others). > > > > This series fixes those two problems with the conditional validation > > code. > > After much back-and-forth with Leon Romanovsky: > > --> I retract this series <-- > > I will

Re: [PATCH net-next v2 2/2] net: ipa: fix IPA validation

2021-03-22 Thread Leon Romanovsky
On Mon, Mar 22, 2021 at 08:17:59AM -0500, Alex Elder wrote: > On 3/22/21 1:40 AM, Leon Romanovsky wrote: > > > I'd like to suggest a plan so I can begin to make progress, > > > but do so in a way you/others think is satisfactory. > > > - I would first like to

Re: [PATCH] infiniband: Fix a use after free in isert_connect_request

2021-03-22 Thread Leon Romanovsky
On Mon, Mar 22, 2021 at 06:53:55AM -0700, Lv Yunlong wrote: > The device is got by isert_device_get() with refcount is 1, > and is assigned to isert_conn by isert_conn->device = device. > When isert_create_qp() failed, device will be freed with > isert_device_put(). > > Later, the device is used i

Re: Re: [PATCH] infiniband: Fix a use after free in isert_connect_request

2021-03-22 Thread Leon Romanovsky
On Mon, Mar 22, 2021 at 10:51:35PM +0800, lyl2...@mail.ustc.edu.cn wrote: > > > > > -原始邮件- > > 发件人: "Leon Romanovsky" > > 发送时间: 2021-03-22 22:27:17 (星期一) > > 收件人: "Lv Yunlong" > > 抄送: s...@grimberg.me, dledf...@redhat.com

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-25 Thread Leon Romanovsky
On Thu, Mar 25, 2021 at 11:53:24AM -0600, Alex Williamson wrote: > On Thu, 25 Mar 2021 18:09:58 +0200 > Leon Romanovsky wrote: > > > On Thu, Mar 25, 2021 at 08:55:04AM -0600, Alex Williamson wrote: > > > On Thu, 25 Mar 2021 10:37:54 +0200 > > > Leon Romanovsk

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-26 Thread Leon Romanovsky
On Fri, Mar 26, 2021 at 10:18:25AM +0100, Krzysztof Wilczyński wrote: > Hello, > > [...] > > Aside of the sysfs interface, would this new functionality also require > anything to be overridden at boot time via passing some command-line > arguments? Not sure how relevant such thing would be to de

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-26 Thread Leon Romanovsky
On Fri, Mar 26, 2021 at 08:20:07AM -0600, Alex Williamson wrote: > On Fri, 26 Mar 2021 09:40:30 +0300 > Leon Romanovsky wrote: <...> > > > > It supports by writing: echo "bus,pm" > reset_methods. > > Regarding comma, IMHO it is easiest pattern for

Re: [PATCH] mm: add ___GFP_NOINIT flag which disables zeroing on alloc

2021-03-28 Thread Leon Romanovsky
On Mon, Mar 29, 2021 at 02:29:10PM +0900, Hyunsoon Kim wrote: > This patch allows programmer to avoid zero initialization on page > allocation even when the kernel config "CONFIG_INIT_ON_ALLOC_DEFAULT" > is enabled. The configuration is made to prevent uninitialized > heap memory flaws, and Android

Re: [PATCH v4 net-next] net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)

2021-04-12 Thread Leon Romanovsky
On Sun, Apr 11, 2021 at 07:34:55PM -0700, Dexuan Cui wrote: > Add a VF driver for Microsoft Azure Network Adapter (MANA) that will be > available in the future. > > Co-developed-by: Haiyang Zhang > Signed-off-by: Haiyang Zhang > Co-developed-by: Shachar Raindel > Signed-off-by: Shachar Raindel

Re: [PATCH v4 net-next] net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)

2021-04-12 Thread Leon Romanovsky
On Mon, Apr 12, 2021 at 08:35:32AM +, Dexuan Cui wrote: > > From: Leon Romanovsky > > Sent: Monday, April 12, 2021 12:46 AM > > To: Dexuan Cui > > > ... > > > +#define ANA_MAJOR_VERSION0 > > > +#define ANA_MINOR_VERSION

Re: [PATCH 0/1] Use of /sys/bus/pci/devices/…/index for non-SMBIOS platforms

2021-04-12 Thread Leon Romanovsky
On Mon, Apr 12, 2021 at 03:59:04PM +0200, Niklas Schnelle wrote: > Hi Narendra, Hi All, > > According to Documentation/ABI/testing/sysfs-bus-pci you are responsible > for the index device attribute that is used by systemd to create network > interface names. > > Now we would like to reuse this at

Re: [PATCH for-next v3 0/2] Introduce rdma_set_min_rnr_timer() and use it in RDS

2021-04-12 Thread Leon Romanovsky
On Mon, Apr 12, 2021 at 07:58:47PM -0300, Jason Gunthorpe wrote: > On Wed, Mar 31, 2021 at 08:43:12PM +0200, Håkon Bugge wrote: > > ib_modify_qp() is an expensive operation on some HCAs running > > virtualized. This series removes two ib_modify_qp() calls from RDS. > > > > I am sending this as a v

Re: [PATCH 0/1] Use of /sys/bus/pci/devices/…/index for non-SMBIOS platforms

2021-04-13 Thread Leon Romanovsky
On Tue, Apr 13, 2021 at 08:57:19AM +0200, Niklas Schnelle wrote: > On Tue, 2021-04-13 at 08:39 +0300, Leon Romanovsky wrote: > > On Mon, Apr 12, 2021 at 03:59:04PM +0200, Niklas Schnelle wrote: > > > Hi Narendra, Hi All, > > > > > > According to Documentati

Re: [PATCH for-next v3 0/2] Introduce rdma_set_min_rnr_timer() and use it in RDS

2021-04-13 Thread Leon Romanovsky
On Tue, Apr 13, 2021 at 11:13:38AM +, Haakon Bugge wrote: > > > > On 13 Apr 2021, at 08:29, Leon Romanovsky wrote: > > > > On Mon, Apr 12, 2021 at 07:58:47PM -0300, Jason Gunthorpe wrote: > >> On Wed, Mar 31, 2021 at 08:43:12PM +0200, Håkon Bugge wrote: >

Re: [PATCH] PCI: merge slot and bus reset implementations

2021-04-07 Thread Leon Romanovsky
On Tue, Apr 06, 2021 at 08:16:26AM -0600, Alex Williamson wrote: > On Sun, 4 Apr 2021 11:04:32 +0300 > Leon Romanovsky wrote: > > > On Thu, Apr 01, 2021 at 10:56:16AM -0600, Alex Williamson wrote: > > > On Thu, 1 Apr 2021 15:27:37 +0300 > > > Leon Romanovsky wr

Re: [PATCH net-next] net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)

2021-04-07 Thread Leon Romanovsky
On Tue, Apr 06, 2021 at 04:23:21PM -0700, Dexuan Cui wrote: > Add a VF driver for Microsoft Azure Network Adapter (MANA) that will be > available in the future. > > Co-developed-by: Haiyang Zhang > Signed-off-by: Haiyang Zhang > Signed-off-by: Dexuan Cui > --- > MAINTAINERS

Re: [PATCH net-next] net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)

2021-04-07 Thread Leon Romanovsky
On Wed, Apr 07, 2021 at 08:02:17AM +, Dexuan Cui wrote: > > From: Andrew Lunn > > Sent: Tuesday, April 6, 2021 6:08 PM > > To: Dexuan Cui > > > > > +static int gdma_query_max_resources(struct pci_dev *pdev) > > > +{ > > > + struct gdma_context *gc = pci_get_drvdata(pdev); > > > + struct gdma

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