24x7 counters: Bug in catalog_read()

Bug #1380432 reported by bugproxy
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Chris J Arges
Trusty
Invalid
Undecided
Chris J Arges
Utopic
Fix Released
Undecided
Chris J Arges
Vivid
Fix Released
Undecided
Chris J Arges

Bug Description

SRU Justification:

[Impact]
When using POWER8 in HV mode one cannot access
/sys/bus/event_source/devices/hv_24x7/interface/catalog

[Test Case]
cp /sys/bus/event_source/devices/hv_24x7/interface/catalog /tmp
ls -l /tmp/catalog
# this should show a file with a size > 0

[Fix]
56f12bee55d740dc47eed0ca9d5c72cffdffd6cf which is in 3.18-rc1
It is a clean cherry pick into 3.16/3.13.

--

---Problem Description---
24x7 counters: Bug in catalog_read()

---Additional Hardware Info---
Power8 system with support for 24x7 counters

 Machine Type = Power8 IBM,9119-MME

---Steps to Reproduce---
cp /sys/bus/event_source/devices/hv_24x7/interface/catalog /tmp
ls -l /tmp/catalog

Shows a file size 0 for the /tmp/catalog.

We recently discovered a bug in the upstream Linux kernel. It was
fixed by this patch

https://lkml.org/lkml/2014/10/1/35

and that patch is scheduled to be included in powerpc tree.

When it is included, we should back port to Ubuntu 14.10 or next release.

CVE References

bugproxy (bugproxy)
tags: added: architecture-ppc64 bugnameltc-117275 severity-medium targetmilestone-inin1410
Luciano Chavez (lnx1138)
affects: ubuntu → linux (Ubuntu)
Changed in linux (Ubuntu):
assignee: nobody → Taco Screen team (taco-screen-team)
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

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

apport-collect 1380432

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
Luciano Chavez (lnx1138)
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Tim Gardner (timg-tpi) wrote :

56f12bee55d740dc47eed0ca9d5c72cffdffd6cf powerpc/perf/hv-24x7: Simplify catalog_read()

Changed in linux (Ubuntu Utopic):
assignee: Taco Screen team (taco-screen-team) → Tim Gardner (timg-tpi)
status: Confirmed → In Progress
tags: added: kernel-da-key
Revision history for this message
Chris J Arges (arges) wrote :

I've tried verifying a build with this patch on top of our current 3.16 Utopic tree and the above sysfs directory was still not found. Are there additional steps required to enable the hv_24x7 device? I have been testing on a POWER8 machine.

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2014-10-22 00:44 EDT-------
(In reply to comment #7)
> I've tried verifying a build with this patch on top of our current 3.16
> Utopic tree and the above sysfs directory was still not found. Are there
> additional steps required to enable the hv_24x7 device? I have been testing
> on a POWER8 machine.

Hmm, are you running in a KVM guest ? I don't think 24x7 counters
are supported in KVM guests yet.

Revision history for this message
Chris J Arges (arges) wrote :

Hi, I've tried this both in a KVM guest and on the host POWER8 machine, are there any other configuration steps required to ensure that hv_24x7 is set up properly on the host? Thanks,

Changed in linux (Ubuntu Utopic):
assignee: Tim Gardner (timg-tpi) → Chris J Arges (arges)
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2014-10-22 22:30 EDT-------
(In reply to comment #9)
> Hi, I've tried this both in a KVM guest and on the host POWER8 machine, are
> there any other configuration steps required to ensure that hv_24x7 is set
> up properly on the host? Thanks,

It needs to be an LPAR on PowerVM. hv_24x7_init() has a check for
FW_FEATURE_LPAR. We could confirm by ensuring hv_24x7_init()
returns successfully.

bugproxy (bugproxy)
tags: added: architecture-ppc64le
removed: architecture-ppc64
Revision history for this message
Chris J Arges (arges) wrote :

Since I'm unsure how to setup an LPAR on our POWER8 machine (we are running in NV mode), can you test the following kernel to see if it solves the issue:

http://people.canonical.com/~arges/lp1380432/

Thanks,

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2014-10-25 02:47 EDT-------
(In reply to comment #11)
> Since I'm unsure how to setup an LPAR on our POWER8 machine (we are running
> in NV mode), can you test the following kernel to see if it solves the issue:
>
> http://people.canonical.com/~arges/lp1380432/
>
> Thanks,

Sure. I will try it out in a couple of days.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2014-10-30 23:03 EDT-------
(In reply to comment #12)
> (In reply to comment #11)
> > Since I'm unsure how to setup an LPAR on our POWER8 machine (we are running
> > in NV mode), can you test the following kernel to see if it solves the issue:
> >
> > http://people.canonical.com/~arges/lp1380432/
> >
> > Thanks,
>
> Sure. I will try it out in a couple of days.

I tried this out today and it working as expected:

(cp-catalog is a simple test case posted here)
https://lkml.org/lkml/2014/10/7/86

root@ltcbrazos2-lp02:/home/guest# uname -a
Linux ltcbrazos2-lp02.austin.ibm.com 3.16.0-23-generic #30 SMP Mon Oct 20 14:04:24 UTC 2014 ppc64le ppc64le ppc64le GNU/Linux

root@ltcbrazos2-lp02:/home/guest# ./cp-catalog 5 > /tmp/catalog-5

root@ltcbrazos2-lp02:/home/guest# ./cp-catalog 4096 > /tmp/catalog-4096

root@ltcbrazos2-lp02:/home/guest# diff /tmp/catalog-5 /tmp/catalog-4096

root@ltcbrazos2-lp02:/home/guest# ls -l !*
ls -l /tmp/catalog-5 /tmp/catalog-4096

-rw-r--r-- 1 root root 262144 Oct 30 18:51 /tmp/catalog-4096
-rw-r--r-- 1 root root 262144 Oct 30 18:51 /tmp/catalog-5

root@ltcbrazos2-lp02:/home/guest# ls /sys/bus/event_source/devices/
breakpoint cpu hv_24x7 hv_gpci software tracepoint

root@ltcbrazos2-lp02:/home/guest# ls /sys/bus/event_source/devices/hv_24x7/interface/
catalog catalog_len catalog_version

root@ltcbrazos2-lp02:/home/guest# cat /sys/bus/event_source/devices/hv_24x7/interface/catalog_len
262144

Chris J Arges (arges)
Changed in linux (Ubuntu Trusty):
assignee: nobody → Chris J Arges (arges)
status: New → In Progress
description: updated
Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Trusty):
status: In Progress → Invalid
Changed in linux (Ubuntu Utopic):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Vivid):
status: In Progress → Fix Released
Revision history for this message
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-utopic' to 'verification-done-utopic'.

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-utopic
Luciano Chavez (lnx1138)
tags: added: verification-done-utopic
removed: verification-needed-utopic
Revision history for this message
Chris J Arges (arges) wrote :

Thanks for verifying Luciano!

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (17.0 KiB)

This bug was fixed in the package linux - 3.16.0-25.33

---------------
linux (3.16.0-25.33) utopic; urgency=low

  [ Luis Henriques ]

  * Release Tracking Bug
    - LP: #1389170

  [ dann frazier ]

  * [Config] Disable CONFIG_IPMI_SI_PROBE_DEFAULTS on armhf and arm64
    - LP: #1388952

  [ Duc Dang ]

  * SAUCE: (no-up) [PCIE] APM X-Gene: Remove debug messages in MSI
    interrupt handler path.
    - LP: #1382244
  * SAUCE: (no-up) PCI: X-Gene: Fix max payload size and phantom function
    configuration
    - LP: #1386261

  [ Tim Gardner ]

  * Revert "SAUCE: (no-up) PCI: Increase BAR size quirk for IBM ipr SAS
    Crocodile adapters"
    - LP: #1387813
  * [Config] CONFIG_SOUND_OSS_CORE_PRECLAIM=n
    - LP: #1385510
  * [Debian] install usbipd
    - LP: #898003
  * [Debian] Fix linux-doc dangling symlinks
    - LP: #661306

  [ Upstream Kernel Changes ]

  * Revert "macvlan: simplify the structure port"
    - LP: #1381490
  * Revert "net/macb: add pinctrl consumer support"
    - LP: #1381490
  * Revert "lzo: properly check for overruns"
    - LP: #1387813
  * Revert "ath9k_hw: reduce ANI firstep range for older chips"
    - LP: #1387813
  * ASoC: ssm2602: do not hardcode type to SSM2602
    - LP: #1379785
  * ASoC: core: fix possible ZERO_SIZE_PTR pointer dereferencing error.
    - LP: #1379785
  * perf: fix perf bug in fork()
    - LP: #1379785
  * mm: memcontrol: do not iterate uninitialized memcgs
    - LP: #1379785
  * mm: migrate: Close race between migration completion and mprotect
    - LP: #1379785
  * i2c: qup: Fix order of runtime pm initialization
    - LP: #1379785
  * i2c: rk3x: fix 0 length write transfers
    - LP: #1379785
  * ACPI / i915: Update the condition to ignore firmware backlight change
    request
    - LP: #1379785
  * cpufreq: integrator: fix integrator_cpufreq_remove return type
    - LP: #1379785
  * cpufreq: pcc-cpufreq: Fix wait_event() under spinlock
    - LP: #1379785
  * md/raid5: disable 'DISCARD' by default due to safety concerns.
    - LP: #1379785
  * drm/i915: Flush the PTEs after updating them before suspend
    - LP: #1379785
  * Fix problem recognizing symlinks
    - LP: #1379785
  * init/Kconfig: Fix HAVE_FUTEX_CMPXCHG to not break up the EXPERT menu
    - LP: #1379785
  * ring-buffer: Fix infinite spin in reading buffer
    - LP: #1379785
  * uas: Only complain about missing sg if all other checks succeed
    - LP: #1379785
  * uas: Log a warning when we cannot use uas because the hcd lacks streams
    - LP: #1379785
  * uas: Disable uas on ASM1051 devices
    - LP: #1379785
  * uas: Add missing le16_to_cpu calls to asm1051 / asm1053 usb-id check
    - LP: #1379785
  * x86, ia64: Move EFI_FB vga_default_device() initialization to
    pci_vga_fixup()
    - LP: #1379785
  * vgaarb: Don't default exclusively to first video device with mem+io
    - LP: #1379785
  * mm, thp: move invariant bug check out of loop in __split_huge_page_map
    - LP: #1379785
  * mm: numa: Do not mark PTEs pte_numa when splitting huge pages
    - LP: #1379785
  * media: vb2: fix VBI/poll regression
    - LP: #1379785
  * jiffies: Fix timeval conversion to jiffies
    - LP: #1379785
  * Linux 3.16.5
    - LP: #1379785
 ...

Changed in linux (Ubuntu Utopic):
status: Fix Committed → Fix Released
bugproxy (bugproxy)
tags: added: targetmilestone-inin1504
removed: targetmilestone-inin1410
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.