[PATCH 5.10/5.15 0/2] crypto: inside_secure - Avoid dma map if size is zero

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following patch addresses the issue of unchecked calls to
dma_map_sg() in safexcel_send_req() as these macros may return 0 in
case of unsuccessful mapping. This outcome in turn requires
unmapping of previously mapped buffers.

The fix has already been backported to the following stable branches:
v6.6: https://lore.kernel.org/all/20240122235813.608624333@xxxxxxxxxxxxxxxxxxx/
v6.1: https://lore.kernel.org/all/20240122235752.938797245@xxxxxxxxxxxxxxxxxxx/

The issue in question can be fixed in 5.10 and 5.15 stable branches by
backporting the following 2 upstream commits. Both can be cleanly
applied to kernel versions mentioned above.

[PATCH 5.10/5.15 1/2] crypto: inside_secure - Avoid dma map if size is zero
[PATCH 5.10/5.15 2/2] crypto: safexcel - Add error handling for dma_map_sg() calls

First patch is a prerequisite to main fix and removes warnings in case
of a call to dma_map_sg() with size 0 and allows for clean application
of the main fix.

Second (and main) patch adds proper handling of dma_map_sg() erroneous
behaviour.







[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux