UBUNTU: SAUCE: overlayfs: Enable user namespace mounts for the "overlay" fstype
User namespace mounts were mistakenly only enabled for the
"overlayfs" fstype and not for the "overlay" fstype. This is a
regression in behavior towards userspace from previous Ubuntu
kernels and breaks some features of LXC.
BugLink: http://bugs.launchpad.net/bugs/1478578 Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Chris J Arges <chris.j.arges@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Andy Whitcroft [Thu, 28 May 2015 09:10:15 +0000 (10:10 +0100)]
UBUNTU: SAUCE: overlayfs: when copying up and reading directories ensure mounter had permissions V2
When copying up files and reading directory contents ensure the mounter has
permissions for the operation over the consituent parts (lower and upper).
Where we are in a namespace this ensures that the mounter (root in that
namespace) has permissions over the files and directories, preventing
exposure of protected files and directory contents.
CVE-2015-1328 Acked-by: Tyler Hicks <tyhicks@canonical.com> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com> Signed-off-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Andy Whitcroft [Mon, 18 May 2015 10:09:52 +0000 (11:09 +0100)]
UBUNTU: SAUCE: overlay: add backwards compatible overlayfs format support V4
Adds a nearly completely compatible overlayfs filesystem type to overlay
fs, allowing it to mount those filesystems. It does still require the
new workdir= arguement to allow them to be writable. This is aimed to
be paired with an overlayfs userspace mount helper.
V2: Fix up rename handling, which was leaving chardev-0 style whiteouts
lying about.
V3: pull up to mainline v4.0.
V4: pull up to mainline v4.2.
Switch to a single tunnel for all mappings, this removes the limitations
on how many mappings each tunnel can handle, and therefore how many Fan
slices each local address may hold.
NOTE: This introduces a new kernel netlink interface which needs updated
iproute2 support.
BugLink: http://bugs.launchpad.net/bugs/1470091 Signed-off-by: Jay Vosburgh <jay.vosburgh@canonical.com> Signed-off-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Conflicts:
include/net/ip_tunnels.h
Ben Hutchings [Wed, 21 Jan 2015 15:24:00 +0000 (09:24 -0600)]
UBUNTU: SAUCE: rtsx_usb_ms: Use msleep_interruptible() in polling loop
BugLink: http://bugs.launchpad.net/bugs/1413149
rtsx_usb_ms creates a task that mostly sleeps, but tasks in
uninterruptible sleep still contribute to the load average (for
bug-compatibility with Unix). A load average of ~1 on a system that
should be idle is somewhat alarming.
Change the sleep to be interruptible, but still ignore signals.
A better fix might be to replace this loop with a delayed work item.
References: https://bugs.debian.org/765717 Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Chris J Arges <chris.j.arges@canonical.com> Acked-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com> Signed-off-by: Andy Whitcroft <apw@canonical.com>
Colin Ian King [Tue, 6 Jan 2015 12:48:57 +0000 (12:48 +0000)]
UBUNTU: SAUCE: drivers/rtc/interface.c: ignore exprired times when enqueing new timers
BugLink: http://bugs.launchpad.net/bugs/1333569
This patch fixes a RTC wakealarm issue, namely, the event fires during
hibernate and is not cleared from the list, causing hwlock to block.
The original fix has been sent to LKML twice [1] but has had no response
and not yet been picked up. Rather than wait for ever for the maintainter
to pick it up, I'm sending it as a fix for Vivid.
[1] https://lkml.org/lkml/2014/9/26/70
Note that the skipped expired timer events get reaped later on, so we
don't bother reaping them in this fix, instead ignoring them is the best
strategy.
The current enqueuing does not trigger an alarm if any expired timers
already exist on the timerqueue. This can occur when a RTC wake alarm
is used to wake a machine out of hibernate and the resumed state has
old expired timers that have not been removed from the timer queue.
This fix skips over any expired timers and triggers an alarm if there
are no pending timers on the timerqueue.
The bug was found running the example RTC timer program from
Documentation/rtc.txt; it runs fine before a hibernate but will block
forever on RTC reads after a resume from a hibernate that is woken
up using a RTC wakealarm.
Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Andy Whitcroft <apw@canonical.com> Acked-by: Chris J Arges <chris.j.arges@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
added a safeguard in the shutdown case. At least while not being
attached it is also possible to trigger a kernel bug by writing into
writeback_running. This change adds the same check before trying to
wake up the thread for that case.
BugLink: http://bugs.launchpad.net/bugs/1357295
(sent upstream and accepted into developer tree but not, yet Linus) Signed-off-by: Stefan Bader <stefan.bader@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Tetsuo Handa [Sat, 29 Mar 2014 06:39:24 +0000 (15:39 +0900)]
UBUNTU: SAUCE: kthread: Do not leave kthread_create() immediately upon SIGKILL.
Commit 786235ee "kthread: make kthread_create() killable" changed to
leave kthread_create() as soon as receiving SIGKILL. But this change
caused boot failures if systemd-udevd worker process received SIGKILL
due to systemd's hardcoded 30 seconds timeout while loading fusion
driver using finit_module() [1].
Linux kernel people think that the systemd's hardcoded timeout is a
systemd bug. But systemd people think that loading of kernel module
needs more than 30 seconds is a kernel module's bug.
Although Linux kernel people are expecting fusion driver module not
to take more than 30 seconds, it will definitely not in time for
trusty kernel. Also, nobody can prove that fusion driver module is
the only case which is affected by commit 786235ee.
Therefore, this patch changes kthread_create() to wait for up to 10
seconds after receiving SIGKILL, unless chosen by the OOM killer,
in order to give the kthreadd a chance to complete the request.
The side effect of this patch is that current thread's response to
SIGKILL is delayed for a bit (likely less than a second, unlikely
10 seconds).
Andy Whitcroft [Wed, 16 Apr 2014 18:40:57 +0000 (19:40 +0100)]
UBUNTU: SAUCE: vt -- maintain bootloader screen mode and content until vt switch
Introduce a new VT mode KD_TRANSPARENT which endevours to leave the current
content of the framebuffer untouched. This allows the bootloader to insert
a graphical splash and have the kernel maintain it until the OS splash
can take over. When we finally switch away (either through programs like
plymouth or manually) the content is lost and the VT reverts to text mode.
Ben Collins [Wed, 6 Jun 2012 03:43:35 +0000 (23:43 -0400)]
UBUNTU: SAUCE: PPC: PCI: Fix pcibios_io_space_offset() so it works for 32-bit ptr/64-bit rsrcs
The commit introducing pcibios_io_space_offset() was ignoring 32-bit to
64-bit sign extention, which is the case on ppc32 with 64-bit resource
addresses. This only seems to have shown up while running under QEMU for
e500mc target. It may or may be suboptimal that QEMU has an IO base
address > 32-bits for the e500-pci implementation, but 1) it's still a
regression and 2) it's more correct to handle things this way.
Joel Fernandes [Thu, 16 Jan 2014 15:19:27 +0000 (16:19 +0100)]
UBUNTU: SAUCE: OMAP: AM33xx: hwmod: Correct AES module SYSC type
Use the newly added sysc type4 for AES module.
Signed-off-by: Joel Fernandes <joelf@ti.com> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Joel Fernandes [Thu, 16 Jan 2014 15:19:26 +0000 (16:19 +0100)]
UBUNTU: SAUCE: ARM: OMAP4: hwmod: Add hwmod data for AES IP
Crypto modules AES0/1 belong to:
PD_L4_PER power domain
CD_L4_SEC clock domain
On the L3, the AES modules are mapped to
L3_CLK2: Peripherals and multimedia sub clock domain
We add hwmod data for the same.
Signed-off-by: Joel Fernandes <joelf@ti.com> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Joel Fernandes [Thu, 16 Jan 2014 15:19:25 +0000 (16:19 +0100)]
UBUNTU: SAUCE: ARM: OMAP: hwmod: Add SYSC offsets for AES IP
The AES IP has the SIDLE offset by 2 and not 3, to allow SIDLE modes
to work for AES, we add a new SYSC type to hwmod.
Signed-off-by: Joel Fernandes <joelf@ti.com> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: tg3: Add support for new 57786 device id.
upstreamed
BugLink: http://bugs.launchpad.net/bugs/1242610 Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Joseph Salisbury [Wed, 15 May 2013 20:49:12 +0000 (16:49 -0400)]
UBUNTU: SAUCE: uvcvideo: quirk PROBE_DEF for Alienware X51 OmniVision webcam
BugLink: http://bugs.launchpad.net/bugs/1180409
OminiVision webcam 0x05a9:0x2643 needs the same UVC_QUIRK_PROBE_DEF as
other OmniVision models to work properly.
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: (no-up) ACPI: Disable Windows 8 compatibility for some Lenovo ThinkPads
The AML implementation for brightness control on several ThinkPads
contains a workaround to meet a Windows 8 requirement of 101 brightness
levels [1]. The implementation is flawed, as only 16 of the brighness
values reported by _BCL affect a change in brightness. _BCM silently
discards the rest of the values. Disabling Windows 8 compatibility on
these machines reverts them to the old behavior, making _BCL only report
the 16 brightness levels which actually work. Add a quirk to do this
along with a dmi callback to disable Win8 compatibility.
BugLink: http://bugs.launchpad.net/bugs/1210848
On an ASUSTek G60JX laptop, the intel_ips driver spams the log with a warning message: "ME failed to update for more than 1s, likely hung". This ME doesn't support the feature, so requesting it be blacklisted for now.
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Tested-by: Nick Jenkins <tech.crew.jenkins@gmail.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: (no-up) trace: add trace events for open(), exec() and uselib() (for v3.7+)
BugLink: http://bugs.launchpad.net/bugs/462111
This patch uses TRACE_EVENT to add tracepoints for the open(),
exec() and uselib() syscalls so that ureadahead can cheaply trace
the boot sequence to determine what to read to speed up the next.
It's not upstream because it will need to be rebased onto the syscall
trace events whenever that gets merged, and is a stop-gap.
[apw@canonical.com: updated for v3.7 and later.]
[apw@canonical.com: updated for v3.19 and later.] BugLink: http://bugs.launchpad.net/bugs/1085766 Signed-off-by: Scott James Remnant <scott@ubuntu.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> Acked-by: Andy Whitcroft <andy.whitcroft@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Conflicts:
fs/open.c
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Xiangliang Yu [Thu, 7 Mar 2013 14:29:16 +0000 (14:29 +0000)]
UBUNTU: SAUCE: (no-up) PCI: fix system hang issue of Marvell SATA host controller
BugLink: http://bugs.launchpad.net/bugs/1159863
Hassle someone if this patch hasn't been removed by 13.10.
See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1159863/comments/2
Fix system hang issue: if first accessed resource file of BAR0 ~
BAR4, system will hang after executing lspci command
Signed-off-by: Kamal Mostafa <kamal@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Instead of SEMI_MT, present a full mt interface with simulated contact
positions for >=3 fingers. Enables e.g. multi-finger tap and drag for
old userspace applications which only count the contact positions.
Signed-off-by: Kamal Mostafa <kamal@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
BugLink: http://bugs.launchpad.net/bugs/1084192
Reverting this in the kernel as opposed to adding a sysctl
to the procps package guarentees that this regression will be
propagated to the Raring LTS kernel.
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
The Myricom GB driver firmware is no longer in use. Furthermore,
CONFIG_MYRI_SBUS is no longer defined.
Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Ben Hutchings <ben@decadent.org.uk> Cc: James Bottomley <JBottomley@Parallels.com> Cc: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Andy Whitcroft [Tue, 3 Apr 2012 10:42:41 +0000 (11:42 +0100)]
UBUNTU: SAUCE: (no-up) elide some ioctl warnings which are known benign
BugLink: http://bugs.launchpad.net/bugs/972355
We have been seeing increasing reports of scarey ioctl messages in
dmesg, such as the below often in bulk:
mdadm: sending ioctl 1261 to a partition!
mdadm: sending ioctl 800c0910 to a partition!
Looking at the upstream discussions these are all benign and can be safely
suppressed. This patch is based on some discussions at the link below,
on some work SUSE did in this area. This is not suitable for upstreaming
as we need some refactoring to fix the 32bit compat ioctl mess.
Chase Douglas [Fri, 24 Feb 2012 23:05:51 +0000 (15:05 -0800)]
UBUNTU: SAUCE: (no-up) Input: synapticss - Set buttonpad property for all clickpads
no-up comments: Keep both, so long as they continue to apply cleanly.
The patches apply only to a couple of old Dell minis, and Dell has said
they don't intend to use those touchpads again. Upstreaming these
patches stalled due to lack of information/response, and continuing to
pursue it probably isn't worth the effort, so they can be marked no-up.
There's no harm in keeping the patches, but if they become a problem
they can be dropped.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Andy Whitcroft <andy.whitcroft@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Chase Douglas [Fri, 24 Feb 2012 23:05:50 +0000 (15:05 -0800)]
UBUNTU: SAUCE: (no-up) Input: synaptics - add second variant of two-button clickpad
This is necessary for clickpad detection of Synaptics trackpads in Dell
Mini 10 series of laptops.
no-up comments: Keep both, so long as they continue to apply cleanly.
The patches apply only to a couple of old Dell minis, and Dell has said
they don't intend to use those touchpads again. Upstreaming these
patches stalled due to lack of information/response, and continuing to
pursue it probably isn't worth the effort, so they can be marked no-up.
There's no harm in keeping the patches, but if they become a problem
they can be dropped.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Andy Whitcroft <andy.whitcroft@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Andy Whitcroft [Fri, 3 Dec 2010 09:51:33 +0000 (09:51 +0000)]
UBUNTU: SAUCE: (no-up) add support for installed header files to ubuntu directory
BugLink: http://bugs.launchpad.net/bugs/684666
We need the aufs headers in the linux-libc-headers, add support for
including files from the ubuntu include directory.
Tim Gardner [Tue, 13 Jul 2010 12:41:16 +0000 (06:41 -0600)]
UBUNTU: SAUCE: (no-up) fix build error with CONFIG_BLK_DEV_INITRD=n
The original aynchronous boot patch (UBUNTU: SAUCE: Make populate_rootfs asynchronous)
did not take into consideration the case when CONFIG_BLK_DEV_INITRD=n,
e.g., populate_rootfs_domain becomes undefined. Therefore, add it to
noinitramfs.c where its use is benign.
Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Original-patch-by: Nicolas Pitre <nicolas.pitre@linaro.org> Cc: Surbhi Palande <surbhi.palande@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Andy Whitcroft [Thu, 11 Mar 2010 10:33:36 +0000 (10:33 +0000)]
UBUNTU: SAUCE: (no-up) cdrom -- default to not locking the tray when in use
BugLink: http://bugs.launchpad.net/bugs/397734
It seems that users are have a high expectation that the eject button
on their CDROM drive will eject the disk regardless of whether it is in
use or not. To this end we are now changing the default LOCK mode for
mounted CDROMS to 0 to allow ejects. This however does not handle the
direct open cases like music and video players. From the launchpad bug
commentary:
So, according to the upstream discussion David Zeuthen recommended
to just not lock CD-ROM trays by default. Kernel/userspace already
handles prematurely removed USB storage devices reasonably, and with
read-only devices like CD-ROMs it is even less of an issue. So we
should just set /proc/sys/dev/cdrom/lock to 0 by default.
Note that we still will have the drive mounted after the eject. There is a
media change uevent generated and this will be used to trigger the unmount
of the drive in udisks. The burner software will also have to be looked
at to ensure they are explicitly locking the drive closed during the burn.
This will all be handled under the bug above.
Signed-off-by: Andy Whitcroft <apw@canonical.com> Acked-by: Tim Gardner <tim.gardner@canonical.com> Acked-by: Colin King <colin.king@canonical.com>
UBUNTU: SAUCE: (no-up) nbd: Change default partitions per device to 15
This was previously changed by using an "options" line in a modprobe.d
file, however that practice is now deprecated. This is because module
names, option names, their values and even their current defaults can
all change inside the kernel and module-init-tools has never been kept
in sync.
In addition, changing the kernel means that the option change will apply
if the module is built in by users or the OEM team.
Bug: #342563
Signed-off-by: Scott James Remnant <scott@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
This was previously changed by using an "options" line in a modprobe.d
file, however that practice is now deprecated. This is because module
names, option names, their values and even their current defaults can
all change inside the kernel and module-init-tools has never been kept
in sync.
In addition, changing the kernel means that the option change will apply
if the module is built in by users or the OEM team.
Signed-off-by: Scott James Remnant <scott@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Fixing two incorrect assignments reported by Intel kbuild test.
dm-raid4-5.c:4501:2: warning: initialization from incompatible
pointer type [enabled by default]
(near initialization for 'raid_target.map')
dm-raid4-5.c:4505:2: warning: initialization from incompatible
pointer type
(near initialization for 'raid_target.status')
Signed-off-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Andy Whitcroft [Thu, 3 Sep 2015 21:44:08 +0000 (22:44 +0100)]
UBUNTU: [Debian] control -- prepare for new kernel-wedge semantics
We have been carrying a nastly little patch for kernel-wedge to cope with
the fact we use control.stub. But it is simpler to just go with the flow
and emit the stub by hand. Do this in such a way we keep a fake
debian/control.stub such that we will work with either Debian or Ubuntu
kernel-wedge.