linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Rob Landley <rob@landley.net>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Naresh Kamboju <naresh.kamboju@linaro.org>,
	Linux-Next Mailing List <linux-next@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	Linux-sh list <linux-sh@vger.kernel.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
	Waiman Long <longman@redhat.com>,
	Boqun Feng <boqun.feng@gmail.com>,
	Minchan Kim <minchan@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mike Galbraith <umgwanakikbuti@gmail.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	Rich Felker <dalias@libc.org>,
	lkft-triage@lists.linaro.org
Subject: Re: spinlock.c:306:9: error: implicit declaration of function '__raw_write_lock_nested'
Date: Wed, 24 Nov 2021 11:43:56 +0100	[thread overview]
Message-ID: <CAK8P3a08wiu4uGrCvh+1Ezm2q2ta=DJMoZ1MFhUgjaMYJ0Be6A@mail.gmail.com> (raw)
In-Reply-To: <8767803d-57b9-698c-ca27-d47e7117758d@landley.net>

On Wed, Nov 24, 2021 at 11:01 AM Rob Landley <rob@landley.net> wrote:
> On 11/23/21 7:19 AM, Arnd Bergmann wrote:
> >
> > These happen with any compiler version, someone needs to write the correct
> > entry code for clone3 and hook up futex_waitv().
>
> I did a naieve "add them both to the .tbl" patch and the result booted to a
> shell prompt, but that doesn't mean much. What arch-specific entry code does
> clone3 need here? The SYSCALL_DEFINE2(clone3) in kernel/fork.c seems reasonably
> straightforward? (Unlike the #ifdef stack around the previous clone...)

I forget the exact issue, but I can see that 4 out of the 13
architectures that set
__ARCH_WANT_SYS_CLONE3 provide a custom version: arc, m68k,
mips and parisc. Have a look at what those do to see if you need the same
changes.

> >> include/linux/sh_intc.h:100:63: warning: division 'sizeof (void *) / sizeof (void)' does not compute the number of array elements
> >
> > These are old bugs, they show up in any kernel version with gcc-8 or higher.
>
> I looked at trying to fix that but it seems to be a compiler bug. Gcc is warning
> about an ? : else case that's dead code eliminated. It's already GOT a test
> protecting it from being evaluated...

I wouldn't call it a bug in the compiler, as there is no definite
correct ordering
between dead-code-elimination and warning generation. IIRC I fixed a bunch
of these on other architectures, and those did turn out to be actual code issues
that would go unnoticed otherwise.

> >> fs/mpage.c:336:1: warning: the frame size of 1092 bytes is larger than
> >
> > I see these going back to gcc-6, it looks like this is caused by
> > CONFIG_PAGE_SIZE_64KB.
>
> In which case the stack size is going to be 64k as well?

No, the stack is still 4KB or 8KB, depending on CONFIG_4KSTACKS, it gets
allocated using

        stack = kmem_cache_alloc_node(thread_stack_cache, THREADINFO_GFP, node);

from a THREAD_SIZE-sized naturally-aligned kmem cache in this case.
Using 1KB of stack space is definitely a red flag that something is going
wrong. This could be a bug in kernel code, in the compiler, or in the
combination of the two.

        Arnd

  reply	other threads:[~2021-11-24 10:44 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 11:38 spinlock.c:306:9: error: implicit declaration of function '__raw_write_lock_nested' Naresh Kamboju
2021-11-23 13:19 ` Arnd Bergmann
2021-11-23 14:48   ` Geert Uytterhoeven
2021-11-23 14:50     ` Sebastian Andrzej Siewior
2021-11-23 16:07       ` [PATCH] locking: Fixup write_lock_nested() implementation Sebastian Andrzej Siewior
2021-11-23 17:01         ` [PATCH v2] " Sebastian Andrzej Siewior
2021-11-23 22:52           ` Stephen Rothwell
2021-11-24 10:01   ` spinlock.c:306:9: error: implicit declaration of function '__raw_write_lock_nested' Rob Landley
2021-11-24 10:43     ` Arnd Bergmann [this message]
2021-11-24  7:31 ` Rob Landley
2021-11-24  7:49   ` Arnd Bergmann
2021-11-24 13:15     ` André Almeida
2021-11-24 14:21       ` Arnd Bergmann
2021-11-24 13:21     ` [PATCH 1/1] futex: Wireup futex_waitv syscall André Almeida
2021-11-24 13:49       ` Geert Uytterhoeven
2021-11-24 14:29       ` Arnd Bergmann
2021-11-24 15:56         ` André Almeida
2021-11-24 23:18         ` Thomas Gleixner
2021-11-24 17:23       ` Max Filippov
2021-11-24 23:07       ` Michael Ellerman
2021-11-24 23:38     ` spinlock.c:306:9: error: implicit declaration of function '__raw_write_lock_nested' Rob Landley
2021-11-25  7:25       ` Arnd Bergmann
2021-11-25 12:10         ` Rob Landley
2021-11-26 23:51           ` Stafford Horne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK8P3a08wiu4uGrCvh+1Ezm2q2ta=DJMoZ1MFhUgjaMYJ0Be6A@mail.gmail.com' \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=bigeasy@linutronix.de \
    --cc=boqun.feng@gmail.com \
    --cc=dalias@libc.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=longman@redhat.com \
    --cc=minchan@kernel.org \
    --cc=mingo@redhat.com \
    --cc=naresh.kamboju@linaro.org \
    --cc=peterz@infradead.org \
    --cc=rob@landley.net \
    --cc=senozhatsky@chromium.org \
    --cc=sfr@canb.auug.org.au \
    --cc=umgwanakikbuti@gmail.com \
    --cc=will@kernel.org \
    --cc=ysato@users.sourceforge.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).