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]
Message-ID: <20171204212512.6aml52cmzbul423v@ninjato>
Date:   Mon, 4 Dec 2017 22:25:13 +0100
From:   Wolfram Sang <wsa@...-dreams.de>
To:     Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc:     linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-renesas-soc@...r.kernel.org, linux-iio@...r.kernel.org,
        linux-input@...r.kernel.org, linux-media@...r.kernel.org,
        Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH v6 0/9] i2c: document DMA handling and add helpers for it

On Sat, Nov 04, 2017 at 09:20:00PM +0100, Wolfram Sang wrote:
> So, after revisiting old mail threads, taking part in a similar discussion on
> the USB list, and implementing a not-convincing solution before, here is what I
> cooked up to document and ease DMA handling for I2C within Linux. Please have a
> look at the documentation introduced in patch 7 for details. And to make it
> clear again: The stuff below is opt-in. If host drivers are not updated, they
> will continue to work like before.
> 
> While previous versions until v3 tried to magically apply bounce buffers when
> needed, it became clear that detecting DMA safe buffers is too fragile. This
> approach is now opt-in, a DMA_SAFE flag needs to be set on an i2c_msg. The
> outcome so far is very convincing IMO. The core additions are simple and easy
> to understand. The driver changes for the Renesas IP cores became easy to
> understand, too.
> 
> Of course, we must now whitelist DMA safe buffers. This series implements it
> for core functionality:
> 
> a) for the I2C_RDWR when messages come from userspace
> b) for i2c_smbus_xfer_emulated(), DMA safe buffers are now allocated for
>    block transfers
> c) i2c_master_{send|recv} have now a *_dmasafe variant
> 
> I am still not sure how we can teach regmap this new flag. regmap is a heavy
> user of I2C, so broonie's opinion here would be great to have. The rest should
> mostly be updating individual drivers which can be done when needed.
> 
> All patches have been tested with a Renesas Salvator-X board (r8a7796/M3-W) and
> Renesas Lager board (r8a7790/H2). But more testing is really really welcome.
> 
> The branch can be found here:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/topic/i2c-core-dma-v6
> 
> It is planned to land upstream in v4.16 and I want to push it to linux-next
> early after v4.15 to get lots of testing for the core changes.
> 
> Big kudos to Renesas Electronics for funding this work, thank you very much!
> 
> Regards,
> 
>    Wolfram

Applied to for-next after fixing some cosmetic checkpatch issues!


Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ