All of lore.kernel.org
 help / color / mirror / Atom feed
From: Song Liu <song@kernel.org>
To: linux-ia64@vger.kernel.org
Subject: Re: Boot regression in Linux v6.4-rc3
Date: Fri, 26 May 2023 21:01:31 +0000	[thread overview]
Message-ID: <CAPhsuW5pwKe-hPKSyrcnF16Z6KTSYk8mSULcQbDBuvzEb6wneQ@mail.gmail.com> (raw)
In-Reply-To: <abb1166d-27a9-fbae-59cd-841480fba78a@web.de>

On Fri, May 26, 2023 at 11:36 AM Frank Scheiner <frank.scheiner@web.de> wrote:
>
> Hi Song,
>
> On 26.05.23 18:49, Song Liu wrote:
> > Hi Frank,
> >
> > Thanks for the report.
>
> Sure, thanks for your help in this.
>
> > It seems the error happened during the WARN_ON_ONCE. Could you
> > please try whether something like the following fixes it?
> >
> > diff --git i/kernel/module/main.c w/kernel/module/main.c
> > index 0f9183f1ca9f..ae42dfc1a815 100644
> > --- i/kernel/module/main.c
> > +++ w/kernel/module/main.c
> > @@ -1537,7 +1537,7 @@ static void __layout_sections(struct module
> > *mod, struct load_info *info, bool i
> >                              || is_init != module_init_layout_section(sname))
> >                                  continue;
> >
> > -                       if (WARN_ON_ONCE(type == MOD_INVALID))
> > +                       if (type == MOD_INVALID)
> >                                  continue;
> >
> >                          s->sh_entsize =
> > module_get_offset_and_type(mod, type, s, i);
>
> Ok, tried that as -patch1 on top of v6.4-rc3, but didn't help, see [1].
>
> [1]: https://pastebin.com/UK9v30Ae
>
> > If that doesn't work, maybe we need something like this:
> >
> > diff --git i/arch/ia64/kernel/module.c w/arch/ia64/kernel/module.c
> > index 3661135da9d9..4e9a7f0498e2 100644
> > --- i/arch/ia64/kernel/module.c
> > +++ w/arch/ia64/kernel/module.c
> > @@ -815,7 +815,7 @@ apply_relocate_add (Elf64_Shdr *sechdrs, const
> > char *strtab, unsigned int symind
> >                  uint64_t gp;
> >                  struct module_memory *mod_mem;
> >
> > -               mod_mem = &mod->mem[MOD_DATA];
> > +               mod_mem = &mod->mem[MOD_TEXT];
> >                  if (mod_mem->size > MAX_LTOFF)
> >                          /*
> >                           * This takes advantage of fact that
> > SHF_ARCH_SMALL gets allocated
>
> Tried that one as -patch2 on top of v6.4-rc3, but didn't help, see [2].
>
> [2]: https://pastebin.com/gLupBndU
>
> I also tried both patches as -patch1plus2 on top of v6.4-rc3 with a
> similar result, see [3].
>
> [3]: https://pastebin.com/7pXBG5vx

Thanks for running the test.

I am not very familiar with the code, but I think we shouldn't hit that
WARN_ON_ONCE. Could you please try with the follow patch to see
which section caused this issue?

Thanks,
Song

diff --git i/kernel/module/main.c w/kernel/module/main.c
index 0f9183f1ca9f..caf3d30cd133 100644
--- i/kernel/module/main.c
+++ w/kernel/module/main.c
@@ -1537,8 +1537,11 @@ static void __layout_sections(struct module
*mod, struct load_info *info, bool i
                            || is_init != module_init_layout_section(sname))
                                continue;

-                       if (WARN_ON_ONCE(type == MOD_INVALID))
+                       if (WARN_ON_ONCE(type == MOD_INVALID)) {
+                               pr_warn("%s: section %s (sh_flags
%llx) matched to MOD_INVALID\n", __func__,
+                                       sname, s->sh_flags);
                                continue;
+                       }

                        s->sh_entsize =
module_get_offset_and_type(mod, type, s, i);
                        pr_debug("\t%s\n", sname);

  parent reply	other threads:[~2023-05-26 21:01 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-26 10:55 Boot regression in Linux v6.4-rc3 Frank Scheiner
2023-05-26 16:49 ` Song Liu
2023-05-26 18:30 ` Frank Scheiner
2023-05-26 21:01 ` Song Liu [this message]
2023-05-26 21:59 ` Luis Chamberlain
2023-05-26 22:22 ` Linus Torvalds
2023-05-26 22:39 ` Song Liu
2023-05-27  6:26 ` Frank Scheiner
2023-05-27  7:01 ` Frank Scheiner
2023-05-27 17:08 ` Linus Torvalds
2023-05-27 18:34 ` Frank Scheiner
2023-05-27 19:34 ` Linus Torvalds
2023-05-27 21:13 ` Frank Scheiner
2023-05-28  5:24 ` Song Liu
2023-05-28  7:30 ` Frank Scheiner
2023-05-28  8:09 ` Frank Scheiner
2023-05-28 10:13 ` John Paul Adrian Glaubitz
2023-05-28 22:46 ` Song Liu
2023-05-30 20:21 ` Konstantin Ryabitsev
2023-05-30 21:04 ` Linus Torvalds
2023-05-30 21:04   ` Linus Torvalds
2023-05-30 21:11 ` Konstantin Ryabitsev
2023-05-30 21:11   ` Konstantin Ryabitsev
2023-05-31 18:15 Frank Scheiner

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=CAPhsuW5pwKe-hPKSyrcnF16Z6KTSYk8mSULcQbDBuvzEb6wneQ@mail.gmail.com \
    --to=song@kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.