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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 7 Feb 2021 19:04:46 +0000
From:   "Grumbach, Emmanuel" <emmanuel.grumbach@...el.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Winkler, Tomas" <tomas.winkler@...el.com>
CC:     "Usyskin, Alexander" <alexander.usyskin@...el.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Coelho, Luciano" <luciano.coelho@...el.com>,
        "kvalo@...eaurora.org" <kvalo@...eaurora.org>
Subject: RE: [char-misc-next 6/6] mei: bus: add client dma interface

Hi Greg,

> On Sun, Feb 07, 2021 at 02:03:11PM +0000, Winkler, Tomas wrote:
> > >
> > > On Sat, Feb 06, 2021 at 03:04:34PM +0000, Winkler, Tomas wrote:
> > > > > On Sat, Feb 06, 2021 at 04:43:25PM +0200, Tomas Winkler wrote:
> > > > > > From: Alexander Usyskin <alexander.usyskin@...el.com>
> > > > > >
> > > > > > Expose the client dma mapping via mei client bus interface.
> > > > > >
> > > > > > Signed-off-by: Alexander Usyskin <alexander.usyskin@...el.com>
> > > > > > Signed-off-by: Tomas Winkler <tomas.winkler@...el.com>
> > > > > > ---
> > > > > >  drivers/misc/mei/bus.c     | 46
> > > > > ++++++++++++++++++++++++++++++++++++++
> > > > > >  drivers/misc/mei/hw.h      |  5 +++++
> > > > > >  include/linux/mei_cl_bus.h |  3 +++
> > > > > >  3 files changed, 54 insertions(+)
> > > > > >
> > > > > > diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c
> > > > > > index
> > > > > > 34fb5e541fe5..d430710a5fe5 100644
> > > > > > --- a/drivers/misc/mei/bus.c
> > > > > > +++ b/drivers/misc/mei/bus.c
> > > > > > @@ -636,6 +636,52 @@ static void mei_cl_bus_vtag_free(struct
> > > > > mei_cl_device *cldev)
> > > > > >  	kfree(cl_vtag);
> > > > > >  }
> > > > > >
> > > > > > +void *mei_cldev_dma_map(struct mei_cl_device *cldev, u8
> > > > > > +buffer_id, size_t size) {
> > > > > > +	struct mei_device *bus;
> > > > > > +	struct mei_cl *cl;
> > > > > > +	int ret;
> > > > > > +
> > > > > > +	if (!cldev || !buffer_id || !size)
> > > > > > +		return ERR_PTR(-EINVAL);
> > > > > > +
> > > > > > +	if (!IS_ALIGNED(size, MEI_FW_PAGE_SIZE)) {
> > > > > > +		dev_err(&cldev->dev, "Map size should be aligned to
> %lu\n",
> > > > > > +			MEI_FW_PAGE_SIZE);
> > > > > > +		return ERR_PTR(-EINVAL);
> > > > > > +	}
> > > > > > +
> > > > > > +	cl = cldev->cl;
> > > > > > +	bus = cldev->bus;
> > > > > > +
> > > > > > +	mutex_lock(&bus->device_lock);
> > > > > > +	ret = mei_cl_dma_alloc_and_map(cl, NULL, buffer_id, size);
> > > > > > +	mutex_unlock(&bus->device_lock);
> > > > > > +	if (ret)
> > > > > > +		return ERR_PTR(ret);
> > > > > > +	return cl->dma.vaddr;
> > > > > > +}
> > > > > > +EXPORT_SYMBOL_GPL(mei_cldev_dma_map);
> > > > >
> > > > > Why are you exporting symbols without a user of them?
> > > > >
> > > > > That's a sure way to get them removed by someone right after
> > > > > this lands in the tree :)
> > > > >
> > > > > Please only add infrastructure for when you have a real user.
> > > > You are right,  the user is coming from wifi tree. We need merge
> > > > before
> > > they do.
> > > > If you prefer we can merge that all from the wifi tree.
> > >
> > > That wasn't documented well at all in your changelog comment :(
> > Note taken.
> > > It can go through whatever tree needs it.
> > If possible please merge our changes already here, and let the wifi guys to
> finish their task in their tree, in their own time.
> 
> I took some of these already, patches 1 and 6 I can't take as-is, sorry.

As Tomas said, 6 is needed by iwlwifi. I understand you want it to be routed through iwlwifi-next.git. I added Kalle so that he gets a heads up.
1 is not related to iwlwifi.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ