Patch "ubifs: replay: Fix high stack usage, again" has been added to the 5.11-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    ubifs: replay: Fix high stack usage, again

to the 5.11-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ubifs-replay-fix-high-stack-usage-again.patch
and it can be found in the queue-5.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 15965808bf67508baa34c84ca2fea73028c07d2a
Author: Arnd Bergmann <arnd@xxxxxxxx>
Date:   Thu Jan 14 22:30:11 2021 +0100

    ubifs: replay: Fix high stack usage, again
    
    [ Upstream commit 410b6de702ef84fea6e7abcb6620ef8bfc112fae ]
    
    An earlier commit moved out some functions to not be inlined by gcc, but
    after some other rework to remove one of those, clang started inlining
    the other one and ran into the same problem as gcc did before:
    
    fs/ubifs/replay.c:1174:5: error: stack frame size of 1152 bytes in function 'ubifs_replay_journal' [-Werror,-Wframe-larger-than=]
    
    Mark the function as noinline_for_stack to ensure it doesn't happen
    again.
    
    Fixes: f80df3851246 ("ubifs: use crypto_shash_tfm_digest()")
    Fixes: eb66eff6636d ("ubifs: replay: Fix high stack usage")
    Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
    Reviewed-by: Nathan Chancellor <natechancellor@xxxxxxxxx>
    Signed-off-by: Richard Weinberger <richard@xxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c
index 79801c9a5b874..0f8a6a16421b4 100644
--- a/fs/ubifs/replay.c
+++ b/fs/ubifs/replay.c
@@ -559,7 +559,9 @@ static int is_last_bud(struct ubifs_info *c, struct ubifs_bud *bud)
 }
 
 /* authenticate_sleb_hash is split out for stack usage */
-static int authenticate_sleb_hash(struct ubifs_info *c, struct shash_desc *log_hash, u8 *hash)
+static int noinline_for_stack
+authenticate_sleb_hash(struct ubifs_info *c,
+		       struct shash_desc *log_hash, u8 *hash)
 {
 	SHASH_DESC_ON_STACK(hash_desc, c->hash_tfm);
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux