Linus Torvalds aaf166f37e Reinstate some of "swiotlb: rework "fix info leak with DMA_FROM_DEVICE""
commit 901c7280ca0d5e2b4a8929fbe0bfb007ac2a6544 upstream.

Halil Pasic points out [1] that the full revert of that commit (revert
in bddac7c1e02b), and that a partial revert that only reverts the
problematic case, but still keeps some of the cleanups is probably
better.  

And that partial revert [2] had already been verified by Oleksandr
Natalenko to also fix the issue, I had just missed that in the long
discussion.

So let's reinstate the cleanups from commit aa6f8dcbab47 ("swiotlb:
rework "fix info leak with DMA_FROM_DEVICE""), and effectively only
revert the part that caused problems.

Link: https://lore.kernel.org/all/20220328013731.017ae3e3.pasic@linux.ibm.com/ [1]
Link: https://lore.kernel.org/all/20220324055732.GB12078@lst.de/ [2]
Link: https://lore.kernel.org/all/4386660.LvFx2qVVIh@natalenko.name/ [3]
Suggested-by: Halil Pasic <pasic@linux.ibm.com>
Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Cc: Christoph Hellwig" <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[OP: backport to 4.14: apply swiotlb_tbl_map_single() changes in lib/swiotlb.c]
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-25 08:41:22 +02:00
..
2017-09-22 16:16:41 -10:00
2018-02-22 15:42:23 +01:00
2018-08-03 07:50:38 +02:00
2019-11-24 08:22:48 +01:00
2021-12-08 08:46:55 +01:00
2021-12-08 08:46:55 +01:00
2020-04-02 16:34:21 +02:00
2018-02-22 15:42:24 +01:00
2019-12-17 20:38:50 +01:00
2021-03-03 18:22:46 +01:00
2021-02-07 14:47:41 +01:00
2021-11-26 11:40:20 +01:00
2019-12-31 12:37:21 +01:00
2021-07-11 12:48:09 +02:00
2020-07-29 07:42:55 +02:00
2018-02-22 15:42:23 +01:00
2017-09-25 08:56:05 -06:00
2020-11-18 18:28:00 +01:00
2020-03-20 10:54:12 +01:00
2019-06-11 12:21:48 +02:00
2020-04-02 16:34:36 +02:00
2018-11-13 11:15:11 -08:00
2020-12-11 13:39:04 +01:00
2020-04-02 16:34:36 +02:00
2021-12-14 10:16:55 +01:00