public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] s390: fix zfcpdump_defconfig failing to perform zfcpdump
@ 2017-10-12 10:37 Dimitri John Ledkov
  2017-10-13  8:28 ` Michael Holzheu
  0 siblings, 1 reply; 4+ messages in thread
From: Dimitri John Ledkov @ 2017-10-12 10:37 UTC (permalink / raw)
  To: linux-s390; +Cc: Dimitri John Ledkov, stable

zipl from s390-tools generates root=/dev/ram0 kernel cmdline for
zfcpdump, thus BLK_DEV_RAM is required.

zfcpdump initrd mounts DEBUG_FS, thus it is also required.

Without above two options kernel images built with zfcpdump_defconfig
fail to perform zfcpdump. Affects v4.10+.

Bug-Ubuntu: https://launchpad.net/bugs/1722735
Bug-Ubuntu: https://launchpad.net/bugs/1719290

Cc: stable@vger.kernel.org
Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
---
 arch/s390/configs/zfcpdump_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/s390/configs/zfcpdump_defconfig b/arch/s390/configs/zfcpdump_defconfig
index afa46a7..04e042e 100644
--- a/arch/s390/configs/zfcpdump_defconfig
+++ b/arch/s390/configs/zfcpdump_defconfig
@@ -27,6 +27,7 @@ CONFIG_NET=y
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_DEVTMPFS=y
 # CONFIG_FIRMWARE_IN_KERNEL is not set
+CONFIG_BLK_DEV_RAM=y
 # CONFIG_BLK_DEV_XPRAM is not set
 # CONFIG_DCSSBLK is not set
 # CONFIG_DASD is not set
@@ -59,6 +60,7 @@ CONFIG_CONFIGFS_FS=y
 # CONFIG_NETWORK_FILESYSTEMS is not set
 CONFIG_PRINTK_TIME=y
 CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_FS=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_PANIC_ON_OOPS=y
 # CONFIG_SCHED_DEBUG is not set
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] s390: fix zfcpdump_defconfig failing to perform zfcpdump
  2017-10-12 10:37 [PATCH] s390: fix zfcpdump_defconfig failing to perform zfcpdump Dimitri John Ledkov
@ 2017-10-13  8:28 ` Michael Holzheu
  2017-10-13 13:36   ` Dimitri John Ledkov
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Holzheu @ 2017-10-13  8:28 UTC (permalink / raw)
  To: Dimitri John Ledkov; +Cc: linux-s390, stable

Am Thu, 12 Oct 2017 11:37:26 +0100
schrieb Dimitri John Ledkov <xnox@ubuntu.com>:

> zipl from s390-tools generates root=/dev/ram0 kernel cmdline for
> zfcpdump, thus BLK_DEV_RAM is required.
> 
> zfcpdump initrd mounts DEBUG_FS, thus it is also required.
> 
> Without above two options kernel images built with zfcpdump_defconfig
> fail to perform zfcpdump. Affects v4.10+.
> 
> Bug-Ubuntu: https://launchpad.net/bugs/1722735
> Bug-Ubuntu: https://launchpad.net/bugs/1719290
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
> ---
>  arch/s390/configs/zfcpdump_defconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/s390/configs/zfcpdump_defconfig b/arch/s390/configs/zfcpdump_defconfig
> index afa46a7..04e042e 100644
> --- a/arch/s390/configs/zfcpdump_defconfig
> +++ b/arch/s390/configs/zfcpdump_defconfig
> @@ -27,6 +27,7 @@ CONFIG_NET=y
>  CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
>  CONFIG_DEVTMPFS=y
>  # CONFIG_FIRMWARE_IN_KERNEL is not set
> +CONFIG_BLK_DEV_RAM=y

In https://launchpad.net/bugs/1722735 was reported that the ramdisk
problem was introduced with kernel 4.10. But to me it looks like
the kernel config option CONFIG_BLK_DEV_RAM is also not there in
kernel 4.9:

 linux-master ((v4.10))$ git checkout v4.9
 Previous HEAD position was c8d2bc9bc39e... Linux 4.8
 HEAD is now at 69973b830859... Linux 4.9
 linux-master ((v4.9))$ make zfcpdump_defconfig
   HOSTCC  scripts/basic/fixdep
 #
 # configuration written to .config
 #
 linux-master ((v4.9))$ grep CONFIG_BLK_DEV_RA .config
 # CONFIG_BLK_DEV_RAM is not set

Regards
Michael

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] s390: fix zfcpdump_defconfig failing to perform zfcpdump
  2017-10-13  8:28 ` Michael Holzheu
@ 2017-10-13 13:36   ` Dimitri John Ledkov
  2017-10-16  9:24     ` Michael Holzheu
  0 siblings, 1 reply; 4+ messages in thread
From: Dimitri John Ledkov @ 2017-10-13 13:36 UTC (permalink / raw)
  To: Michael Holzheu; +Cc: linux-s390, stable

On 13 October 2017 at 09:28, Michael Holzheu <holzheu@linux.vnet.ibm.com> wrote:
> Am Thu, 12 Oct 2017 11:37:26 +0100
> schrieb Dimitri John Ledkov <xnox@ubuntu.com>:
>
>> zipl from s390-tools generates root=/dev/ram0 kernel cmdline for
>> zfcpdump, thus BLK_DEV_RAM is required.
>>
>> zfcpdump initrd mounts DEBUG_FS, thus it is also required.
>>
>> Without above two options kernel images built with zfcpdump_defconfig
>> fail to perform zfcpdump. Affects v4.10+.
>>
>> Bug-Ubuntu: https://launchpad.net/bugs/1722735
>> Bug-Ubuntu: https://launchpad.net/bugs/1719290
>>
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
>> ---
>>  arch/s390/configs/zfcpdump_defconfig | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/s390/configs/zfcpdump_defconfig b/arch/s390/configs/zfcpdump_defconfig
>> index afa46a7..04e042e 100644
>> --- a/arch/s390/configs/zfcpdump_defconfig
>> +++ b/arch/s390/configs/zfcpdump_defconfig
>> @@ -27,6 +27,7 @@ CONFIG_NET=y
>>  CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
>>  CONFIG_DEVTMPFS=y
>>  # CONFIG_FIRMWARE_IN_KERNEL is not set
>> +CONFIG_BLK_DEV_RAM=y
>
> In https://launchpad.net/bugs/1722735 was reported that the ramdisk
> problem was introduced with kernel 4.10. But to me it looks like
> the kernel config option CONFIG_BLK_DEV_RAM is also not there in
> kernel 4.9:
>

True.

The actual symptoms on v4.10 is that /dev/ram0 does not exist. And I
guess BLK_DEV_RAM is one way to get it working once again.
I did a checkout of v4.9 generated zfcpdump_config; did a checkout of
v4.10 generated zfcpdump_config and diffed the two, grepping for
removed keys which points at

$ diff -u v4.9 v4.10 | grep '^\-' | grep =y
-CONFIG_DEVKMEM=y

Which is from
commit e334cd69fa65fc9e916d6adc8d860a9b6b9e7281
Author: Dave Young <dyoung@redhat.com>
Date:   Mon Oct 10 13:34:33 2016 +0800

    Move CONFIG_DEVKMEM default to n

I will retest again a v4.10 kernel with just CONFIG_DEVKMEM toggled
back to y. As an end-user of kernel config it feels surprising that
toggle of /dev/kmem controls whether or not initrd is available to be
used as root=/dev/ram0. I would have thought CONFIG_BLK_DEV_INITRD=y
should be sufficient to get initrd available as /dev/ram0.

If all that checks out, what would the preference be DEVKMEM=y or
BLK_DEV_RAM=y to guarantee that booting with `root=/dev/ram0` works
(which is what `zipl -d` generates), irrespective of any other kernel
defaults changes?

-- 
Regards,

Dimitri.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] s390: fix zfcpdump_defconfig failing to perform zfcpdump
  2017-10-13 13:36   ` Dimitri John Ledkov
@ 2017-10-16  9:24     ` Michael Holzheu
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Holzheu @ 2017-10-16  9:24 UTC (permalink / raw)
  To: Dimitri John Ledkov; +Cc: linux-s390, stable

Am Fri, 13 Oct 2017 14:36:11 +0100
schrieb Dimitri John Ledkov <xnox@ubuntu.com>:

> On 13 October 2017 at 09:28, Michael Holzheu <holzheu@linux.vnet.ibm.com> wrote:
> > Am Thu, 12 Oct 2017 11:37:26 +0100
> > schrieb Dimitri John Ledkov <xnox@ubuntu.com>:
> >
> >> zipl from s390-tools generates root=/dev/ram0 kernel cmdline for
> >> zfcpdump, thus BLK_DEV_RAM is required.
> >>
> >> zfcpdump initrd mounts DEBUG_FS, thus it is also required.
> >>
> >> Without above two options kernel images built with zfcpdump_defconfig
> >> fail to perform zfcpdump. Affects v4.10+.
> >>
> >> Bug-Ubuntu: https://launchpad.net/bugs/1722735
> >> Bug-Ubuntu: https://launchpad.net/bugs/1719290
> >>
> >> Cc: stable@vger.kernel.org
> >> Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
> >> ---
> >>  arch/s390/configs/zfcpdump_defconfig | 2 ++
> >>  1 file changed, 2 insertions(+)
> >>
> >> diff --git a/arch/s390/configs/zfcpdump_defconfig b/arch/s390/configs/zfcpdump_defconfig
> >> index afa46a7..04e042e 100644
> >> --- a/arch/s390/configs/zfcpdump_defconfig
> >> +++ b/arch/s390/configs/zfcpdump_defconfig
> >> @@ -27,6 +27,7 @@ CONFIG_NET=y
> >>  CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
> >>  CONFIG_DEVTMPFS=y
> >>  # CONFIG_FIRMWARE_IN_KERNEL is not set
> >> +CONFIG_BLK_DEV_RAM=y
> >
> > In https://launchpad.net/bugs/1722735 was reported that the ramdisk
> > problem was introduced with kernel 4.10. But to me it looks like
> > the kernel config option CONFIG_BLK_DEV_RAM is also not there in
> > kernel 4.9:
> >
> 
> True.
> 
> The actual symptoms on v4.10 is that /dev/ram0 does not exist. And I
> guess BLK_DEV_RAM is one way to get it working once again.
> I did a checkout of v4.9 generated zfcpdump_config; did a checkout of
> v4.10 generated zfcpdump_config and diffed the two, grepping for
> removed keys which points at
> 
> $ diff -u v4.9 v4.10 | grep '^\-' | grep =y
> -CONFIG_DEVKMEM=y
> 
> Which is from
> commit e334cd69fa65fc9e916d6adc8d860a9b6b9e7281
> Author: Dave Young <dyoung@redhat.com>
> Date:   Mon Oct 10 13:34:33 2016 +0800
> 
>     Move CONFIG_DEVKMEM default to n
> 
> I will retest again a v4.10 kernel with just CONFIG_DEVKMEM toggled
> back to y. As an end-user of kernel config it feels surprising that
> toggle of /dev/kmem controls whether or not initrd is available to be
> used as root=/dev/ram0.

Indead it is - especially when looking into drivers/char/Kconfig:

v4.9:

config DEVKMEM
        bool "/dev/kmem virtual device support"
        default y
        help
          Say Y here if you want to support the /dev/kmem device. The
          /dev/kmem device is rarely used, but can be used for certain
          kind of kernel debugging operations.
          When in doubt, say "N".

v4.10:

config DEVKMEM
        bool "/dev/kmem virtual device support"
        help
          ....

There is no "select" statement that enables initrd/initramfs support.

I have no idea why disabling DEVKMEM leads to your observation.

> I would have thought CONFIG_BLK_DEV_INITRD=y
> should be sufficient to get initrd available as /dev/ram0.
> 
> If all that checks out, what would the preference be DEVKMEM=y or
> BLK_DEV_RAM=y to guarantee that booting with `root=/dev/ram0` works
> (which is what `zipl -d` generates), irrespective of any other kernel
> defaults changes?

IMHO we should enable CONFIG_BLK_DEV_INITRD as described in the
zfcpdump README:

src/s390-tools/zfcpdump $ git grep BLK_DEV_INITRD
README.part: * CONFIG_BLK_DEV_INITRD=y

Michael

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-16  9:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-12 10:37 [PATCH] s390: fix zfcpdump_defconfig failing to perform zfcpdump Dimitri John Ledkov
2017-10-13  8:28 ` Michael Holzheu
2017-10-13 13:36   ` Dimitri John Ledkov
2017-10-16  9:24     ` Michael Holzheu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox