lkml.org 
[lkml]   [2020]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: Remaining randconfig objtool warnings, linux-next-20200428
On Fri, May 1, 2020 at 2:29 AM Josh Poimboeuf <jpoimboe@redhat.com> wrote:
>
> On Thu, Apr 30, 2020 at 04:05:07PM +0200, Arnd Bergmann wrote:
> > lib/locking-selftest.o: warning: objtool: locking_selftest()+0x117f: PUSHF stack exhausted
> > lib/locking-selftest.o: warning: objtool: ww_tests()+0x1083: PUSHF stack exhausted
>
> Peter,
>
> These functions have a bunch of irqs_disabled() checks, which means a
> bunch of PUSHFs with no POPFs.
>
> Am I reading it correctly that objtool assumes PUSHF is always paired
> with POPF? irqs_disabled() doesn't do that.

I played around with this one a little more, it seems that the warning
is related to
the number of dotest() calls getting inlined into the functions. If I
comment out
a few of them (any five or more, occording to my non-scientific
tests), the warning
disappears, and it also goes away if I disable inlining that function:

--- a/lib/locking-selftest.c
+++ b/lib/locking-selftest.c
@@ -1134,7 +1134,7 @@ static int testcase_successes;
static int expected_testcase_failures;
static int unexpected_testcase_failures;

-static void dotest(void (*testcase_fn)(void), int expected, int lockclass_mask)
+static noinline void dotest(void (*testcase_fn)(void), int expected,
int lockclass_mask)
{
unsigned long saved_preempt_count = preempt_count();

Arnd
\
 
 \ /
  Last update: 2020-05-01 13:42    [W:0.817 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site