← Back to team overview

kernel-packages team mailing list archive

[Bug 1252242] Re: CONFIG_RTC_DRV_PL031=m stops the kernel from setting the system time from the RTC automatically, which userspace expects

 

This bug was fixed in the package linux - 3.11.0-15.23

---------------
linux (3.11.0-15.23) saucy; urgency=low

  [Brad Figg]

  * Release Tracking Bug
    - LP: #1259259

  [ Tim Gardner ]

  * [Config] Build-in ohci-pci
    - LP: #1244176

linux (3.11.0-15.22) saucy; urgency=low

  [Brad Figg]

  * Release Tracking Bug
    - LP: #1257092

  [ Andy Whitcroft ]

  * [Config] CONFIG_DEBUG_BUGVERBOSE=y
    - LP: #1252353

  [ Benjamin Tissoires ]

  * SAUCE: (no-up) HID: appleir: force input to be set
    - LP: #1244505

  [ John Johansen ]

  * SAUCE: (no-up) apparmor: Fix tasks not subject to, reloaded policy
    - LP: #1236455

  [ Kamal Mostafa ]

  * SAUCE: (no-up) drm/i915: i915.disable_pch_pwm overrides PCH_PWM_ENABLE
    quirk
    - LP: #1163720

  [ Manoj Iyer ]

  * SAUCE: Enable earlyprintk via the PL011.
    - LP: #1248233

  [ Paolo Pisati ]

  * [Config] armhf: RTC_DRV_PL031=y
    - LP: #1252242
  * [Config] armhf: CPU_FREQ=y && ARM_HIGHBANK_CPUFREQ=y
    - LP: #1249397

  [ Rob Herring ]

  * [Config] armhf: PSTORE_RAM=y and PSTORE_CONSOLE=y
    - LP: #1248492
  * SAUCE: net: calxedaxgmac: add mac address learning
    - LP: #1248233

  [ Tim Gardner ]

  * [Debian] Re-sign modules after debug objcopy
    - LP: #1253155

  [ Upstream Kernel Changes ]

  * Revert "rt2x00pci: Use PCI MSIs whenever possible"
    - LP: #1257037
  * Revert "epoll: use freezable blocking call"
    - LP: #1257037
  * Revert "select: use freezable blocking call"
    - LP: #1257037
  * Revert "ima: policy for RAMFS"
    - LP: #1257037
  * ARM: tlb: don't perform inner-shareable invalidation for local TLB ops
    - LP: #1239800
  * ARM: 7855/1: Add check for Cortex-A15 errata 798181 ECO
    - LP: #1239800
  * mfd: rtsx: Modify rts5249_optimize_phy
    - LP: #1255297
  * usb: musb: start musb on the udc side, too
    - LP: #1257037
  * usb-storage: add quirk for mandatory READ_CAPACITY_16
    - LP: #1257037
  * USB: support new huawei devices in option.c
    - LP: #1257037
  * USB: quirks.c: add one device that cannot deal with suspension
    - LP: #1257037
  * USB: quirks: add touchscreen that is dazzeled by remote wakeup
    - LP: #1257037
  * USB: serial: ftdi_sio: add id for Z3X Box device
    - LP: #1257037
  * xhci: Don't enable/disable RWE on bus suspend/resume.
    - LP: #1257037
  * cifs: Fix inability to write files >2GB to SMB2/3 shares
    - LP: #1257037
  * x86: Update UV3 hub revision ID
    - LP: #1257037
  * cpufreq: s3c64xx: Rename index to driver_data
    - LP: #1257037
  * cpufreq / intel_pstate: Fix max_perf_pct on resume
    - LP: #1257037
  * bcache: Fixed incorrect order of arguments to bio_alloc_bioset()
    - LP: #1257037
  * HID: wiimote: add LEGO-wiimote VID
    - LP: #1257037
  * cgroup: fix to break the while loop in cgroup_attach_task() correctly
    - LP: #1257037
  * mac80211: correctly close cancelled scans
    - LP: #1257037
  * mac80211: drop spoofed packets in ad-hoc mode
    - LP: #1257037
  * mac80211: use sta_info_get_bss() for nl80211 tx and client probing
    - LP: #1257037
  * mac80211: update sta->last_rx on acked tx frames
    - LP: #1257037
  * mac80211: fix crash if bitrate calculation goes wrong
    - LP: #1257037
  * ath9k: fix tx queue scheduling after channel changes
    - LP: #1257037
  * cfg80211: use the correct macro to check for active monitor support
    - LP: #1257037
  * cfg80211: fix warning when using WEXT for IBSS
    - LP: #1257037
  * mwifiex: fix SDIO interrupt lost issue
    - LP: #1257037
  * rtlwifi: rtl8192cu: Fix error in pointer arithmetic
    - LP: #1257037
  * iwlwifi: mvm: call ieee80211_scan_completed when needed
    - LP: #1257037
  * iwlwifi: pcie: add SKUs for 6000, 6005 and 6235 series
    - LP: #1257037
  * jfs: fix error path in ialloc
    - LP: #1257037
  * can: at91-can: fix device to driver data mapping for platform devices
    - LP: #1257037
  * can: flexcan: fix mx28 detection by rearanging OF match table
    - LP: #1257037
  * can: flexcan: flexcan_chip_start: fix regression, mark one MB for TX
    and abort pending TX
    - LP: #1257037
  * SCSI: BusLogic: Fix an oops when intializing multimaster adapter
    - LP: #1257037
  * SCSI: sd: call blk_pm_runtime_init before add_disk
    - LP: #1257037
  * ecryptfs: Fix memory leakage in keystore.c
    - LP: #1257037
  * raid5: set bio bi_vcnt 0 for discard request
    - LP: #1257037
  * raid5: avoid finding "discard" stripe
    - LP: #1257037
  * libata: make ata_eh_qc_retry() bump scmd->allowed on bogus failures
    - LP: #1257037
  * md: avoid deadlock when md_set_badblocks.
    - LP: #1257037
  * md: Fix skipping recovery for read-only arrays.
    - LP: #1257037
  * target: Fix assignment of LUN in tracepoints
    - LP: #1257037
  * target/pscsi: fix return value check
    - LP: #1257037
  * vhost/scsi: Fix incorrect usage of get_user_pages_fast write parameter
    - LP: #1257037
  * clockevents: Sanitize ticks to nsec conversion
    - LP: #1257037
  * parisc: Do not crash 64bit SMP kernels on machines with >= 4GB RAM
    - LP: #1257037
  * scripts/kallsyms: filter symbols not in kernel address space
    - LP: #1257037
  * ARC: Incorrect mm reference used in vmalloc fault handler
    - LP: #1257037
  * ALSA: hda - Add missing initial vmaster hook at build_controls callback
    - LP: #1257037
  * ALSA: hda - Fix unbalanced runtime PM refcount after S3/S4
    - LP: #1257037
  * ALSA: hda - Add a fixup for ASUS N76VZ
    - LP: #1257037
  * ALSA: fix oops in snd_pcm_info() caused by ASoC DPCM
    - LP: #1257037
  * ASoC: wm_hubs: Add missing break in hp_supply_event()
    - LP: #1257037
  * ASoC: dapm: Fix source list debugfs outputs
    - LP: #1257037
  * staging: ozwpan: prevent overflow in oz_cdev_write()
    - LP: #1257037
  * Staging: bcm: info leak in ioctl
    - LP: #1257037
  * Staging: sb105x: info leak in mp_get_count()
    - LP: #1257037
  * staging: wlags49_h2: buffer overflow setting station name
    - LP: #1257037
  * uml: check length in exitcode_proc_write()
    - LP: #1257037
  * xtensa: don't use alternate signal stack on threads
    - LP: #1257037
  * mm: make generic_access_phys available for modules
    - LP: #1257037
  * uio: provide vm access to UIO_MEM_PHYS maps
    - LP: #1257037
  * Fix a few incorrectly checked [io_]remap_pfn_range() calls
    - LP: #1257037
  * lib/scatterlist.c: don't flush_kernel_dcache_page on slab page
    - LP: #1257037
  * aacraid: missing capable() check in compat ioctl
    - LP: #1257037
  * clk: fixup argument order when setting VCO parameters
    - LP: #1257037
  * clk: nomadik: set all timers to use 2.4 MHz TIMCLK
    - LP: #1257037
  * mm: numa: Do not account for a hinting fault if we raced
    - LP: #1257037
  * mm: Wait for THP migrations to complete during NUMA hinting faults
    - LP: #1257037
  * mm: Prevent parallel splits during THP migration
    - LP: #1257037
  * mm: numa: Sanitize task_numa_fault() callsites
    - LP: #1257037
  * mm: Close races between THP migration and PMD numa clearing
    - LP: #1257037
  * mm: Account for a THP NUMA hinting update as one PTE update
    - LP: #1257037
  * mm: /proc/pid/pagemap: inspect _PAGE_SOFT_DIRTY only on present pages
    - LP: #1257037
  * mm/pagewalk.c: fix walk_page_range() access of wrong PTEs
    - LP: #1257037
  * drm/vmwgfx: Don't put resources with invalid id's on lru list
    - LP: #1257037
  * drm/vmwgfx: Don't kill clients on VT switch
    - LP: #1257037
  * drm/i915: split aux_clock_divider logic in a separated function for
    reuse.
    - LP: #1257037
  * drm/i915: Retry DP aux_ch communications with a different clock after
    failure
    - LP: #1257037
  * drm: Prevent overwriting from userspace underallocating core ioctl
    structs
    - LP: #1257037
  * drm: Pad drm_mode_get_connector to 64-bit boundary
    - LP: #1257037
  * drm/radeon/atom: workaround vbios bug in transmitter table on rs780
    - LP: #1257037
  * drm/radeon: make missing smc ucode non-fatal (r7xx-SI)
    - LP: #1257037
  * drm/i915: Add HSW CRT output readout support
    - LP: #1257037
  * drm/i915: Add support for pipe_bpp readout
    - LP: #1257037
  * drm/i915: No LVDS hardware on Intel D410PT and D425KT
    - LP: #1257037
  * drm/i915: Fix the PPT fdi lane bifurcate state handling on ivb
    - LP: #1257037
  * mutex: Avoid gcc version dependent __builtin_constant_p() usage
    - LP: #1257037
  * seq_file: always update file->f_pos in seq_lseek()
    - LP: #1257037
  * NTB: Add Error Handling in ntb_device_setup
    - LP: #1257037
  * NTB: Correct Number of Scratch Pad Registers
    - LP: #1257037
  * NTB: Correct USD/DSD Identification
    - LP: #1257037
  * NTB: Correct debugfs to work with more than 1 NTB Device
    - LP: #1257037
  * Linux 3.11.8
    - LP: #1257037
  * net/mlx4_core: Fix call to __mlx4_unregister_mac
    - LP: #1257037
  * net: sctp: do not trigger BUG_ON in sctp_cmd_delete_tcb
    - LP: #1257037
  * net: flow_dissector: fail on evil iph->ihl
    - LP: #1257037
  * virtio-net: correctly handle cpu hotplug notifier during resuming
    - LP: #1257037
  * xen-netback: use jiffies_64 value to calculate credit timeout
    - LP: #1257037
  * cxgb3: Fix length calculation in write_ofld_wr() on 32-bit
    architectures
    - LP: #1257037
  * tcp: gso: fix truesize tracking
    - LP: #1257037
  * ipv6: ip6_dst_check needs to check for expired dst_entries
    - LP: #1257037
  * ipv6: reset dst.expires value when clearing expire flag
    - LP: #1257037
  * xen-netback: Handle backend state transitions in a more robust way
    - LP: #1257037
  * xen-netback: transition to CLOSED when removing a VIF
    - LP: #1257037
  * Thermal: x86_pkg_temp: change spin lock
    - LP: #1257037
  * hyperv-fb: add pci stub
    - LP: #1257037
  * USB: add new zte 3g-dongle's pid to option.c
    - LP: #1257037
  * ALSA: hda - hdmi: Fix reported channel map on common default layouts
    - LP: #1257037
  * tracing: Fix potential out-of-bounds in trace_get_user()
    - LP: #1257037
  * drm/i915/dp: workaround BIOS eDP bpp clamping issue
    - LP: #1257037
  * perf: Fix perf ring buffer memory ordering
    - LP: #1257037
  * iwlwifi: pcie: add new SKUs for 7000 & 3160 NIC series
    - LP: #1257037
  * misc: atmel_pwm: add deferred-probing support
    - LP: #1257037
  * backlight: atmel-pwm-bl: fix deferred probe from __init
    - LP: #1257037
  * usb: fix cleanup after failure in hub_configure()
    - LP: #1257037
  * usb: fail on usb_hub_create_port_device() errors
    - LP: #1257037
  * usbcore: set lpm_capable field for LPM capable root hubs
    - LP: #1257037
  * media: sh_vou: almost forever loop in sh_vou_try_fmt_vid_out()
    - LP: #1257037
  * Linux 3.11.9
    - LP: #1257037
  * ACPICA: DeRefOf operator: Update to fully resolve FieldUnit and
    BufferField refs.
    - LP: #1257037
  * libertas: potential oops in debugfs
    - LP: #1257037
  * aacraid: prevent invalid pointer dereference
    - LP: #1257037
  * ACPICA: Return error if DerefOf resolves to a null package element.
    - LP: #1257037
  * ACPICA: Fix for a Store->ArgX when ArgX contains a reference to a
    field.
    - LP: #1257037
  * USB: mos7840: fix tiocmget error handling
    - LP: #1257037
  * can: kvaser_usb: fix usb endpoints detection
    - LP: #1257037
  * Btrfs: relocate csums properly with prealloc extents
    - LP: #1257037
  * crypto: ansi_cprng - Fix off by one error in non-block size request
    - LP: #1257037
  * crypto: s390 - Fix aes-cbc IV corruption
    - LP: #1257037
  * can: c_can: Fix RX message handling, handle lost message before EOB
    - LP: #1257037
  * alx: Reset phy speed after resume
    - LP: #1257037
  * ipc,shm: correct error return value in shmctl (SHM_UNLOCK)
    - LP: #1257037
  * ipc,shm: fix shm_file deletion races
    - LP: #1257037
  * drm/nvc0-/gr: fix a number of missing explicit array terminators...
    - LP: #1257037
  * thinkpad_acpi: Fix build error when CONFIG_SND_MAX_CARDS > 32
    - LP: #1257037
  * SUNRPC: don't map EKEYEXPIRED to EACCES in call_refreshresult
    - LP: #1257037
  * sched, idle: Fix the idle polling state logic
    - LP: #1257037
  * PCI: Allow PCIe Capability link-related register access for switches
    - LP: #1257037
  * PCI: Remove PCIe Capability version checks
    - LP: #1257037
  * PCI: Support PCIe Capability Slot registers only for ports with slots
    - LP: #1257037
  * perf/ftrace: Fix paranoid level for enabling function tracer
    - LP: #1257037
  * ACPI / EC: Ensure lock is acquired before accessing ec struct members
    - LP: #1257037
  * ACPI / video: Quirk initial backlight level 0
    - LP: #1257037
  * ACPI / hotplug: Fix handle_root_bridge_removal()
    - LP: #1257037
  * ACPI / hotplug: Do not execute "insert in progress" _OST
    - LP: #1257037
  * Staging: zram: Fix access of NULL pointer
    - LP: #1257037
  * staging: comedi: avoid memleak for subdevice private
    - LP: #1257037
  * Drivers: hv: vmbus: Fix a bug in channel rescind code
    - LP: #1257037
  * rt2x00: fix a crash bug in the HT descriptor handling fix
    - LP: #1257037
  * rt2x00: check if device is still available on rt2x00mac_flush()
    - LP: #1257037
  * rt2x00: rt2800lib: fix VGC adjustment for RT5592
    - LP: #1257037
  * rt2x00: fix HT TX descriptor settings regression
    - LP: #1257037
  * Bluetooth: revert: "Bluetooth: Add missing reset_resume dev_pm_ops"
    - LP: #1257037
  * exec/ptrace: fix get_dumpable() incorrect tests
    - LP: #1257037
    - CVE-2013-2929
  * Linux 3.11.10
    - LP: #1257037
 -- Brad Figg <brad.figg@xxxxxxxxxxxxx>   Mon, 09 Dec 2013 09:41:31 -0800

** Changed in: linux (Ubuntu Saucy)
       Status: New => Fix Released

** CVE added: http://www.cve.mitre.org/cgi-
bin/cvename.cgi?name=2013-2929

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1252242

Title:
  CONFIG_RTC_DRV_PL031=m stops the kernel from setting the system time
  from the RTC automatically, which userspace expects

Status in “linux” package in Ubuntu:
  Confirmed
Status in “linux” source package in Saucy:
  Fix Released

Bug description:
  SRU Justification:

  Impact: the Linux kernel resets the wall clock (RTC_HCTOSYS=y) using
  the value read from a specific rtc device (RTC_HCTOSYS_DEVICE=rtc0) as
  a late_initcall() (see drivers/rtc/hctosys.c::rtc_hctosys()). That
  implies that the RTC_HCTOSYS_DEVICE must be available when
  rtc_hctosys() is called, making all the rtc drivers that are built as
  a module unsuitanle for this task.

  dmesg:

  ...
  [    5.396605] /home/ppisati/ubuntu-saucy/drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
  # rtc_hctosys() is called, it tries to open rtc0 but the driver is unavailable at this time so it fails to set the system time
  [   10.609622] rtc-pl031 fff35000.rtc: rtc core: registered pl031 as rtc0
  # later on the rtc driver is loaded, but it's too late
  ...
  ubuntu@m01:~$ date
  Wed Dec 31 19:25:24 EST 1969

  Fix: compile in the rtc driver that your board uses to set the wall
  clock (pl031 on calxeda) - see the attached patch

  Test case:

  dmesg:
  ...
  [    5.303860] rtc-pl031 fff35000.rtc: rtc core: registered pl031 as rtc0
  [    5.421639] rtc-pl031 fff35000.rtc: setting system clock to 2013-11-19 16:47:18 UTC (1384879638)
  ...

  when the rtc driver is correctly build-in, you should see something
  like this in your bootlog.

  --

  Working on MAAS, I see midway machines boot on Saucy with an incorrect
  system time (close to epoch). I have tried various things, including
  using MAAS to make sure that the hardware clock was set correctly
  before installation. Despite this, I find that the hardware clock (as
  reported by "hwclock --utc") is correct, yet the system time ("date
  --utc") is close to epoch.

  Affects: Saucy linux-image-3.11.0-13-generic-lpae 3.11.0-13.20, util-
  linux 2.20.1-5.1ubuntu9.

  Below is my current understanding of the root cause and possible
  solutions. My understanding may not be accurate. Please correct any
  inaccuracies. This is just my current understanding; all I know is
  that it doesn't work :)

  In userspace, util-linux via /etc/init/hwclock.conf is involved with
  the RTC. But it doesn't use --hctosys. I can find nothing in userspace
  that takes responsibility for setting up the system time from the RTC.

  hwclock(8) says that --hctosys is "a good option to use in one of the
  system startup scripts.", but also that --systz is "is an alternate
  option to --hctosys that does not read the hardware clock, and  may
  be  used  in system  startup  scripts  for  recent 2.6 kernels where
  you know the System Time contains the Hardware Clock time."

  So it appears to me that it is the kernel that is supposed to make
  sure the RTC is copied to the system clock on boot, or at least that
  this is the assumption that userspace is making. It's my understanding
  that this isn't happening because rtc_pl031 is a module.

  I assume that an RTC module load doesn't reset the system time. Or
  should it? It sounds like an evil side effect to me if it doesn't
  happen on boot. Perhaps there should be or there is a module parameter
  to make it do that, though? If so, I am unaware of it, or any
  userspace implementation of using that.

  I can see two broad solutions to this:

  1) The kernel takes responsibility for doing this task, which AIUI we
  can do with CONFIG_RTC_DRV_PL031=y. This was the case with the linux-
  highbank package in Quantal, which I believe is why this appears to be
  a regression from MAAS' perspective.

  2) Userspace takes responsibility for running "hwclock --hctosys",
  which case we need logic to figure out when this is necessary (AIUI,
  it isn't necessary for Intel, as the RTC driver is compiled in?) and
  how to arrange this.

  Other options:

  3) Some kind of definition of the semantics (perhaps there is one and
  I'm missing it) and userspace asking the module to do it on module
  load, or an hwclock command after module load or something. I am
  concerned about coordinating the timing involved in this option,
  though.

  4) fixrtc on the command line as a workaround for MAAS. This would
  need us to amend flash-kernel. But this doesn't really fix the
  problem; a --hctosys would still be needed to make the clock properly
  accurate.

  ProblemType: Bug
  DistroRelease: Ubuntu 13.10
  Package: linux-image-3.11.0-13-generic-lpae 3.11.0-13.20
  ProcVersionSignature: User Name 3.11.0-13.20-generic-lpae 3.11.6
  Uname: Linux 3.11.0-13-generic-lpae armv7l
  AlsaDevices:
   total 0
   crw-rw---- 1 root audio 116,  1 Dec 31  1969 seq
   crw-rw---- 1 root audio 116, 33 Dec 31  1969 timer
  AlsaVersion: Advanced Linux Sound Architecture Driver Version k3.11.0-13-generic-lpae.
  AplayDevices: Error: [Errno 2] No such file or directory: 'aplay'
  ApportVersion: 2.12.5-0ubuntu2.1
  Architecture: armhf
  ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord'
  AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
  CRDA: Error: [Errno 2] No such file or directory: 'iw'
  Date: Mon Nov 18 06:33:34 2013
  HibernationDevice: RESUME=UUID=1337d4f1-3df8-4589-9008-a47a197b579f
  IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig'
  Lsusb: Error: command ['lsusb'] failed with exit code 1: unable to initialize libusb: -99
  MarkForUpload: True
  PciMultimedia:

  ProcFB:

  ProcKernelCmdLine: console=ttyAMA0 nosplash
  ProcModules:
   binfmt_misc 7197 1 - Live 0x00000000 (F)
   rtc_pl031 4594 0 - Live 0x00000000 (F)
   uio 8483 1 uio_pdrv_genirq, Live 0x00000000 (F)
   uio_pdrv_genirq 3441 0 - Live 0x00000000 (F)
   xgmac 18035 0 - Live 0x00000000 (F)
  RelatedPackageVersions:
   linux-restricted-modules-3.11.0-13-generic-lpae N/A
   linux-backports-modules-3.11.0-13-generic-lpae  N/A
   linux-firmware                                  1.116
  RfKill: Error: [Errno 2] No such file or directory: 'rfkill'
  SourcePackage: linux
  UpgradeStatus: No upgrade log present (probably fresh install)
  WifiSyslog:
   Nov 18 06:26:32 m22 dhclient: DHCPREQUEST of 10.193.24.144 on eth0 to 10.193.37.1 port 67 (xid=0xb672694)
   Nov 18 06:26:32 m22 dhclient: DHCPACK of 10.193.24.144 from 10.193.24.1
   Nov 18 06:26:32 m22 dhclient: bound to 10.193.24.144 -- renewal in 3558 seconds.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1252242/+subscriptions


References