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-next>] [day] [month] [year] [list]
Message-ID: <20220929224648.8997-1-Sergey.Semin@baikalelectronics.ru>
Date:   Fri, 30 Sep 2022 01:46:45 +0300
From:   Serge Semin <Sergey.Semin@...kalelectronics.ru>
To:     Jens Axboe <axboe@...nel.dk>, Keith Busch <kbusch@...nel.org>,
        Jens Axboe <axboe@...com>, Christoph Hellwig <hch@....de>,
        Sagi Grimberg <sagi@...mberg.me>
CC:     Serge Semin <Sergey.Semin@...kalelectronics.ru>,
        Serge Semin <fancer.lancer@...il.com>,
        Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>,
        Pavel Parkhomenko <Pavel.Parkhomenko@...kalelectronics.ru>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        <linux-nvme@...ts.infradead.org>, <linux-block@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: [PATCH v2 0/3] block/nvme: Fix DMA-noncoherent platforms support

Our SoC doesn't have the CPU caches coherent on DMA's. After getting the
kernel updated to the 6.0-rcX version we've discovered a problem with the
NVME hwmon probe. It turned out that the root cause of it was connected
with the cache-line-unaligned buffer passed to the DMA-engine. Due to the
cache-invalidation performed on the buffer mapping stage a part of the
structure the buffer was embedded to was lost. Here we suggest to fix the
problem just by aligning the buffer accordingly as the
Documentation/core-api/dma-api.rst document requires. (See the
corresponding patch log for more details.)

A potential root of a similar problem has been detected in the sed-opal
driver too. Even though we have not got any difficulties connected with
that part we still suggest to fix that in the same way as it is done for
the NVME hwmon driver.

Link: https://lore.kernel.org/linux-nvme/20220909191916.16013-1-Sergey.Semin@baikalelectronics.ru
Changelog v2:
- Drop Jonathan Derrick and Revanth Rajashekar from Cc-list due to
  the email messages being bounced back.
- Add a new preparation patch:
[PATCH v2 1/3] nvme-hwmon: Return error on kzalloc failure
- Convert to allocating the nvme_smart_log structure instance instead of
  cache-aligning it. (@Christoph)

Signed-off-by: Serge Semin <Sergey.Semin@...kalelectronics.ru>
Cc: Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>
Cc: Pavel Parkhomenko <Pavel.Parkhomenko@...kalelectronics.ru>
Cc: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc: linux-nvme@...ts.infradead.org
Cc: linux-block@...r.kernel.org
Cc: linux-kernel@...r.kernel.org

Serge Semin (3):
  nvme-hwmon: Return error on kzalloc failure
  nvme-hwmon: Kmalloc the NVME SMART log buffer
  block: sed-opal: Cache-line-align the cmd/resp buffers

 block/sed-opal.c          |  5 +++--
 drivers/nvme/host/hwmon.c | 34 ++++++++++++++++++++++++----------
 2 files changed, 27 insertions(+), 12 deletions(-)

-- 
2.37.3


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ