lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 27 May 2021 16:06:10 +0100
From:   Christoph Hellwig <hch@...radead.org>
To:     Jason Gunthorpe <jgg@...dia.com>
Cc:     Christoph Hellwig <hch@...radead.org>,
        Leon Romanovsky <leon@...nel.org>,
        Doug Ledford <dledford@...hat.com>,
        Avihai Horon <avihaih@...dia.com>,
        linux-kernel@...r.kernel.org, linux-rdma@...r.kernel.org
Subject: Re: [PATCH rdma-next v1 2/2] RDMA/mlx5: Allow modifying Relaxed
 Ordering via fast registration

On Thu, May 27, 2021 at 11:57:10AM -0300, Jason Gunthorpe wrote:
> >  2) IB_UVERBS_ACCESS_*.  These just get checked using ib_check_mr_access
> >     and then passed into ->reg_user_mr, ->rereg_user_mr and
> >     ->reg_user_mr_dmabuf
> 
> Yes. Using the kernerl flags for those user marked APIs is intended to
> simplify the drivers as the user/kernel MR logic should have shared
> elements

I'd rather map between these flags somewhere low done if and when this
actually happens.  Usually the driver will map to their internal flags
somewhere, and I bet not doing a detour will clean this up while also
removing the possibility for stupid errors.

> 
> >  3) in-kernel FRWR uses IB_ACCESS_*, but all users seem to hardcode it
> >     to IB_ACCESS_LOCAL_WRITE | IB_ACCESS_REMOTE_READ |
> >     IB_ACCESS_REMOTE_WRITE anyway
> 
> So when a ULP is processing a READ it doesn't create a FRWR with
> read-only rights? Isn't that security wrong?

Probably.  We probably want a helper that does the right thing based
off a enum dma_data_direction parameter.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ