Kernel sources for Moto G9 (Play) (Guamp)
Find a file
Serge Semin 88c11cc2e9 block: sed-opal: kmalloc the cmd/resp buffers
[ Upstream commit f829230dd51974c1f4478900ed30bb77ba530b40 ]

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 c94b7f9bab22 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-11-25 17:40:23 +01:00
arch x86/cpu: Restore AMD's DE_CFG MSR after resume 2022-11-25 17:40:21 +01:00
block block: sed-opal: kmalloc the cmd/resp buffers 2022-11-25 17:40:23 +01:00
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist 2022-06-25 11:49:16 +02:00
crypto crypto: drbg - make reseeding from get_random_bytes() synchronous 2022-06-25 11:49:13 +02:00
Documentation x86/speculation: Add RSB VM Exit protections 2022-11-23 07:53:47 +01:00
drivers tty: n_gsm: fix sleep-in-atomic-context bug in gsm_control_send 2022-11-25 17:40:23 +01:00
firmware
fs btrfs: remove pointless and double ulist frees in error paths of qgroup tests 2022-11-25 17:40:22 +01:00
include vmlinux.lds.h: Fix placement of '.data..decrypted' section 2022-11-25 17:40:19 +01:00
init random: handle latent entropy and command line from random_init() 2022-06-25 11:49:11 +02:00
ipc shm: extend forced shm destroy to support objects from several IPC nses 2021-12-08 08:50:11 +01:00
kernel kprobe: reverse kp->flags when arm_kprobe failed 2022-11-10 17:46:54 +01:00
lib dyndbg: let query-modname override actual module name 2022-10-26 13:19:31 +02:00
LICENSES
mm mm,hugetlb: take hugetlb_lock before decrementing h->resv_huge_pages 2022-11-03 23:52:29 +09:00
net Bluetooth: L2CAP: Fix l2cap_global_chan_by_psm 2022-11-25 17:40:22 +01:00
samples samples/kretprobes: Fix return value if register_kretprobe() failed 2021-11-26 11:36:11 +01:00
scripts cert host tools: Stop complaining about deprecated OpenSSL functions 2022-11-25 17:40:20 +01:00
security capabilities: fix potential memleak on error path from vfs_getxattr_alloc() 2022-11-10 17:46:55 +01:00
sound ASoC: soc-utils: Remove __exit for snd_soc_util_exit() 2022-11-25 17:40:23 +01:00
tools selftests/intel_pstate: fix build for ARCH=x86_64 2022-11-25 17:40:21 +01:00
usr
virt KVM: arm64: vgic: Fix exit condition in scan_its_table() 2022-11-03 23:52:24 +09:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: co-maintain random.c 2022-06-25 11:49:01 +02:00
Makefile Linux 4.19.266 2022-11-23 07:53:47 +01:00
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.
See Documentation/00-INDEX for a list of what is contained in each file.

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.