~kmously/ubuntu/+source/linux/+git/artful:kamal-backlog-review

Last commit made on 2018-02-15
Get this branch:
git clone -b kamal-backlog-review https://git.launchpad.net/~kmously/ubuntu/+source/linux/+git/artful
Only Khaled El Mously can upload to this branch. If you are Khaled El Mously please log in for upload directions.

Branch merges

Branch information

Name:
kamal-backlog-review
Repository:
lp:~kmously/ubuntu/+source/linux/+git/artful

Recent commits

9dcf942... by AaronMa

UBUNTU: SAUCE: drm/i915: Disable writing of TMDS_OE on Lenovo ThinkPad X1 series

BugLink: https://bugs.launchpad.net/bugs/1738523

There is a hw design on Lenovo ThinkPad X1 yoga/carbon:
Intel GEN9 display -> AlpineRidge -> PS8407 -> HDMI output

When switch mode on this HDMI output, it failed to writing on
I2C device 0x40/0x50. Then sometimes the HDMI output is disabled.

From Parade's support, tmds_oe is enabled by default, and keep it
enabled to fix this issue.

Add a workaround to bypass this TMDS_OE writing on identified
laptop models.

Signed-off-by: Aaron Ma <email address hidden>
Acked-By: Wen-chien Jesse Sung <email address hidden>
Acked-By: AceLan Kao <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>

e76f561... by Len Brown

x86/tsc: Future-proof native_calibrate_tsc()

BugLink: http://bugs.launchpad.net/bugs/1744988

If the crystal frequency cannot be determined via CPUID(15).crystal_khz or
the built-in table then native_calibrate_tsc() will still set the
X86_FEATURE_TSC_KNOWN_FREQ flag which prevents the refined TSC calibration.

As a consequence such systems use cpu_khz for the TSC frequency which is
incorrect when cpu_khz != tsc_khz resulting in time drift.

Return early when the crystal frequency cannot be retrieved without setting
the X86_FEATURE_TSC_KNOWN_FREQ flag. This ensures that the refined TSC
calibration is invoked.

[ tglx: Steam-blastered changelog. Sigh ]

Fixes: 4ca4df0b7eb0 ("x86/tsc: Mark TSC frequency determined by CPUID as known")
Signed-off-by: Len Brown <email address hidden>
Signed-off-by: Thomas Gleixner <email address hidden>
Cc: <email address hidden>
Cc: Bin Gao <email address hidden>
Cc: <email address hidden>
Link: https://lkml.kernel.org/r/0fe2503aa7d7fc69137141fc705541a78101d2b9<email address hidden>

(cherry picked from commit da4ae6c4a0b8dee5a5377a385545d2250fa8cddb)
Signed-off-by: Joseph Salisbury <email address hidden>
Acked-by: Colin Ian King <email address hidden>
Acked-by: Khalid Elmously <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>

81c6c59... by Len Brown

x86/tsc: Fix erroneous TSC rate on Skylake Xeon

BugLink: http://bugs.launchpad.net/bugs/1744988

The INTEL_FAM6_SKYLAKE_X hardcoded crystal_khz value of 25MHZ is
problematic:

 - SKX workstations (with same model # as server variants) use a 24 MHz
   crystal. This results in a -4.0% time drift rate on SKX workstations.

 - SKX servers subject the crystal to an EMI reduction circuit that reduces its
   actual frequency by (approximately) -0.25%. This results in -1 second per
   10 minute time drift as compared to network time.

This issue can also trigger a timer and power problem, on configurations
that use the LAPIC timer (versus the TSC deadline timer). Clock ticks
scheduled with the LAPIC timer arrive a few usec before the time they are
expected (according to the slow TSC). This causes Linux to poll-idle, when
it should be in an idle power saving state. The idle and clock code do not
graciously recover from this error, sometimes resulting in significant
polling and measurable power impact.

Stop using native_calibrate_tsc() for INTEL_FAM6_SKYLAKE_X.
native_calibrate_tsc() will return 0, boot will run with tsc_khz = cpu_khz,
and the TSC refined calibration will update tsc_khz to correct for the
difference.

[ tglx: Sanitized change log ]

Fixes: 6baf3d61821f ("x86/tsc: Add additional Intel CPU models to the crystal quirk list")
Signed-off-by: Len Brown <email address hidden>
Signed-off-by: Thomas Gleixner <email address hidden>
Cc: <email address hidden>
Cc: Prarit Bhargava <email address hidden>
Cc: <email address hidden>
Link: https://lkml.kernel.org/r/ff6dcea166e8ff8f2f6a03c17beab2cb436aa779<email address hidden>

(cherry picked from commit b511203093489eb1829cb4de86e8214752205ac6)
Signed-off-by: Joseph Salisbury <email address hidden>
Acked-by: Colin Ian King <email address hidden>
Acked-by: Khalid Elmously <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>

c39a836... by Len Brown

x86/tsc: Print tsc_khz, when it differs from cpu_khz

BugLink: http://bugs.launchpad.net/bugs/1744988

If CPU and TSC frequency are the same the printout of the CPU frequency is
valid for the TSC as well:

      tsc: Detected 2900.000 MHz processor

If the TSC frequency is different there is no information in dmesg. Add a
conditional printout:

  tsc: Detected 2904.000 MHz TSC

Signed-off-by: Len Brown <email address hidden>
Signed-off-by: Thomas Gleixner <email address hidden>
Cc: <email address hidden>
Link: https://lkml.kernel.org/r/537b342debcd8e8aebc8d631015dcdf9f9ba8a26<email address hidden>

(cherry picked from commit 4b5b2127238e689ee18aa6752959751dd61c4c73)
Signed-off-by: Joseph Salisbury <email address hidden>
Acked-by: Colin Ian King <email address hidden>
Acked-by: Khalid Elmously <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>

a2ab122... by Scott Bauer <email address hidden>

PCI: vmd: Free up IRQs on suspend path

BugLink: http://bugs.launchpad.net/bugs/1745508

Free up the IRQs we request on the suspend path and reallocate them on the
resume path.

Fixes this error:

  CPU 111 disable failed: CPU has 9 vectors assigned and there are only 0 available.
  Error taking CPU111 down: -34
  Non-boot CPUs are not disabled
  Enabling non-boot CPUs ...

Signed-off-by: Scott Bauer <email address hidden>
Signed-off-by: Bjorn Helgaas <email address hidden>
Acked-by: Keith Busch <email address hidden>
(cherry picked from commit e2b1820bd5d0962d6f271b0d47c3a0e38647df2f)
Signed-off-by: Joseph Salisbury <email address hidden>
Acked-by: Kleber Souza <email address hidden>
Acked-by: Colin Ian King <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>

a0ec89d... by Kevin Cernekee <email address hidden>

netfilter: nfnetlink_cthelper: Add missing permission checks

The capability check in nfnetlink_rcv() verifies that the caller
has CAP_NET_ADMIN in the namespace that "owns" the netlink socket.
However, nfnl_cthelper_list is shared by all net namespaces on the
system. An unprivileged user can create user and net namespaces
in which he holds CAP_NET_ADMIN to bypass the netlink_net_capable()
check:

    $ nfct helper list
    nfct v1.4.4: netlink error: Operation not permitted
    $ vpnns -- nfct helper list
    {
            .name = ftp,
            .queuenum = 0,
            .l3protonum = 2,
            .l4protonum = 6,
            .priv_data_len = 24,
            .status = enabled,
    };

Add capable() checks in nfnetlink_cthelper, as this is cleaner than
trying to generalize the solution.

Signed-off-by: Kevin Cernekee <email address hidden>
Signed-off-by: Pablo Neira Ayuso <email address hidden>

CVE-2017-17448
(cherry picked from commit 4b380c42f7d00a395feede754f0bc2292eebe6e5)
Signed-off-by: Kleber Sacilotto de Souza <email address hidden>
Acked-by: Marcelo Henrique Cerri <email address hidden>
Acked-by: Seth Forshee <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>

97371fb... by Kamal Mostafa

UBUNTU: [debian] use SRCPKGNAME in linux-headers Depends

Use the SRCPKGNAME macro instead of hardcoded "linux" in the Depends for
linux-headers-PKGVER-ABINUM-FLAVOUR, to provide the correct package name
for derivative kernels with a different SRCPKGNAME.

Ignore: yes

Signed-off-by: Kamal Mostafa <email address hidden>
Acked-by: Marcelo Henrique Cerri <email address hidden>
Acked-by: Khalid Elmously <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>

3a00cb9... by Hans de Goede <email address hidden>

Bluetooth: btusb: Restore QCA Rome suspend/resume fix with a "rewritten" version

BugLink: https://bugs.launchpad.net/bugs/1744712

Commit 7d06d5895c15 ("Revert "Bluetooth: btusb: fix QCA...suspend/resume"")
removed the setting of the BTUSB_RESET_RESUME quirk for QCA Rome devices,
instead favoring adding USB_QUIRK_RESET_RESUME quirks in usb/core/quirks.c.

This was done because the DIY BTUSB_RESET_RESUME reset-resume handling
has several issues (see the original commit message). An added advantage
of moving over to the USB-core reset-resume handling is that it also
disables autosuspend for these devices, which is similarly broken on these.

But there are 2 issues with this approach:
1) It leaves the broken DIY BTUSB_RESET_RESUME code in place for Realtek
   devices.
2) Sofar only 2 of the 10 QCA devices known to the btusb code have been
   added to usb/core/quirks.c and if we fix the Realtek case the same way
   we need to add an additional 14 entries. So in essence we need to
   duplicate a large part of the usb_device_id table in btusb.c in
   usb/core/quirks.c and manually keep them in sync.

This commit instead restores setting a reset-resume quirk for QCA devices
in the btusb.c code, avoiding the duplicate usb_device_id table problem.

This commit avoids the problems with the original DIY BTUSB_RESET_RESUME
code by simply setting the USB_QUIRK_RESET_RESUME quirk directly on the
usb_device.

This commit also moves the BTUSB_REALTEK case over to directly setting the
USB_QUIRK_RESET_RESUME on the usb_device and removes the now unused
BTUSB_RESET_RESUME code.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1514836
Fixes: 7d06d5895c15 ("Revert "Bluetooth: btusb: fix QCA...suspend/resume"")
Cc: <email address hidden>
Cc: Leif Liddy <email address hidden>
Cc: Matthias Kaehlcke <email address hidden>
Cc: Brian Norris <email address hidden>
Cc: Daniel Drake <email address hidden>
Cc: Kai-Heng Feng <email address hidden>
Signed-off-by: Hans de Goede <email address hidden>
Signed-off-by: Marcel Holtmann <email address hidden>
(cherry picked from commit 61f5acea8737d9b717fcc22bb6679924f3c82b98)
Signed-off-by: Kai-Heng Feng <email address hidden>
Acked-by: Seth Forshee <email address hidden>
Acked-by: Po-Hsu Lin <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>

9a9c8ca... by AaronMa

Input: trackpoint - force 3 buttons if 0 button is reported

BugLink: https://bugs.launchpad.net/bugs/1746002

Lenovo introduced trackpoint compatible sticks with minimum PS/2 commands.
They supposed to reply with 0x02, 0x03, or 0x04 in response to the
"Read Extended ID" command, so we would know not to try certain extended
commands. Unfortunately even some trackpoints reporting the original IBM
version (0x01 firmware 0x0e) now respond with incorrect data to the "Get
Extended Buttons" command:

 thinkpad_acpi: ThinkPad BIOS R0DET87W (1.87 ), EC unknown
 thinkpad_acpi: Lenovo ThinkPad E470, model 20H1004SGE

 psmouse serio2: trackpoint: IBM TrackPoint firmware: 0x0e, buttons: 0/0

Since there are no trackpoints without buttons, let's assume the trackpoint
has 3 buttons when we get 0 response to the extended buttons query.

Signed-off-by: Aaron Ma <email address hidden>
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=196253
Cc: <email address hidden>
Signed-off-by: Dmitry Torokhov <email address hidden>
(cherry picked from commit f5d07b9e98022d50720e38aa936fc11c67868ece)
Signed-off-by: Aaron Ma <email address hidden>
Acked-by: Kamal Mostafa <email address hidden>
Acked-by: Hui Wang <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>

0a34efa... by Kai-Heng Feng

r8152: disable RX aggregation on Dell TB16 dock

r8153 on Dell TB15/16 dock corrupts rx packets.

This change is suggested by Realtek. They guess that the XHCI controller
doesn't have enough buffer, and their guesswork is correct, once the RX
aggregation gets disabled, the issue is gone.

ASMedia is currently working on a real sulotion for this issue.

Dell and ODM confirm the bcdDevice and iSerialNumber is unique for TB16.

Note that TB15 has different bcdDevice and iSerialNumber, which are not
unique values. If you still have TB15, please contact Dell to replace it
with TB16.

BugLink: https://bugs.launchpad.net/bugs/1729674
Cc: Mario Limonciello <email address hidden>
Signed-off-by: Kai-Heng Feng <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit 0b1655143df00ac5349f27b765b2ed13a3ac40ca)
Signed-off-by: Kai-Heng Feng <email address hidden>
Acked-by: Seth Forshee <email address hidden>
Acked-by: Khalid Elmously <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>