Linux kernel modifications for the Kernel Hacking exam
Find a file
Serge Semin f829230dd5 block: sed-opal: kmalloc the cmd/resp buffers
In accordance with [1] the DMA-able memory buffers must be
cacheline-aligned otherwise the cache writing-back and invalidation
performed during the mapping may cause the adjacent data being lost. It's
specifically required for the DMA-noncoherent platforms [2]. Seeing the
opal_dev.{cmd,resp} buffers are implicitly used for DMAs in the NVME and
SCSI/SD drivers in framework of the nvme_sec_submit() and sd_sec_submit()
methods respectively they must be cacheline-aligned to prevent the denoted
problem. One of the option to guarantee that is to kmalloc the buffers
[2]. Let's explicitly allocate them then instead of embedding into the
opal_dev structure instance.

Note this fix was inspired by the commit c94b7f9bab ("nvme-hwmon:
kmalloc the NVME SMART log buffer").

[1] Documentation/core-api/dma-api.rst
[2] Documentation/core-api/dma-api-howto.rst

Fixes: 455a7b238c ("block: Add Sed-opal library")
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20221107203944.31686-1-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-11-08 07:14:35 -07:00
arch powerpc updates for 6.1 2022-10-09 14:05:15 -07:00
block block: sed-opal: kmalloc the cmd/resp buffers 2022-11-08 07:14:35 -07:00
certs
crypto
Documentation Documentation: document ublk user recovery feature 2022-10-18 05:12:26 -07:00
drivers ublk_drv: add ublk_queue_cmd() for cleanup 2022-10-31 07:23:24 -06:00
fs ucounts: Split rlimit and ucount values and max values 2022-10-09 16:24:05 -07:00
include blk-mq: don't add non-pt request with ->end_io to batch 2022-10-27 07:15:44 -06:00
init powerpc updates for 6.1 2022-10-09 14:05:15 -07:00
io_uring
ipc ipc: mqueue: fix possible memory leak in init_mqueue_fs() 2022-10-09 16:10:22 -07:00
kernel blktrace: remove unnessary stop block trace in 'blk_trace_shutdown' 2022-10-20 06:02:52 -07:00
lib Driver core changes for 6.1-rc1 2022-10-07 17:04:10 -07:00
LICENSES
mm The first batch of KVM patches, mostly covering x86, which I 2022-10-09 09:39:55 -07:00
net Driver core changes for 6.1-rc1 2022-10-07 17:04:10 -07:00
rust
samples
scripts
security powerpc updates for 6.1 2022-10-09 14:05:15 -07:00
sound
tools powerpc updates for 6.1 2022-10-09 14:05:15 -07:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap The first batch of KVM patches, mostly covering x86, which I 2022-10-09 09:39:55 -07:00
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS nvme: add Guenther as nvme-hwmon maintainer 2022-10-19 12:42:43 +02:00
Makefile
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.