~kmously/ubuntu/+source/linux/+git/focal:gcp-swiotlb

Last commit made on 2021-09-02
Get this branch:
git clone -b gcp-swiotlb https://git.launchpad.net/~kmously/ubuntu/+source/linux/+git/focal
Only Khaled El Mously can upload to this branch. If you are Khaled El Mously please log in for upload directions.

Branch merges

Branch information

Name:
gcp-swiotlb
Repository:
lp:~kmously/ubuntu/+source/linux/+git/focal

Recent commits

11e8bf5... by Jianxiong Gao <jxgao@xxxxxxxxxx>

swiotlb: don't modify orig_addr in swiotlb_tbl_sync_single

swiotlb_tbl_map_single currently nevers sets a tlb_addr that is not
aligned to the tlb bucket size. But we're going to add such a case
soon, for which this adjustment would be bogus.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Acked-by: Jianxiong Gao <jxgao@xxxxxxxxxx>
Tested-by: Jianxiong Gao <jxgao@xxxxxxxxxx>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>

Upstream: 16fc3cef33a04632ab6b31758abdd77563a20759
Signed-off-by: Jianxiong Gao <jxgao@xxxxxxxxxx>
Signed-off-by: Khalid Elmously <email address hidden>

c4927ac... by Jianxiong Gao <jxgao@xxxxxxxxxx>

swiotlb: refactor swiotlb_tbl_map_single

Split out a bunch of a self-contained helpers to make the function easier
to follow.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Acked-by: Jianxiong Gao <jxgao@xxxxxxxxxx>
Tested-by: Jianxiong Gao <jxgao@xxxxxxxxxx>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>

Upstream: 26a7e094783d482f3e125f09945a5bb1d867b2e6
Signed-off-by: Jianxiong Gao <jxgao@xxxxxxxxxx>
Signed-off-by: Khalid Elmously <email address hidden>

239e278... by Jianxiong Gao <jxgao@xxxxxxxxxx>

swiotlb: clean up swiotlb_tbl_unmap_single

Remove a layer of pointless indentation, replace a hard to follow
ternary expression with a plain if/else.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Acked-by: Jianxiong Gao <jxgao@xxxxxxxxxx>
Tested-by: Jianxiong Gao <jxgao@xxxxxxxxxx>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>

Upstream: ca10d0f8e530600ec63c603dbace2c30927d70b7
Signed-off-by: Jianxiong Gao <jxgao@xxxxxxxxxx>
Signed-off-by: Khalid Elmously <email address hidden>

1b7169c... by Jianxiong Gao <jxgao@xxxxxxxxxx>

swiotlb: factor out a nr_slots helper

Factor out a helper to find the number of slots for a given size.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Acked-by: Jianxiong Gao <jxgao@xxxxxxxxxx>
Tested-by: Jianxiong Gao <jxgao@xxxxxxxxxx>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>

Upstream: c32a77fd18780a5192dfb6eec69f239faebf28fd
Signed-off-by: Jianxiong Gao <jxgao@xxxxxxxxxx>
Signed-off-by: Khalid Elmously <email address hidden>

a913665... by Jianxiong Gao <jxgao@xxxxxxxxxx>

swiotlb: factor out an io_tlb_offset helper

Replace the very genericly named OFFSET macro with a little inline
helper that hardcodes the alignment to the only value ever passed.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Acked-by: Jianxiong Gao <jxgao@xxxxxxxxxx>
Tested-by: Jianxiong Gao <jxgao@xxxxxxxxxx>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>

Upstream: c7fbeca757fe74135d8b6a4c8ddaef76f5775d68
Signed-off-by: Jianxiong Gao <jxgao@xxxxxxxxxx>
Signed-off-by: Khalid Elmously <email address hidden>

a8817cf... by Jianxiong Gao <jxgao@xxxxxxxxxx>

swiotlb: add a IO_TLB_SIZE define

Add a new IO_TLB_SIZE define instead open coding it using
IO_TLB_SHIFT all over.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Acked-by: Jianxiong Gao <jxgao@xxxxxxxxxx>
Tested-by: Jianxiong Gao <jxgao@xxxxxxxxxx>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>

Upstream: b5d7ccb7aac3895c2138fe0980a109116ce15eff
Signed-off-by: Jianxiong Gao <jxgao@xxxxxxxxxx>
Signed-off-by: Khalid Elmously <email address hidden>

18f2bad... by Jianxiong Gao <jxgao@xxxxxxxxxx>

driver core: add a min_align_mask field to struct device_dma_parameters

Some devices rely on the address offset in a page to function
correctly (NVMe driver as an example). These devices may use
a different page size than the Linux kernel. The address offset
has to be preserved upon mapping, and in order to do so, we
need to record the page_offset_mask first.

Signed-off-by: Jianxiong Gao <jxgao@xxxxxxxxxx>
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Acked-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>

Upstream: 36950f2da1ea4cb683be174f6f581e25b2d33e71
Signed-off-by: Jianxiong Gao <jxgao@xxxxxxxxxx>
Signed-off-by: Khalid Elmously <email address hidden>

6bbbb94... by Stefan Bader

UBUNTU: [Config] Record hisi_dma no longer built for arm64

BugLink: https://launchpad.net/bugs/1936771

The config changed from 'm' to 'n' in "Disable CONFIG_HISI_DMA". This
must be reflected in the ABI files or the build breaks.

Fixes: 85d363abf349 "Disable CONFIG_HISI_DMA"
Signed-off-by: Stefan Bader <email address hidden>

ea275b1... by John Johansen

apparmor: Fix memory leak of profile proxy

BugLink: https://bugs.launchpad.net/bugs/1939915

When the proxy isn't replaced and the profile is removed, the proxy
is being leaked resulting in a kmemleak check message of

unreferenced object 0xffff888077a3a490 (size 16):
  comm "apparmor_parser", pid 128041, jiffies 4322684109 (age 1097.028s)
  hex dump (first 16 bytes):
    03 00 00 00 00 00 00 00 b0 92 fd 4b 81 88 ff ff ...........K....
  backtrace:
    [<0000000084d5daf2>] aa_alloc_proxy+0x58/0xe0
    [<00000000ecc0e21a>] aa_alloc_profile+0x159/0x1a0
    [<000000004cc9ce15>] unpack_profile+0x275/0x1c40
    [<000000007332b3ca>] aa_unpack+0x1e7/0x7e0
    [<00000000e25e31bd>] aa_replace_profiles+0x18a/0x1d10
    [<00000000350d9415>] policy_update+0x237/0x650
    [<000000003fbf934e>] profile_load+0x122/0x160
    [<0000000047f7b781>] vfs_write+0x139/0x290
    [<000000008ad12358>] ksys_write+0xcd/0x170
    [<000000001a9daa7b>] do_syscall_64+0x70/0x310
    [<00000000b9efb0cf>] entry_SYSCALL_64_after_hwframe+0x49/0xb3

Make sure to cleanup the profile's embedded label which will result
on the proxy being properly freed.

Fixes: 637f688dc3dc ("apparmor: switch from profiles to using labels on contexts")
Signed-off-by: John Johansen <email address hidden>
(cherry picked from commit 3622ad25d4d68fcbdef3bc084b5916873e785344)
Signed-off-by: Georgia Garcia <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Acked-by: Tim Gardner <email address hidden>
Signed-off-by: Kleber Sacilotto de Souza <email address hidden>

9245993... by Harald Freudenberger <email address hidden>

s390/ap: Fix hanging ioctl caused by wrong msg counter

BugLink: https://bugs.launchpad.net/bugs/1939618

When a AP queue is switched to soft offline, all pending
requests are purged out of the pending requests list and
'received' by the upper layer like zcrypt device drivers.
This is also done for requests which are already enqueued
into the firmware queue. A request in a firmware queue
may eventually produce an response message, but there is
no waiting process any more. However, the response was
counted with the queue_counter and as this counter was
reset to 0 with the offline switch, the pending response
caused the queue_counter to get negative. The next request
increased this counter to 0 (instead of 1) which caused
the ap code to assume there is nothing to receive and so
the response for this valid request was never tried to
fetch from the firmware queue.

This all caused a queue to not work properly after a
switch offline/online and in the end processes to hang
forever when trying to send a crypto request after an
queue offline/online switch cicle.

Fixed by a) making sure the counter does not drop below 0
and b) on a successful enqueue of a message has at least
a value of 1.

Additionally a warning is emitted, when a reply can't get
assigned to a waiting process. This may be normal operation
(process had timeout or has been killed) but may give a
hint that something unexpected happened (like this odd
behavior described above).

Signed-off-by: Harald Freudenberger <email address hidden>
Cc: <email address hidden>
Signed-off-by: Vasily Gorbik <email address hidden>
(cherry picked from commit e73a99f3287a740a07d6618e9470f4d6cb217da8)
Signed-off-by: Frank Heimes <email address hidden>
Acked-by: Krzysztof Kozlowski <email address hidden>
Acked-by: Tim Gardner <email address hidden>
Signed-off-by: Kleber Sacilotto de Souza <email address hidden>