Skip to content

padata: fix liftime issues after ->serial() has completed

Nicolai Stange linux-crypto lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5padata: introduce internal padata_get/put_pd() helperskernel/padata.c+23 -51 reply
2/5padata: make padata_free_shell() to respect pd's ->refcntkernel/padata.c+1 -14 replies
3/5padata: grab parallel_data refcnt for reorderkernel/padata.c+21 -54 replies
4/5padata: split out dequeue operation from padata_find_next()kernel/padata.c+37 -200 replies
5/5padata: avoid potential UAFs to the padata_shell from padata_reorder()kernel/padata.c+15 -33 replies

Reviews trailers per patch

2 of 5 patches have a Reviewed-by or Acked-by.

PatchDaniel Jordan
1/5A-b
2/5A-b
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] padata: fix liftime issues after ->serial() has completed

Hi all,

this series is supposed to fix some lifetime issues all related to the fact that once the last ->serial() has been invoked, the padata user (i.e. pcrypt) is well with its right to tear down the associated padata_shell or parallel_data instance respectively.

Only the first one, addressed by patch [2/5], has actually been observed, namely on a (downstream) RT kernel under a very specific workload involving LTP's pcrypt_aead01. On non-RT, I've been unable to reproduce.

The remainder of this series, 3-5/5, fixes two more, somewhat related, but purely theoretical issues I spotted when scratching my head about possible reasons for the original Oops.

Thanks!

Nicolai

Nicolai Stange (5):
padata: introduce internal padata_get/put_pd() helpers
padata: make padata_free_shell() to respect pd's ->refcnt
padata: grab parallel_data refcnt for reorder
padata: split out dequeue operation from padata_find_next()
padata: avoid potential UAFs to the padata_shell from padata_reorder()

 kernel/padata.c | 129 +++++++++++++++++++++++++++++++++++-------------
 1 file changed, 96 insertions(+), 33 deletions(-)
Signature · 1 line
2.37.3