All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Wahl <steve.wahl@hpe.com>
To: Pavin Joseph <me@pavinjoseph.com>
Cc: Linux regressions mailing list <regressions@lists.linux.dev>,
	Steve Wahl <steve.wahl@hpe.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	stable@vger.kernel.org
Subject: Re: [REGRESSION] kexec does firmware reboot in kernel v6.7.6
Date: Sat, 2 Mar 2024 18:00:31 -0600	[thread overview]
Message-ID: <ZeO9n6oqXosX1I6C@swahl-home.5wahls.com> (raw)
In-Reply-To: <806629e6-c228-4046-828a-68d397eb8dbc@pavinjoseph.com>

On Sat, Mar 02, 2024 at 09:40:06PM +0530, Pavin Joseph wrote:
> Hello everyone,
> 
> On 3/2/24 20:47, Linux regression tracking (Thorsten Leemhuis) wrote> Thx
> for testing and glad to hear. Still: if you have any feedback how to
> > make that guide even better, please let me know!
> 
> Yes, I have some improvements in mind.
> Don't know if there is a Github repo where I can make a PR, but if not
> here's the gist:
> 
> 1. The git clone/fetch instructions in the TLDR is easy to follow, but there
> are conflicting information later on in the main section and reference that
> taken together does not work. I think it would be better to not perform
> shallow clones or such advanced topics could be relegated to its own
> reference section.
> 
> Here's what I ended up using:
> git clone -o mainline --no-checkout \
>   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> ~/linux/
> cd ~/linux/
> git remote add -t master stable \
>   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
> git checkout --detach v6.0
> git checkout --force --detach mainline/master
> git remote set-branches --add stable linux-6.7.y
> git fetch --verbose stable
> git checkout --force --detach v6.7.7
> git checkout --force --detach v6.7.5
> 
> 2. The "installkernel" command is called "kernel-install" in OpenSuse, and
> it doesn't really perform all the steps to install kernel. It calls dracut
> to create initramfs though, but that's hardly much help.
> 
> I ended up doing:
> sudo make modules_install
> sudo install -m 0600 $(make -s image_name) /usr/lib/modules/$(make -s
> kernelrelease)/vmlinuz
> sudo install -m 0600 System.map /usr/lib/modules/$(make -s
> kernelrelease)/System.map
> sudo kernel-install add $(make -s kernelrelease) /usr/lib/modules/$(make -s
> kernelrelease)/vmlinuz
> sudo ln -sf /boot/initrd-$(make -s kernelrelease) /boot/initrd
> sudo ln -sf /usr/lib/modules/$(make -s kernelrelease)/vmlinuz
> /boot/vmlinuz-$(make -s kernelrelease)
> sudo ln -sf /boot/vmlinuz-$(make -s kernelrelease) /boot/vmlinuz
> sudo ln -sf /usr/lib/modules/$(make -s kernelrelease)/System.map
> /boot/System.map-$(make -s kernelrelease)
> sudo update-bootloader
> 
> 3. The dependencies for kernel building in OpenSuse and other major distros
> are incomplete, most of them have some form of package collection that can
> be provided as an alternative.
> For example in OpenSuse, I installed the following patterns (collection of
> packages):
> sudo zypper in -t pattern devel_basis devel_kernel devel_osc_build
> devel_rpm_build
> 
> 4. The command to build RPM package (make binrpm-pkg) fails as the modules
> are installed into "/home/<user>/linux/.../lib" while depmod checks for
> modules in "/home/<user>/linux/.../usr/lib".
> 
> I think that's it, turned out not to be a gist after all. 🙂
> Thank you very much for writing the updated guide, it was very helpful
> without which I don't think it would have been possible for someone like me
> to find/report this bug.
> 
> > > Full bisection done, culprit identified, and validated by reverting
> > > commit on mainline.
> > 
> > I assume the latter meant "reverting the culprit on mainline fixed the
> > problem"; if you meant something else, please let us know.
> 
> Clarification: reverting culprit commit on mainline fixed the problem.
> 
> Kind regards,
> Pavin Joseph.


Pavin,

I have just now built and installed 6.7.7 and succesfully kexec'd in
this fashion:

------------------------------
sph-185:~ # kexec -l /boot/vmlinuz-6.7.7-wahl --initrd=/boot/initrd-6.7.7-wahl --reuse-cmdline
sph-185:~ # systemctl kexec
...
[  OK  ] Reached target Late Shutdown Services.
         Starting Reboot via kexec...
[  493.056708][    T1] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[  493.089271][    T1] systemd-shutdown[1]: Unmounting file systems.
[  493.096285][T14707] (sd-remount)[14707]: Remounting '/' read-only in with options 'attr2,inode64,logbufs=8,logbsize=32k,noquota'.
[  493.113587][    T1] systemd-shutdown[1]: All filesystems unmounted.
[  493.119913][    T1] systemd-shutdown[1]: Deactivating swaps.
[  493.126612][    T1] systemd-shutdown[1]: All swaps deactivated.
[  493.132584][    T1] systemd-shutdown[1]: Detaching loop devices.
[  493.138718][    T1] systemd-shutdown[1]: All loop devices detached.
[  493.145036][    T1] systemd-shutdown[1]: Stopping MD devices.
[  493.150838][    T1] systemd-shutdown[1]: All MD devices stopped.
[  493.156894][    T1] systemd-shutdown[1]: Detaching DM devices.
[  493.162785][    T1] systemd-shutdown[1]: All DM devices detached.
[  493.168930][    T1] systemd-shutdown[1]: All filesystems, swaps, loop devices, MD devices and DM devices detached.
[  493.221975][    T1] systemd-shutdown[1]: Syncing filesystems and block devices.
[  493.229354][    T1] systemd-shutdown[1]: Rebooting with kexec.
[  493.303438][T14716] qla2xxx [0003:61:00.0]-fffa:14: Adapter shutdown
[  493.309930][T14716] qla2xxx [0003:61:00.0]-00af:14: Performing ISP error recovery - ha=00000000ae891d2f.
[  493.330535][T14716] qla2xxx [0003:61:00.0]-fffe:14: Adapter shutdown successfully.
[  494.114055][T14716] mana 0000:61:00.1: Shutdown was called
[  494.643693][T14716] kvm: exiting hardware virtualization
[  494.649419][T14716] kexec_core: Starting new kernel


Invalid physical address chosen!




Physical KASLR disabled: no suitable memory region!

[    0.000000][    T0] Linux version 6.7.7-wahl (root@sph-185) (gcc (SUSE Linux) 7.5.0, GNU ld (GNU Binutils; SUSE Linux Enterprise 15) 2.41.0.20230908-150100.7.46) #1 SMP PREEMPT_DYNAMIC Sat Mar  2 17:22:28 CST 2024
------------------------------

This was on SLES, not open Suse.

The machines I work on are large, though.  Can you give specifics on
exactly how you are performing your kexec, and what hardware you are
using when you hit this (especially memory size)?  Have you made any
special arrangements for the size of memory reserved for kexec on your
system?

The patch can use slightly more memory to create the identity maps,
and the only thing I can think of right now is that little bit causing
you to run out of memory.

Thank you!

--> Steve Wahl
-- 
Steve Wahl, Hewlett Packard Enterprise

  reply	other threads:[~2024-03-03  0:08 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01 14:10 [REGRESSION] kexec does firmware reboot in kernel v6.7.6 Pavin Joseph
2024-03-01 14:45 ` Linux regression tracking (Thorsten Leemhuis)
2024-03-02  8:24   ` Pavin Joseph
2024-03-02 15:17     ` Linux regression tracking (Thorsten Leemhuis)
2024-03-02 16:10       ` Pavin Joseph
2024-03-03  0:00         ` Steve Wahl [this message]
2024-03-03  6:32           ` Pavin Joseph
2024-03-04 16:15             ` Steve Wahl
2024-03-04 17:48               ` Pavin Joseph
2024-03-05 15:25                 ` Steve Wahl
2024-03-05 19:58                   ` Pavin Joseph
2024-03-06  3:09                     ` Pavin Joseph
2024-03-06 15:50                       ` Steve Wahl
2024-03-03  8:36         ` guide on bisecting (was Re: [REGRESSION] kexec does firmware reboot in kernel v6.7.6) Thorsten Leemhuis
2024-03-03 10:17           ` Pavin Joseph
2024-03-04  6:16             ` Thorsten Leemhuis
2024-03-04 18:03               ` Pavin Joseph
2024-03-05  6:12                 ` Thorsten Leemhuis
2024-03-04 16:56             ` Takashi Iwai
2024-03-05 10:39 [REGRESSION] kexec does firmware reboot in kernel v6.7.6 Eric Hagberg
2024-03-07 16:33 ` Steve Wahl
     [not found]   ` <CAJbxNHfPHpbzRwfuFw6j7SxR1OsgBH2VJFPnchBHTtRueJna4A@mail.gmail.com>
2024-03-12 15:13     ` Steve Wahl
2024-03-12 18:42       ` Pavin Joseph
2024-03-12 20:09         ` Steve Wahl
2024-03-12 22:02         ` Steve Wahl
2024-03-12 22:02           ` Steve Wahl
2024-03-13 12:16           ` Eric W. Biederman
2024-03-13 12:16             ` Eric W. Biederman
2024-03-13 16:17             ` Steve Wahl
2024-03-13 16:17               ` Steve Wahl
2024-03-14  9:25               ` Dave Young
2024-03-14  9:25                 ` Dave Young

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=ZeO9n6oqXosX1I6C@swahl-home.5wahls.com \
    --to=steve.wahl@hpe.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=me@pavinjoseph.com \
    --cc=regressions@lists.linux.dev \
    --cc=stable@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.