[PPC64EL] kernel command line gets truncated at 512

Bug #1306677 reported by Blake Rouse on 2014-04-11
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Critical
Andy Whitcroft
Trusty
Critical
Andy Whitcroft

Bug Description

Booting the PPC64EL kernel the command line get truncated at 512 characters. This looks to be a hard limit defined in arch/powerpc/boot/opts.h.

The MaaS project, needs to be able to provide a command line longer than 512 characters, as iscsi targets and cloud-init parameters are passed through the kernel command line.

Command line passed to kernel through grub:
nomodeset iscsi_target_name=iqn.2004-05.com.ubuntu:maas:ephemeral-ppc64el-generic-trusty-daily iscsi_target_ip=10.245.71.1 iscsi_target_port=3260 iscsi_initiator=maas-enlist ip=::::maas-enlist:BOOTIF ro root=/dev/disk/by-path/ip-10.245.71.1:3260-iscsi-iqn.2004-05.com.ubuntu:maas:ephemeral-ppc64el-generic-trusty-daily-lun-1 overlayroot=tmpfs cloud-config-url=http://10.245.71.1/MAAS/metadata/latest/enlist-preseed/?op=get_enlist_preseed log_host=10.245.71.1 log_port=514 -- console=hvc0,19200n8 console=hvc1,19200n8 console=ttyS1,19200n8 BOOTIF=01-4a:03:3e:b8:37:66

Command line truncated by the kernel:
BOOT_IMAGE=ppc64el/generic/trusty/daily/boot-kernel nomodeset iscsi_target_name=iqn.2004-05.com.ubuntu:maas:ephemeral-amd64-generic-trusty-daily iscsi_target_ip=10.245.71.1 iscsi_target_port=3260 iscsi_initiator=maas-enlist ip=::::maas-enlist:BOOTIF ro root=/dev/disk/by-path/ip-10.245.71.1:3260-iscsi-iqn.2004-05.com.ubuntu:maas:ephemeral-amd64-generic-trusty-daily-lun-1 overlayroot=tmpfs cloud-config-url=http://10.245.71.1/MAAS/metadata/latest/enlist-preseed/?op=get_enlist_preseed log_host=10.245.71.1 log_

summary: - [PPC] kernel command line gets truncated at 512
+ [PPC64EL] kernel command line gets truncated at 512

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1306677

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Blake Rouse (blake-rouse) wrote :

I cannot run this command as I cannot get to a fully booted environment. I get dropped into the busybox initramfs.

Changed in linux (Ubuntu):
importance: Undecided → Medium
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
tags: added: trusty
Joseph Salisbury (jsalisbury) wrote :

It looks like the size is set to 2048 under x86:

arch/x86/include/asm/setup.h: #define COMMAND_LINE_SIZE 2048

I'll built a powerpc test kernel with the COMMAND_LINE_SIZE increased to 2048 and post a link to it.

Brad Figg (brad-figg) on 2014-04-11
Changed in linux (Ubuntu):
importance: Medium → Critical
Joseph Salisbury (jsalisbury) wrote :

I built a powerpc test kernel with COMMAND_LINE_SIZE set to 2048. The kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1306677/

Can you test this kernel and see if it resolves this bug?

tags: added: kernel-key
Blake Rouse (blake-rouse) wrote :

I used linux-image-3.13.0-24-powerpc64-smp_3.13.0-24.46~lp1306677_powerpc.deb and extracted the vmlinux image from the package. I replaced the boot-kernel image on the MAAS server, and I am seeing the same result in the dmesg output. The kernel command line output is still truncated, looking the same as above.

Tim Gardner (timg-tpi) on 2014-04-12
Changed in linux (Ubuntu Trusty):
status: Confirmed → Fix Committed
Adam Conrad (adconrad) wrote :

That test kernel was ppc64, not ppc64el, so I'm curious how you booted into a ppc64el userspace to note that it was broken at all...

Andy Whitcroft (apw) wrote :

As Adam points out, the test kernels there are not the right architecture, so I am confused that they booted and ran the userspace, could you test the ppc64el kernel below:

    http://people.canonical.com/~apw/lp1306677-trusty/

Please report any testing back here.

Andy Whitcroft (apw) wrote :

If this fails to boot etc because the command line is still truncated, can we get the full dmesg output so we can see how the kernel sees the command line etc.

Blake Rouse (blake-rouse) wrote :

I was able to get the linux-image-3.13.0-24-powerpc64-smp_3.13.0-24.46~lp1306677_powerpc.deb to load on qemu-system-ppc64, but the initramfs didn't match so it failed at a point.

I used the ppc64el version of the kernel, and received the same result. The command line is still truncated.

Here is the grub and dmesg output:
http://paste.ubuntu.com/7245447/

Changed in linux (Ubuntu Trusty):
status: Fix Committed → Confirmed
Andy Whitcroft (apw) wrote :

Ok it looks like there might be more than one define for this. So I have tried to sort that out, and at the same time added some debug to allow us to further diagnose should this one fail. Please test the latest kernel at the URL below, and report back here. As before a dmesg from the kernel success or failure please:

    http://people.canonical.com/~apw/lp1306677-trusty/

Blake Rouse (blake-rouse) wrote :

Looks to be providing the full kernel command line now.

http://paste.ubuntu.com/7249787/

Still cannot get it to boot completely, but I think its do to maybe it was built without iscsi support, as this is required for the MAAS booting kernel. Am I correct?

I checked the iscsi target, it is working correctly. Was able to login and mount the target.

Blake Rouse (blake-rouse) wrote :

It was actually the initramfs, that didn't have the matching modules. Once I updated the initramfs, its all working as expected.

Changed in linux (Ubuntu Trusty):
status: Confirmed → In Progress
assignee: nobody → Joseph Salisbury (jsalisbury)
assignee: Joseph Salisbury (jsalisbury) → nobody
status: In Progress → Confirmed
Andy Whitcroft (apw) wrote :

Ok Good news, I'll get the fix updated in the tree for the next upload.

Andy Whitcroft (apw) on 2014-04-14
Changed in linux (Ubuntu Trusty):
status: Confirmed → Fix Committed
assignee: nobody → Andy Whitcroft (apw)
tags: removed: kernel-key
Brad Figg (brad-figg) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-trusty' to 'verification-done-trusty'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-trusty
Blake Rouse (blake-rouse) wrote :

Verified that linux-image-3.13.0-27 fixed this bug.

tags: added: verification-done-trusty
removed: verification-needed-trusty
Launchpad Janitor (janitor) wrote :
Download full text (11.0 KiB)

This bug was fixed in the package linux - 3.13.0-27.50

---------------
linux (3.13.0-27.50) trusty; urgency=low

  [ Brad Figg ]

  * Revert "rtlwifi: Set the link state"

linux (3.13.0-27.49) trusty; urgency=low

  [ Brad Figg ]

  * Revert "SAUCE: (no-up) HID: rmi: do not stop the device at the end of
    probe"
  * Revert "SAUCE: (no-up) HID: rmi: introduce RMI driver for Synaptics
    touchpads"
  * Revert "[Config] CONFIG_HID_RMI=m"

linux (3.13.0-26.48) trusty; urgency=low

  [ Benjamin Tissoires ]

  * SAUCE: (no-up) HID: rmi: introduce RMI driver for Synaptics touchpads
    - LP: #1305522
  * SAUCE: (no-up) HID: rmi: do not stop the device at the end of probe
    - LP: #1305522

  [ Kamal Mostafa ]

  * Merged back Ubuntu-3.13.0-24.47 security release
  * Revert "n_tty: Fix n_tty_write crash when echoing in raw mode"
    - LP: #1314762
  * Release Tracking Bug
    - LP: #1316835

  [ Tim Gardner ]

  * [Config] CONFIG_HID_RMI=m
    - LP: #1305522
  * [Config] CONFIG_CRYPTO_DEV_NX=n for ppc64el
    - LP: #1314625
  * [Config] CONFIG_ZSWAP=y
    - LP: #1315203
  * Add rpcsec_gss_krb5 to generic inclusion list
    - LP: #769527

  [ Upstream Kernel Changes ]

  * HID: hidraw: make comment more accurate and nicer
    - LP: #1305522
  * HID: remove hid_get_raw_report in struct hid_device
    - LP: #1305522
  * HID: i2c-hid: implement ll_driver transport-layer callbacks
    - LP: #1305522
  * HID: add inliners for ll_driver transport-layer callbacks
    - LP: #1305522
  * HID: Add transport-driver callbacks to the hid_ll_driver struct
    - LP: #1305522
  * drm/nouveau: fail runtime pm properly.
    - LP: #1313986
  * drm/nouveau: don't suspend/resume display on runtime s/r
    - LP: #1313986
  * n_tty: Fix n_tty_write crash when echoing in raw mode
    - LP: #1314762
    - CVE-2014-0196
  * floppy: ignore kernel-only members in FDRAWCMD ioctl input
    - LP: #1316729
    - CVE-2014-1737
  * floppy: don't write kernel-only members to FDRAWCMD ioctl output
    - LP: #1316735
    - CVE-2014-1738

linux (3.13.0-25.47) trusty; urgency=low

  [ Joseph Salisbury ]

  * Release Tracking Bug
    - LP: #1313868

  [ Adam Lee ]

  * [Config] CONFIG_RTL8723BE=m, CONFIG_RTL8723_COMMON=m
    - LP: #1240940

  [ Alex Hung ]

  * SAUCE: (no-up) dell-led: add mic mute led interface
    - LP: #1308297

  [ Andy Whitcroft ]

  * SAUCE: (no-up) powerpc: Increase COMMAND_LINE_SIZE to 2048 from 512.
    - LP: #1306677

  [ Ben Collins ]

  * [Config] Disable PAMU on Freescale kernels
    - LP: #1311738

  [ Tim Gardner ]

  * Revert "SAUCE: x86, hyperv: bypass the timer_irq_works() check"
    - LP: #1311683
  * SAUCE: (no-up) ALSA: usb-audio: Suppress repetitive debug messages from
    retire_playback_urb()
    - LP: #1305133
  * SAUCE: (no-up) 'BUG:' message unnecessarily triggers kerneloops
    - LP: #1305480
  * [Config] CONFIG_POWERNV_CPUFREQ=m
    - LP: #1309576
  * [Config] CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y for ppc64el
    - LP: #1309576
  * [Config] CONFIG_TRANSPARENT_HUGEPAGE=n for arm64
    - LP: #1309221
  * [Config] CONFIG_MEMCG_KMEM=y
    - LP: #1309586
  * [Config] CONFIG_CRASH_DUMP=y for ppc64el
    - LP: #1312783

  [ Upstream Kernel Change...

Changed in linux (Ubuntu Trusty):
status: Fix Committed → Fix Released
Joseph Salisbury (jsalisbury) wrote :

It looks like this is now fixed upstream in v3.15-rc6 by commits: a5980d0 and a2dd5da

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers