- 06 Apr, 2016 40 commits
-
-
Tyler Hicks authored
BugLink: https://launchpad.net/bugs/1560583 Check the value of the unprivileged_userns_apparmor_policy sysctl when a namespace root process attempts to read the apparmorfs profiles file. Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Tyler Hicks authored
BugLink: https://launchpad.net/bugs/1560583 Change the apparmorfs profiles file permissions check to better match the old requirements before the apparmorfs permissions were changed to allow profile loads inside of confined, first-level user namespaces. Historically, the profiles file has been readable by the root user and group. A recent change added the requirement that the process have the CAP_MAC_ADMIN capability. This is a problem for confined processes since keeping the 'capability mac_admin,' rule out of the AppArmor profile is often desired. This patch replaces the CAP_MAC_ADMIN requirement with a requirement that the process is root in its user namespace. Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Andy Whitcroft authored
BugLink: http://bugs.launchpad.net/bugs/1561492Signed-off-by: Andy Whitcroft <apw@canonical.com>
-
Tim Gardner authored
BugLink: http://bugs.launchpad.net/bugs/1557690Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Andy Whitcroft authored
BugLink: http://bugs.launchpad.net/bugs/1519814Signed-off-by: Andy Whitcroft <apw@canonical.com>
-
Dimitri John Ledkov authored
Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com> BugLink: http://bugs.launchpad.net/bugs/1519814Signed-off-by: Andy Whitcroft <apw@canonical.com>
-
Dimitri John Ledkov authored
BugLink: http://bugs.launchpad.net/bugs/1561483Signed-off-by: Colin Ian King <colin.king@canonical.com>
-
Andy Whitcroft authored
BugLink: http://bugs.launchpad.net/bugs/1558871Signed-off-by: Andy Whitcroft <apw@canonical.com>
-
Andy Whitcroft authored
BugLink: http://bugs.launchpad.net/bugs/1558871Signed-off-by: Andy Whitcroft <apw@canonical.com>
-
Seth Forshee authored
BugLink: http://bugs.launchpad.net/bugs/1505948 The 'reqs' member of fuse_io_priv serves two purposes. First is to track the number of oustanding async requests to the server and to signal that the io request is completed. The second is to be a reference count on the structure to know when it can be freed. For sync io requests these purposes can be at odds. fuse_direct_IO() wants to block until the request is done, and since the signal is sent when 'reqs' reaches 0 it cannot keep a reference to the object. Yet it needs to use the object after the userspace server has completed processing requests. This leads to some handshaking and special casing that it needlessly complicated and responsible for at least one race condition. It's much cleaner and safer to maintain a separate reference count for the object lifecycle and to let 'reqs' just be a count of outstanding requests to the userspace server. Then we can know for sure when it is safe to free the object without any handshaking or special cases. The catch here is that most of the time these objects are stack allocated and should not be freed. Initializing these objects with a single reference that is never released prevents accidental attempts to free the objects. Fixes: 9d5722b7 ("fuse: handle synchronous iocbs internally") Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> (backported from commit 744742d6 git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git) Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Robert Doebbelin authored
BugLink: http://bugs.launchpad.net/bugs/1505948 There's a race in fuse_direct_IO(), whereby is_sync_kiocb() is called on an iocb that could have been freed if async io has already completed. The fix in this case is simple and obvious: cache the result before starting io. It was discovered by KASan: kernel: ================================================================== kernel: BUG: KASan: use after free in fuse_direct_IO+0xb1a/0xcc0 at addr ffff88036c414390 Signed-off-by: Robert Doebbelin <robert@quobyte.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Fixes: bcba24cc ("fuse: enable asynchronous processing direct IO") Cc: <stable@vger.kernel.org> # 3.10+ (cherry picked from commit 7cabc61e git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git) Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Serge Hallyn authored
BugLink: http://bugs.launchpad.net/bugs/1560489 [ note - this is a version of the patch I just sent to lkml ported to our xenial tree. It's needed for things like docker and lxc to be certain of which cgroup tasks file is their own in certain nesting situations. We currently work around it by blindly assuming that there are no legacy container managers running on cgroup-ns-enabled kernels ] One practical problem I've found with cgroup namespaces is that there is no way to disambiguate between a cgroupfs mount which was done in a cgroup namespace, and a bind mount of a cgroupfs directory. So whether I do unshare --cgroup -- bash -c "mount -t cgroup -o freezer f /mnt; cat /proc/self/mountinfo" or whether I just mount --bind /sys/fs/cgroup/freezer/$(awk -F: '/freezer/ { print $3 }' /proc/self/cgroup) /mnt 'mount root' field (field 3) in /proc/self/mountinfo will show the same thing, the result of awk -F: '/freezer/ { print $3 }' /proc/self/cgroup. This patch adds a 'nsroot=' field to cgroup mountinfo entries, so that userspace can distinguish a mount made in a cgroup namespace from a bind mount from a cgroup subdirectory. Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Tim Gardner authored
BugLink: http://bugs.launchpad.net/bugs/1560445 Remove these files on clean so they do not get included in the source package. Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Tim Gardner authored
The reconstruct script is long enough that it overwhelms any other output from a clean operation (and is largely noise anyway). Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
dann frazier authored
BugLink: http://bugs.launchpad.net/bugs/1549494 This reverts commit c1fab9a6d70a0043bbda8162e89bafab0500324c. Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
dann frazier authored
BugLink: http://bugs.launchpad.net/bugs/1549494 This reverts commit 86b9c76b0c7c5bbdb6196effb2c7ae4f08e11b80. Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
dann frazier authored
BugLink: http://bugs.launchpad.net/bugs/1549494 This reverts commit 45b5c64b98b3ab90332bf7f256a6a1bae60c1527. Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Radha Mohan Chintakuntla authored
BugLink: http://bugs.launchpad.net/bugs/1558828 In case of ARCH_THUNDER, there is a need to allocate the GICv3 ITS table which is bigger than the allowed max order. So we are forcing it only in case of 4KB page size. Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com> Signed-off-by: Robert Richter <rrichter@cavium.com> [ dannf: Depend on ARM64_4K_PAGES instead of !ARM64_64K_PAGES now that 16K pages are available ] Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
dann frazier authored
BugLink: http://bugs.launchpad.net/bugs/1558828 Needed to allocate the GICv3 ITS table on thunder platforms. Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Ching Huang authored
BugLink: http://bugs.launchpad.net/bugs/1559609 Change driver version to v1.30.00.22-20151126 Signed-off-by: Ching Huang <ching2048@areca.com.tw> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> (cherry picked from commit 15d26397) Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Ching Huang authored
BugLink: http://bugs.launchpad.net/bugs/1559609 Split dma resource allocation and io register assignment from get_config to a new function arcmsr_alloc_io_queue. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> (cherry picked from commit 02040670) Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Ching Huang authored
BugLink: http://bugs.launchpad.net/bugs/1559609Signed-off-by: Ching Huang <ching2048@areca.com.tw> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> (cherry picked from commit f75ab39a) Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Ching Huang authored
BugLink: http://bugs.launchpad.net/bugs/1559609 Changes driver version number. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Hannes Reinicke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> (cherry picked from commit d15dd55d) Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Ching Huang authored
BugLink: http://bugs.launchpad.net/bugs/1559609 Support Areca's new PCIe to SATA RAID adapter ARC1203. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Hannes Reinicke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> (cherry picked from commit 7e315ffd) Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Ching Huang authored
BugLink: http://bugs.launchpad.net/bugs/1559609 [mkp: Fixed checkpatch whitespace warning] Signed-off-by: Ching Huang <ching2048@areca.com.tw> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Hannes Reinicke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> (cherry picked from commit d662ad24) Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Ching Huang authored
BugLink: http://bugs.launchpad.net/bugs/1559609 Releasing allocated resource if get configuration data failed. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Hannes Reinicke <hare@suse.de> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> (cherry picked from commit 98f90deb) Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Ching Huang authored
BugLink: http://bugs.launchpad.net/bugs/1559609 Fixed getting wrong configuration data of adapter type B and type D. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Reviewed-by: Hannes Reinicke <hare@suse.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> (cherry picked from commit 251e2d25) Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Stefan Bader authored
BugLink: http://bugs.launchpad.net/bugs/1559692 There have been bugs reported already in the past (but without enough data to pinpoint the problem). This time it was found that a certain Thinkpad external keyboard would not be working from the server install image (but works from a desktop installer). The reason was a missing specific hid driver (hid-lenovo). Since we might miss more than that, I went forward and updated the whole list. I excluded a few drivers which where either force feedback drivers (.*ff.ko, I think we can live without the backlash), joystick drivers and I also not added wacom (because graphic tablets unlikely are useful to complete a server install). Signed-off-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Jan Glauber authored
BugLink: http://bugs.launchpad.net/bugs/1559349 Add a compatible string for the Cavium ThunderX PMU. Signed-off-by: Jan Glauber <jglauber@cavium.com> Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from linux-next commit 94085fe5) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Jan Glauber authored
BugLink: http://bugs.launchpad.net/bugs/1559349 ARMv8.1 increases the PMU event number space to 16 bit so increase the EVTYPE mask. Signed-off-by: Jan Glauber <jglauber@cavium.com> Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from linux-next commit c210ae80) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Jan Glauber authored
BugLink: http://bugs.launchpad.net/bugs/1559349 With the long cycle counter bit (LC) disabled the cycle counter is not working on ThunderX SOC (ThunderX only implements Aarch64). Also, according to documentation LC == 0 is deprecated. To keep the code simple the patch does not introduce 64 bit wide counter functions. Instead writing the cycle counter always sets the upper 32 bits so overflow interrupts are generated as before. Original patch from Andrew Pinksi <Andrew.Pinksi@caviumnetworks.com> Signed-off-by: Jan Glauber <jglauber@cavium.com> Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from linux-next commit 7175f059) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Jan Glauber authored
BugLink: http://bugs.launchpad.net/bugs/1559349 Support PMU events on Caviums ThunderX SOC. ThunderX supports some additional counters compared to the default ARMv8 PMUv3: - branch instructions counter - stall frontend & backend counters - L1 dcache load & store counters - L1 icache counters - iTLB & dTLB counters - L1 dcache & icache prefetch counters Signed-off-by: Jan Glauber <jglauber@cavium.com> [will: capitalisation] Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from linux-next commit d0aa2bff) [dannf: offset adjustments] Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Jan Glauber authored
BugLink: http://bugs.launchpad.net/bugs/1559349 The implemented Cortex A57 events are strictly-speaking not A57 specific. They are ARM recommended implementation defined events and can be found on other ARMv8 SOCs like Cavium ThunderX too. Therefore rename these events to allow using them in other implementations too. Signed-off-by: Jan Glauber <jglauber@cavium.com> [will: capitalisation and ordering] Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from linux-next commit 5f140cce) [dannf: offset adjustments] Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Will Deacon authored
BugLink: http://bugs.launchpad.net/bugs/1559350 It's all very well providing an events directory to userspace that details our events in terms of "event=0xNN", but if we don't define how to encode the "event" field in the perf attr.config, then it's a waste of time. This patch adds a single format entry to describe that the event field occupies the bottom 10 bits of our config field on ARMv8 (PMUv3). Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from commit 57d74123) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Will Deacon authored
BugLink: http://bugs.launchpad.net/bugs/1559350 It's all very well providing an events directory to userspace that details our events in terms of "event=0xNN", but if we don't define how to encode the "event" field in the perf attr.config, then it's a waste of time. This patch adds a single format entry to describe that the event field occupies the bottom 8 bits of our config field on ARMv7. Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from commit abff083c) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Drew Richardson authored
BugLink: http://bugs.launchpad.net/bugs/1559350 Add additional information about the ARM architected hardware events to make counters self describing. This makes the hardware PMUs easier to use as perf list contains possible events instead of users having to refer to documentation like the ARM TRMs. Signed-off-by: Drew Richardson <drew.richardson@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from commit 9e9caa6a) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Drew Richardson authored
BugLink: http://bugs.launchpad.net/bugs/1559350 The enums are not necessary and this allows the event values to be used to construct static strings at compile time. Signed-off-by: Drew Richardson <drew.richardson@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from commit 90381cba) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Drew Richardson authored
BugLink: http://bugs.launchpad.net/bugs/1559350 Add additional information about the ARM architected hardware events to make counters self describing. This makes the hardware PMUs easier to use as perf list contains possible events instead of users having to refer to documentation like the ARM TRMs. Signed-off-by: Drew Richardson <drew.richardson@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from commit 3fbac6cc) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Drew Richardson authored
BugLink: http://bugs.launchpad.net/bugs/1559350 The enums are not necessary and this allows the event values to be used to construct static strings at compile time. Signed-off-by: Drew Richardson <drew.richardson@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from commit f4ab36cb) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-
Mark Rutland authored
BugLink: http://bugs.launchpad.net/bugs/1559350 Nothing outside of drivers/perf/arm_pmu.c should call armpmu_register any more, so it no longer needs to be in include/linux/perf/arm_pmu.h. Additionally, by folding it in to arm_pmu_device_probe we can allow drivers to override struct pmu fields without getting blatted by the armpmu code. This patch folds armpmu_register into arm_pmu_device_probe. The logging to the console is moved to after the PMU is successfully registered with the core perf code. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Suggested-by: Will Deacon <will.deacon@arm.com> Cc: Drew Richardson <drew.richardson@arm.com> Cc: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from commit 86cb273b601488fb02d5706c61a09ee267474aad) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-