]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/log
mirror_ubuntu-artful-kernel.git
7 years agoseccomp: Sysctl to display available actions
Tyler Hicks [Fri, 11 Aug 2017 04:33:52 +0000 (04:33 +0000)]
seccomp: Sysctl to display available actions

This patch creates a read-only sysctl containing an ordered list of
seccomp actions that the kernel supports. The ordering, from left to
right, is the lowest action value (kill) to the highest action value
(allow). Currently, a read of the sysctl file would return "kill trap
errno trace allow". The contents of this sysctl file can be useful for
userspace code as well as the system administrator.

The path to the sysctl is:

  /proc/sys/kernel/seccomp/actions_avail

libseccomp and other userspace code can easily determine which actions
the current kernel supports. The set of actions supported by the current
kernel may be different than the set of action macros found in kernel
headers that were installed where the userspace code was built.

In addition, this sysctl will allow system administrators to know which
actions are supported by the kernel and make it easier to configure
exactly what seccomp logs through the audit subsystem. Support for this
level of logging configuration will come in a future patch.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
(cherry picked from commit 8e5f1ad116df6b0de65eac458d5e7c318d1c05af linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoseccomp: Provide matching filter for introspection
Kees Cook [Wed, 2 Aug 2017 22:00:40 +0000 (15:00 -0700)]
seccomp: Provide matching filter for introspection

Both the upcoming logging improvements and changes to RET_KILL will need
to know which filter a given seccomp return value originated from. In
order to delay logic processing of result until after the seccomp loop,
this adds a single pointer assignment on matches. This will allow both
log and RET_KILL logic to work off the filter rather than doing more
expensive tests inside the time-critical run_filters loop.

Running tight cycles of getpid() with filters attached shows no measurable
difference in speed.

Suggested-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Tyler Hicks <tyhicks@canonical.com>
(cherry picked from commit deb4de8b31bc5bf21efb6ac31150a01a631cd647 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoRevert "UBUNTU: SAUCE: seccomp: log actions even when audit is disabled"
Seth Forshee [Mon, 28 Aug 2017 12:59:01 +0000 (07:59 -0500)]
Revert "UBUNTU: SAUCE: seccomp: log actions even when audit is disabled"

This reverts commit bab4da0031a958c04405765e1e077bdb9dceff0c. Upcoming
changes that improve seccomp logging controls make this patch obsolete.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
7 years agoUBUNTU: Rebase to v4.13-rc7
Seth Forshee [Mon, 28 Aug 2017 12:49:42 +0000 (07:49 -0500)]
UBUNTU: Rebase to v4.13-rc7

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: selftests/powerpc: Use snprintf to construct DSCR sysfs interface...
Seth Forshee [Fri, 25 Aug 2017 19:47:29 +0000 (14:47 -0500)]
UBUNTU: SAUCE: selftests/powerpc: Use snprintf to construct DSCR sysfs interface paths

BugLink: http://bugs.launchpad.net/bugs/1710904
Currently sprintf is used, and while paths should never exceed
the size of the buffer it is theoretically possible since
dirent.d_name is 256 bytes. As a result this trips
-Wformat-overflow, and since the test is built with -Wall -Werror
the causes the build to fail. Switch to using snprintf and skip
any paths which are too long for the filename buffer.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Start new release
Seth Forshee [Fri, 25 Aug 2017 17:01:46 +0000 (12:01 -0500)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Ubuntu-4.13.0-6.7
Seth Forshee [Wed, 23 Aug 2017 13:11:07 +0000 (08:11 -0500)]
UBUNTU: Ubuntu-4.13.0-6.7

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: HID: multitouch: Support ALPS PTP stick with pid 0x120A
Shrirang Bagul [Wed, 23 Aug 2017 07:32:23 +0000 (15:32 +0800)]
UBUNTU: SAUCE: HID: multitouch: Support ALPS PTP stick with pid 0x120A

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

This patch adds ALPS PTP sticks with pid/device id 0x120A to the list of
devices supported by hid-multitouch.

Signed-off-by: Shrirang Bagul <shrirang.bagul@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: apparmor: af_unix mediation
John Johansen [Wed, 19 Jul 2017 06:27:23 +0000 (23:27 -0700)]
UBUNTU: SAUCE: apparmor: af_unix mediation

af_socket mediation did not make it into 4.14 so add remaining out
of tree patch

Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoapparmor: fix incorrect type assignment when freeing proxies
John Johansen [Wed, 16 Aug 2017 16:33:48 +0000 (09:33 -0700)]
apparmor: fix incorrect type assignment when freeing proxies

sparse reports

poisoning the proxy->label before freeing the struct is resulting in
a sparse build warning.
../security/apparmor/label.c:52:30: warning: incorrect type in assignment (different address spaces)
../security/apparmor/label.c:52:30:    expected struct aa_label [noderef] <asn:4>*label
../security/apparmor/label.c:52:30:    got struct aa_label *<noident>

fix with RCU_INIT_POINTER as this is one of those cases where
rcu_assign_pointer() is not needed.

Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 76e22e212a850bbd16cf49f9c586d4635507e0b5 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoapparmor: ensure unconfined profiles have dfas initialized
John Johansen [Wed, 16 Aug 2017 12:48:06 +0000 (05:48 -0700)]
apparmor: ensure unconfined profiles have dfas initialized

Generally unconfined has early bailout tests and does not need the
dfas initialized, however if an early bailout test is ever missed
it will result in an oops.

Be defensive and initialize the unconfined profile to have null dfas
(no permission) so if an early bailout test is missed we fail
closed (no perms granted) instead of oopsing.

Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 034ad2d248927722bdcd1aedb62634cdc2049113 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoapparmor: fix race condition in null profile creation
John Johansen [Wed, 16 Aug 2017 12:40:49 +0000 (05:40 -0700)]
apparmor: fix race condition in null profile creation

There is a race when null- profile is being created between the
initial lookup/creation of the profile and lock/addition of the
profile. This could result in multiple version of a profile being
added to the list which need to be removed/replaced.

Since these are learning profile their is no affect on mediation.

Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 3aa3de2a4fb8f33ec62b00998bc6b6c6850d41b1 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoapparmor: move new_null_profile to after profile lookup fns()
John Johansen [Wed, 16 Aug 2017 15:59:57 +0000 (08:59 -0700)]
apparmor: move new_null_profile to after profile lookup fns()

new_null_profile will need to use some of the profile lookup fns()
so move instead of doing forward fn declarations.

Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit cf1e50dfc6f627bc2989b57076b129c330fb3f0a linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoapparmor: add base infastructure for socket mediation
John Johansen [Wed, 19 Jul 2017 06:18:33 +0000 (23:18 -0700)]
apparmor: add base infastructure for socket mediation

Provide a basic mediation of sockets. This is not a full net mediation
but just whether a spcific family of socket can be used by an
application, along with setting up some basic infrastructure for
network mediation to follow.

the user space rule hav the basic form of
  NETWORK RULE = [ QUALIFIERS ] 'network' [ DOMAIN ]
                 [ TYPE | PROTOCOL ]

  DOMAIN = ( 'inet' | 'ax25' | 'ipx' | 'appletalk' | 'netrom' |
             'bridge' | 'atmpvc' | 'x25' | 'inet6' | 'rose' |
     'netbeui' | 'security' | 'key' | 'packet' | 'ash' |
     'econet' | 'atmsvc' | 'sna' | 'irda' | 'pppox' |
     'wanpipe' | 'bluetooth' | 'netlink' | 'unix' | 'rds' |
     'llc' | 'can' | 'tipc' | 'iucv' | 'rxrpc' | 'isdn' |
     'phonet' | 'ieee802154' | 'caif' | 'alg' | 'nfc' |
     'vsock' | 'mpls' | 'ib' | 'kcm' ) ','

  TYPE = ( 'stream' | 'dgram' | 'seqpacket' |  'rdm' | 'raw' |
           'packet' )

  PROTOCOL = ( 'tcp' | 'udp' | 'icmp' )

eg.
  network,
  network inet,

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
(cherry picked from commit 56387cbe3f287034ee6959cb9e8f419889e38bd9 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoapparmor: add more debug asserts to apparmorfs
John Johansen [Wed, 19 Jul 2017 06:41:13 +0000 (23:41 -0700)]
apparmor: add more debug asserts to apparmorfs

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
(cherry picked from commit 52c9542126fb04df1f12c605b6c22719c9096794 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoapparmor: make policy_unpack able to audit different info messages
John Johansen [Wed, 19 Jul 2017 06:37:18 +0000 (23:37 -0700)]
apparmor: make policy_unpack able to audit different info messages

Switch unpack auditing to using the generic name field in the audit
struct and make it so we can start adding new info messages about
why an unpack failed.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
(cherry picked from commit 1489d896c5649e9ce1b6000b4857f8baa7a6ab63 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoapparmor: add support for absolute root view based labels
John Johansen [Sun, 6 Aug 2017 12:39:08 +0000 (05:39 -0700)]
apparmor: add support for absolute root view based labels

With apparmor policy virtualization based on policy namespace View's
we don't generally want/need absolute root based views, however there
are cases like debugging and some secid based conversions where
using a root based view is important.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
(cherry picked from commit eadfbf0898eda94cee0d982626aa24a3146db48b linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoapparmor: cleanup conditional check for label in label_print
John Johansen [Sun, 6 Aug 2017 12:36:40 +0000 (05:36 -0700)]
apparmor: cleanup conditional check for label in label_print

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
(cherry picked from commit 7e57939b9d67dcfc2c8348fd0e2c76a2f0349c75 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoapparmor: add mount mediation
John Johansen [Wed, 19 Jul 2017 06:04:47 +0000 (23:04 -0700)]
apparmor: add mount mediation

Add basic mount mediation. That allows controlling based on basic
mount parameters. It does not include special mount parameters for
apparmor, super block labeling, or any triggers for apparmor namespace
parameter modifications on pivot root.

default userspace policy rules have the form of
  MOUNT RULE = ( MOUNT | REMOUNT | UMOUNT )

  MOUNT = [ QUALIFIERS ] 'mount' [ MOUNT CONDITIONS ] [ SOURCE FILEGLOB ]
          [ '->' MOUNTPOINT FILEGLOB ]

  REMOUNT = [ QUALIFIERS ] 'remount' [ MOUNT CONDITIONS ]
            MOUNTPOINT FILEGLOB

  UMOUNT = [ QUALIFIERS ] 'umount' [ MOUNT CONDITIONS ] MOUNTPOINT FILEGLOB

  MOUNT CONDITIONS = [ ( 'fstype' | 'vfstype' ) ( '=' | 'in' )
                       MOUNT FSTYPE EXPRESSION ]
       [ 'options' ( '=' | 'in' ) MOUNT FLAGS EXPRESSION ]

  MOUNT FSTYPE EXPRESSION = ( MOUNT FSTYPE LIST | MOUNT EXPRESSION )

  MOUNT FSTYPE LIST = Comma separated list of valid filesystem and
                      virtual filesystem types (eg ext4, debugfs, etc)

  MOUNT FLAGS EXPRESSION = ( MOUNT FLAGS LIST | MOUNT EXPRESSION )

  MOUNT FLAGS LIST = Comma separated list of MOUNT FLAGS.

  MOUNT FLAGS = ( 'ro' | 'rw' | 'nosuid' | 'suid' | 'nodev' | 'dev' |
                  'noexec' | 'exec' | 'sync' | 'async' | 'remount' |
  'mand' | 'nomand' | 'dirsync' | 'noatime' | 'atime' |
  'nodiratime' | 'diratime' | 'bind' | 'rbind' | 'move' |
  'verbose' | 'silent' | 'loud' | 'acl' | 'noacl' |
  'unbindable' | 'runbindable' | 'private' | 'rprivate' |
  'slave' | 'rslave' | 'shared' | 'rshared' |
  'relatime' | 'norelatime' | 'iversion' | 'noiversion' |
  'strictatime' | 'nouser' | 'user' )

  MOUNT EXPRESSION = ( ALPHANUMERIC | AARE ) ...

  PIVOT ROOT RULE = [ QUALIFIERS ] pivot_root [ oldroot=OLD PUT FILEGLOB ]
                    [ NEW ROOT FILEGLOB ]

  SOURCE FILEGLOB = FILEGLOB

  MOUNTPOINT FILEGLOB = FILEGLOB

eg.
  mount,
  mount /dev/foo,
  mount options=ro /dev/foo -> /mnt/,
  mount options in (ro,atime) /dev/foo -> /mnt/,
  mount options=ro options=atime,

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
(cherry picked from commit fa488437d0f95b2e5db1e624341fe0d5a233f729 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoapparmor: add the ability to mediate signals
John Johansen [Wed, 19 Jul 2017 05:56:22 +0000 (22:56 -0700)]
apparmor: add the ability to mediate signals

Add signal mediation where the signal can be mediated based on the
signal, direction, or the label or the peer/target. The signal perms
are verified on a cross check to ensure policy consistency in the case
of incremental policy load/replacement.

The optimization of skipping the cross check when policy is guaranteed
to be consistent (single compile unit) remains to be done.

policy rules have the form of
  SIGNAL_RULE = [ QUALIFIERS ] 'signal' [ SIGNAL ACCESS PERMISSIONS ]
                [ SIGNAL SET ] [ SIGNAL PEER ]

  SIGNAL ACCESS PERMISSIONS = SIGNAL ACCESS | SIGNAL ACCESS LIST

  SIGNAL ACCESS LIST = '(' Comma or space separated list of SIGNAL
                           ACCESS ')'

  SIGNAL ACCESS = ( 'r' | 'w' | 'rw' | 'read' | 'write' | 'send' |
                    'receive' )

  SIGNAL SET = 'set' '=' '(' SIGNAL LIST ')'

  SIGNAL LIST = Comma or space separated list of SIGNALS

  SIGNALS = ( 'hup' | 'int' | 'quit' | 'ill' | 'trap' | 'abrt' |
              'bus' | 'fpe' | 'kill' | 'usr1' | 'segv' | 'usr2' |
      'pipe' | 'alrm' | 'term' | 'stkflt' | 'chld' | 'cont' |
      'stop' | 'stp' | 'ttin' | 'ttou' | 'urg' | 'xcpu' |
      'xfsz' | 'vtalrm' | 'prof' | 'winch' | 'io' | 'pwr' |
      'sys' | 'emt' | 'exists' | 'rtmin+0' ... 'rtmin+32'
            )

  SIGNAL PEER = 'peer' '=' AARE

eg.
  signal,                                 # allow all signals
  signal send set=(hup, kill) peer=foo,

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
(cherry picked from commit c6bf1adaecaa719d7c56338cc43b2982214f2f44 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoapparmor: Redundant condition: prev_ns. in [label.c:1498]
John Johansen [Tue, 1 Aug 2017 06:44:37 +0000 (23:44 -0700)]
apparmor: Redundant condition: prev_ns. in [label.c:1498]

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit d323d2c17cfcc54b6845bfc1d13bca5cef210fc7 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoapparmor: Fix an error code in aafs_create()
Dan Carpenter [Thu, 13 Jul 2017 07:39:20 +0000 (10:39 +0300)]
apparmor: Fix an error code in aafs_create()

We accidentally forgot to set the error code on this path.  It means we
return NULL instead of an error pointer.  I looked through a bunch of
callers and I don't think it really causes a big issue, but the
documentation says we're supposed to return error pointers here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit aee58bf341db52a3a3563c6b972bfd4fc2d41e46 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoapparmor: Fix logical error in verify_header()
Christos Gkekas [Sat, 8 Jul 2017 19:50:21 +0000 (20:50 +0100)]
apparmor: Fix logical error in verify_header()

verify_header() is currently checking whether interface version is less
than 5 *and* greater than 7, which always evaluates to false. Instead it
should check whether it is less than 5 *or* greater than 7.

Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit c54a2175e3a6bf6c697d249bba1aa729e06c7ba8 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoapparmor: Fix shadowed local variable in unpack_trans_table()
Geert Uytterhoeven [Thu, 6 Jul 2017 08:56:21 +0000 (10:56 +0200)]
apparmor: Fix shadowed local variable in unpack_trans_table()

with W=2:

    security/apparmor/policy_unpack.c: In function ‘unpack_trans_table’:
    security/apparmor/policy_unpack.c:469: warning: declaration of ‘pos’ shadows a previous local
    security/apparmor/policy_unpack.c:451: warning: shadowed declaration is here

Rename the old "pos" to "saved_pos" to fix this.

Fixes: 5379a3312024a8be ("apparmor: support v7 transition format compatible with label_parse")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 966d631935a578fadb5770f17a957ee1a969d868 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: [Packaging] sort ABI files with C.UTF-8 locale
Thadeu Lima de Souza Cascardo [Tue, 22 Aug 2017 14:15:47 +0000 (11:15 -0300)]
UBUNTU: [Packaging] sort ABI files with C.UTF-8 locale

BugLink: https://bugs.launchpad.net/bugs/1712345
Whenever we update the ABI files, the files may be sorted in a different
order, even though their contents are the same. That happens because the
system updating the ABI files may use a different locale than the one
that was used previously.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Acked-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
Acked-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: igb: add support for using Broadcom 54616 as PHY
Wen-chien Jesse Sung [Mon, 21 Aug 2017 09:11:20 +0000 (17:11 +0800)]
UBUNTU: SAUCE: igb: add support for using Broadcom 54616 as PHY

BugLink: https://launchpad.net/bugs/1712024
Ported from packages/base/any/kernels/3.18.25/patches/driver-support-intel-igb-bcm54616-phy.patch
in OpenNetworkLinux https://github.com/opencomputeproject/OpenNetworkLinux/

Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-By: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agopowerpc/mm/radix: Avoid flushing the PWC on every flush_tlb_range
Benjamin Herrenschmidt [Wed, 19 Jul 2017 04:49:06 +0000 (14:49 +1000)]
powerpc/mm/radix: Avoid flushing the PWC on every flush_tlb_range

BugLink: http://bugs.launchpad.net/bugs/1709220
We do that because it's used by THP pmd collapsing, so use
instead a dedicated flush function.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit 424de9c6e3f89399fc11afc1f53f89c5329132da)
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agopowerpc/mm/radix: Improve TLB/PWC flushes
Benjamin Herrenschmidt [Wed, 19 Jul 2017 04:49:05 +0000 (14:49 +1000)]
powerpc/mm/radix: Improve TLB/PWC flushes

BugLink: http://bugs.launchpad.net/bugs/1709220
At the moment we have to rather sub-optimal flushing behaviours:

 - flush_tlb_mm() will flush the PWC which is unnecessary (for example
   when doing a fork)

 - A large unmap will call flush_tlb_pwc() multiple times causing us
   to perform that fairly expensive operation repeatedly. This happens
   often in batches of 3 on every new process.

So we change flush_tlb_mm() to only flush the TLB, and we use the
existing "need_flush_all" flag in struct mmu_gather to indicate
that the PWC needs flushing.

Unfortunately, flush_tlb_range() still needs to do a full flush
for now as it's used by the THP collapsing. We will fix that later.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit a46cc7a90fd8d95bfbb2b27080efe872a1a51db4)
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agopowerpc/mm/radix: Improve _tlbiel_pid to be usable for PWC flushes
Benjamin Herrenschmidt [Wed, 19 Jul 2017 04:49:04 +0000 (14:49 +1000)]
powerpc/mm/radix: Improve _tlbiel_pid to be usable for PWC flushes

BugLink: http://bugs.launchpad.net/bugs/1709220
The PWC flush only needs a single set call, just like the
full (RIC=2) flush.

This will allow us to get rid of the dedicated _tlbiel_pwc()

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit 5ce5fe14ed0302315061cf97ce67accd1b25b938)
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Rebase to v4.13-rc6
Seth Forshee [Wed, 23 Aug 2017 11:58:55 +0000 (06:58 -0500)]
UBUNTU: Rebase to v4.13-rc6

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (efi-lockdown) MODSIGN: Fix module signature verification
Fedora Kernel Team [Thu, 3 Aug 2017 18:46:51 +0000 (13:46 -0500)]
UBUNTU: SAUCE: (efi-lockdown) MODSIGN: Fix module signature verification

BugLink: http://bugs.launchpad.net/bugs/1712168
Currently mod_verify_sig() calls verify_pkcs_7_signature() with
trusted_keys=NULL, which causes only the builtin keys to be used
to verify the signature. This breaks self-signing of modules with
a MOK, as the MOK is loaded into the secondary trusted keyring.
Fix this by passing the spacial value trusted_keys=(void *)1UL,
which tells verify_pkcs_7_signature() to use the secondary
keyring instead.

(cherry picked from commit cff4523d65b848f9c41c9e998a735ae2a820da2d
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
[ saf: Taken from fedora commit without authorship information or much
  of a commit message; modified so that commit will describe the
  problem being fixed. ]
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: [Config] CONFIG_BLK_DEV_NVME=m for s390
Seth Forshee [Fri, 18 Aug 2017 13:12:49 +0000 (08:12 -0500)]
UBUNTU: [Config] CONFIG_BLK_DEV_NVME=m for s390

BugLink: http://bugs.launchpad.net/bugs/1708432
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: [Config] CONFIG_INTEL_ATOMISP=n
Seth Forshee [Thu, 17 Aug 2017 12:40:27 +0000 (07:40 -0500)]
UBUNTU: [Config] CONFIG_INTEL_ATOMISP=n

BugLink: http://bugs.launchpad.net/bugs/1711298
This is a staging driver which is causing a panic in xen pv
guests. The driver makes no sense for xen, but it can only be
configured as built-in and unconditionally registers a platform
device. Disable this driver until it is in better shape.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Start new release
Seth Forshee [Wed, 16 Aug 2017 13:10:26 +0000 (08:10 -0500)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Ubuntu-4.13.0-5.6
Seth Forshee [Tue, 15 Aug 2017 14:24:31 +0000 (09:24 -0500)]
UBUNTU: Ubuntu-4.13.0-5.6

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: [Packaging] switch up to debhelper 9
Andy Whitcroft [Sun, 6 Aug 2017 14:00:25 +0000 (15:00 +0100)]
UBUNTU: [Packaging] switch up to debhelper 9

Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: SAUCE: perf vendor events powerpc: Update POWER9 events
Sukadev Bhattiprolu [Thu, 27 Jul 2017 06:23:57 +0000 (02:23 -0400)]
UBUNTU: SAUCE: perf vendor events powerpc: Update POWER9 events

BugLink: http://bugs.launchpad.net/bugs/1708630
Update and cleanup POWER9 PMU events.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Anton Blanchard <anton@au1.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Link: http://lkml.kernel.org/r/20170802174617.GA32545@us.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
(cherry picked from commit 3c22ba5243040c13f9a79e3ae70399c0ae0872a4
 git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: perf vendor events powerpc: remove suffix in mapfile
Sukadev Bhattiprolu [Thu, 27 Jul 2017 05:42:29 +0000 (01:42 -0400)]
UBUNTU: SAUCE: perf vendor events powerpc: remove suffix in mapfile

BugLink: http://bugs.launchpad.net/bugs/1708630
Drop the .json suffix for events directory in the mapfile.csv.

Now that we have separate JSON files for each topic in a CPU (eg: see
tools/perf/pmu-events/arch/powerpc/power8/*.json) the .json suffix in
the mapfile is misleading and redundant.

Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Anton Blanchard <anton@au1.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20170802174617.GA32545@us.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
(cherry picked from commit 2862a16875452b697c65d8e06cc010c922d19171
 git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoperf vendor events: Add POWER9 PVRs to mapfile
Sukadev Bhattiprolu [Tue, 11 Jul 2017 18:00:31 +0000 (13:00 -0500)]
perf vendor events: Add POWER9 PVRs to mapfile

BugLink: http://bugs.launchpad.net/bugs/1708630
Add currently supported POWER9 PVRs to the mapfile

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Shriya <shriyak@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-k1pe02sn5gh6nrzp8ditye94@git.kernel.org
[ Fix conflict with a87006fd5629 ("perf pmu-events: Support additional POWER8+ PVR in mapfile") ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
(cherry picked from commit 80e63ffb09a1b7ac645e9dd1c16b7b08956a7f5b linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoperf vendor events: Add POWER9 PMU events
Sukadev Bhattiprolu [Tue, 11 Jul 2017 21:16:00 +0000 (17:16 -0400)]
perf vendor events: Add POWER9 PMU events

BugLink: http://bugs.launchpad.net/bugs/1708630
Add POWER9 PMU events.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Link: http://lkml.kernel.org/n/tip-i08irl1x1i914xsikiomvqip@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
(cherry picked from commit 826db0f154ba5bee7d913635644a6f61f993a9b3 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoperf pmu-events: Support additional POWER8+ PVR in mapfile
Shriya [Mon, 19 Jun 2017 06:30:42 +0000 (12:00 +0530)]
perf pmu-events: Support additional POWER8+ PVR in mapfile

BugLink: http://bugs.launchpad.net/bugs/1708630
Add support for POWER8+ PVR 004c0100 for Garrison

Signed-off-by: Shriya <shriyak@linux.vnet.ibm.com>
Reviewed-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/1497853842-11023-1-git-send-email-shriyak@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
(cherry picked from commit 8b3cf3d812140dada8e82650c96d3980e5cd1b73 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: [Config] CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=n for ppc64el
Seth Forshee [Mon, 14 Aug 2017 20:49:27 +0000 (15:49 -0500)]
UBUNTU: [Config] CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=n for ppc64el

BugLink: http://bugs.launchpad.net/bugs/1709171
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Rebase to v4.13-rc5
Seth Forshee [Mon, 14 Aug 2017 14:18:45 +0000 (09:18 -0500)]
UBUNTU: Rebase to v4.13-rc5

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: [Debian] Don't depend on initramfs-tools
Marcelo Henrique Cerri [Tue, 8 Aug 2017 19:16:05 +0000 (16:16 -0300)]
UBUNTU: [Debian] Don't depend on initramfs-tools

BugLink: http://bugs.launchpad.net/bugs/1700972
Allow images to be created without the need of an initrd and also allow
users to run without an initrd if they want to.

Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: powerpc: Always initialize input array when calling epapr_hypercall()
Seth Forshee [Thu, 10 Aug 2017 17:07:04 +0000 (12:07 -0500)]
UBUNTU: SAUCE: powerpc: Always initialize input array when calling epapr_hypercall()

Several callers to epapr_hypercall() pass an uninitialized stack
allocated array for the input arguments, presumably because they
have no input arguments. However this can produce errors like
this one

 arch/powerpc/include/asm/epapr_hcalls.h:470:42: error: 'in' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  unsigned long register r3 asm("r3") = in[0];
                                        ~~^~~

Fix callers to this function to always zero-initialize the input
arguments array to prevent this.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Enable zfs build
Seth Forshee [Wed, 9 Aug 2017 20:54:09 +0000 (15:54 -0500)]
UBUNTU: Enable zfs build

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (noup) Update spl to 0.6.5.11-ubuntu1, zfs to 0.6.5.11-1ubuntu3
Colin Ian King [Wed, 9 Aug 2017 16:16:31 +0000 (17:16 +0100)]
UBUNTU: SAUCE: (noup) Update spl to 0.6.5.11-ubuntu1, zfs to 0.6.5.11-1ubuntu3

This includes backports of upstream 4.13 compat fixes from ZFS and SPL

SPL:
  120faefed90a ("Update struct member intializers to C89")
  944117514d2a ("Linux 4.13 compat: wait queues")

ZFS:
  36ba27e9e07b ("Linux 4.13 compat: bio->bi_status and blk_status_t")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: [Config] Enable aufs
Seth Forshee [Tue, 8 Aug 2017 18:38:49 +0000 (13:38 -0500)]
UBUNTU: [Config] Enable aufs

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: aufs -- Add missing argument to loop_switch() call
Seth Forshee [Tue, 8 Aug 2017 19:26:51 +0000 (14:26 -0500)]
UBUNTU: SAUCE: aufs -- Add missing argument to loop_switch() call

The aufs patches add an argument to loop_switch(), but an
additional call to this function was added since the patches were
last updated. This causes a FTBFS:

  drivers/block/loop.c: In function 'loop_flush':
  drivers/block/loop.c:624:9: error: too few arguments to function 'loop_switch'
    return loop_switch(lo, NULL);
           ^~~~~~~~~~~
  drivers/block/loop.c:596:12: note: declared here
   static int loop_switch(struct loop_device *lo, struct file *file,
              ^~~~~~~~~~~

This new call is meant only to induce a flush of queued bios and
does not use the file arguments at all, so just pass NULL.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: Import aufs driver
Seth Forshee [Tue, 8 Aug 2017 18:32:30 +0000 (13:32 -0500)]
UBUNTU: SAUCE: Import aufs driver

Import aufs4.x-rcN 20170703 from https://github.com/sfjro/aufs4-standalone
commit aa7bfb3653b447154d5bb2ad89832c4617fd8d63.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Start new release
Seth Forshee [Tue, 8 Aug 2017 18:29:50 +0000 (13:29 -0500)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Ubuntu-4.13.0-4.5
Seth Forshee [Tue, 8 Aug 2017 16:32:02 +0000 (11:32 -0500)]
UBUNTU: Ubuntu-4.13.0-4.5

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: [debian] use all rather than amd64 dkms debs for sync
Colin Ian King [Mon, 7 Aug 2017 14:19:19 +0000 (15:19 +0100)]
UBUNTU: [debian] use all rather than amd64 dkms debs for sync

Use the all arch deb rather than amd64 for the zfs and spl
dkms deb sync

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (noup) Update spl to 0.6.5.11-1, zfs to 0.6.5.11-1ubuntu1
Colin Ian King [Mon, 7 Aug 2017 14:15:35 +0000 (15:15 +0100)]
UBUNTU: SAUCE: (noup) Update spl to 0.6.5.11-1, zfs to 0.6.5.11-1ubuntu1

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Rebase to v4.13-rc4
Seth Forshee [Mon, 7 Aug 2017 13:08:16 +0000 (08:08 -0500)]
UBUNTU: Rebase to v4.13-rc4

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (no-up) HID: Add quirk for Lenovo Yoga 910 with ITE Chips
Patrick Pedersen [Sat, 15 Jul 2017 12:27:21 +0000 (14:27 +0200)]
UBUNTU: SAUCE: (no-up) HID: Add quirk for Lenovo Yoga 910 with ITE Chips

BugLink: http://bugs.launchpad.net/bugs/1708120
As with previous generations of this device (see https://patchwork.kernel.org/patch/7887361/), the ITE
HID Sensor Hub, responsible for the accelerometer and als sensor, requires a quirk entry.

Without the entry, the Sensor Hub can't be accessed and the kernel fails to report any movements. As a result
iio-sensor-proxy receives no new data.

It shall additionally be noted that the i2c-hid 'sleep' bug (present since kernel ver. 4.3)
still affects the driver. This means that the sensor hub will not report any movement, until
the device is suspended and resumed.

Signed-off-by: Patrick Pedersen <ctx.xda@gmail.com>
Signed-off-by: Chris MacNaughton <chris.macnaughton@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Enable hio build
Seth Forshee [Wed, 2 Aug 2017 16:08:19 +0000 (11:08 -0500)]
UBUNTU: Enable hio build

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: hio: Build fixes for 4.13
Seth Forshee [Wed, 2 Aug 2017 16:07:51 +0000 (11:07 -0500)]
UBUNTU: SAUCE: hio: Build fixes for 4.13

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: [Config] Add vmd driver to generic inclusion list
Seth Forshee [Wed, 2 Aug 2017 14:13:06 +0000 (09:13 -0500)]
UBUNTU: [Config] Add vmd driver to generic inclusion list

BugLink: http://bugs.launchpad.net/bugs/1703339
Necessary to install on NVMe disks under VMD PCI domains.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: [Config] CONFIG_SATA_HIGHBANK=y
Seth Forshee [Wed, 2 Aug 2017 14:43:28 +0000 (09:43 -0500)]
UBUNTU: [Config] CONFIG_SATA_HIGHBANK=y

BugLink: http://bugs.launchpad.net/bugs/1703430
This changed from y to m after trusty without justification.
Having it built as a module causes issues with booting on some
ARM systems.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: ubuntu: vbox -- update to 5.1.26-dfsg-1
Seth Forshee [Wed, 2 Aug 2017 13:25:33 +0000 (08:25 -0500)]
UBUNTU: ubuntu: vbox -- update to 5.1.26-dfsg-1

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Start new release
Seth Forshee [Mon, 7 Aug 2017 13:03:30 +0000 (08:03 -0500)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Ubuntu-4.13.0-3.4
Seth Forshee [Mon, 31 Jul 2017 15:09:25 +0000 (10:09 -0500)]
UBUNTU: Ubuntu-4.13.0-3.4

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Rebase to v4.13-rc3
Seth Forshee [Mon, 31 Jul 2017 12:52:07 +0000 (07:52 -0500)]
UBUNTU: Rebase to v4.13-rc3

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: [Packaging] tests -- reduce rebuild test to one flavour -- use filter
Andy Whitcroft [Fri, 28 Jul 2017 07:32:48 +0000 (08:32 +0100)]
UBUNTU: [Packaging] tests -- reduce rebuild test to one flavour -- use filter

BugLink: http://bugs.launchpad.net/bugs/1705495
Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [Packaging] tests -- reduce rebuild test to one flavour
Andy Whitcroft [Fri, 21 Jul 2017 15:13:15 +0000 (16:13 +0100)]
UBUNTU: [Packaging] tests -- reduce rebuild test to one flavour

BugLink: http://bugs.launchpad.net/bugs/1705495
Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: Start new release
Seth Forshee [Mon, 31 Jul 2017 12:46:41 +0000 (07:46 -0500)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Ubuntu-4.13.0-2.3
Seth Forshee [Mon, 24 Jul 2017 18:58:50 +0000 (13:58 -0500)]
UBUNTU: Ubuntu-4.13.0-2.3

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Rebase to v4.13-rc2
Seth Forshee [Mon, 24 Jul 2017 12:35:16 +0000 (07:35 -0500)]
UBUNTU: Rebase to v4.13-rc2

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: [Config] CONFIG_IBMVETH=m
Gustavo Walbon [Tue, 18 Jul 2017 18:04:04 +0000 (15:04 -0300)]
UBUNTU: [Config] CONFIG_IBMVETH=m

BugLink: http://bugs.launchpad.net/bugs/1704479
As Novalink has required a change in config file to change the
IBMVETH to module state instead of built in.

Signed-off-by: Gustavo Walbon <gwalbon@linux.vnet.ibm.com>
Signed-off-by: Breno Leitao <leitao@debian.org>
7 years agoUBUNTU: Start new release
Seth Forshee [Thu, 20 Jul 2017 19:45:47 +0000 (14:45 -0500)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Ubuntu-4.13.0-1.2
Seth Forshee [Thu, 20 Jul 2017 14:20:14 +0000 (09:20 -0500)]
UBUNTU: Ubuntu-4.13.0-1.2

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: [Debian] Support sphinx-based kernel documentation
Seth Forshee [Thu, 20 Jul 2017 03:22:12 +0000 (22:22 -0500)]
UBUNTU: [Debian] Support sphinx-based kernel documentation

The kernel has been transitioning to using sphinx instead of
DocBook for generating documentation. Starting in 4.13 the old
DocBook support has been completely removed, breaking our
linux-doc build. Update the build deps and copy the html docs
from their new location.

We still need to keep the DocBook build dependency for generating
perf manpages.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: [Debian] Run 'silentoldconfig' when not editing a configuration
Seth Forshee [Thu, 25 May 2017 13:15:08 +0000 (08:15 -0500)]
UBUNTU: [Debian] Run 'silentoldconfig' when not editing a configuration

Config options which are '-' for a given flavor may have values
specified in common configuration files. Thus the initial config
file created by concatinating the fragments will have values for
these options which Kconfig will later delete.

However, when 'fdr editconfig' is run and the prompt to edit a
given configuration is declined, Kconfig does not modify the
config and these values remain. If any of these values is
enforced config-check will produce an error. We need to run
'make slientoldconfig' in this case so that the config files
will be accurate.

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Start new release
Seth Forshee [Thu, 20 Jul 2017 14:17:45 +0000 (09:17 -0500)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Ubuntu-4.13.0-0.1
Seth Forshee [Wed, 19 Jul 2017 20:09:47 +0000 (15:09 -0500)]
UBUNTU: Ubuntu-4.13.0-0.1

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: ubuntu: vbox -- update to 5.1.24-dfsg-1
Seth Forshee [Wed, 19 Jul 2017 12:28:59 +0000 (07:28 -0500)]
UBUNTU: ubuntu: vbox -- update to 5.1.24-dfsg-1

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Disable zfs build
Seth Forshee [Tue, 16 May 2017 20:39:42 +0000 (15:39 -0500)]
UBUNTU: Disable zfs build

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Disable hio
Seth Forshee [Tue, 18 Jul 2017 18:31:46 +0000 (13:31 -0500)]
UBUNTU: Disable hio

FTBFS after rebase to 4.13-rc1:

/tmp/kernel-sforshee-fb8075f-U05S/build/ubuntu/hio/hio.c: In function 'ssd_bio_endio':
/tmp/kernel-sforshee-fb8075f-U05S/build/ubuntu/hio/hio.c:2100:5: error: 'struct bio' has no member named 'bi_error'; did you mean 'bi_iter'?
  bio->bi_error = error;
     ^~
/tmp/kernel-sforshee-fb8075f-U05S/build/ubuntu/hio/hio.c: In function 'ssd_make_request':
/tmp/kernel-sforshee-fb8075f-U05S/build/ubuntu/hio/hio.c:8461:2: error: too many arguments to function 'blk_queue_split'
  blk_queue_split(q, &bio, q->bio_split);
  ^~~~~~~~~~~~~~~
In file included from /tmp/kernel-sforshee-fb8075f-U05S/build/ubuntu/hio/hio.c:30:0:
/tmp/kernel-sforshee-fb8075f-U05S/build/include/linux/blkdev.h:958:13: note: declared here
 extern void blk_queue_split(struct request_queue *, struct bio **);
             ^~~~~~~~~~~~~~~

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Rebase to v4.13-rc1
Seth Forshee [Tue, 18 Jul 2017 17:42:31 +0000 (12:42 -0500)]
UBUNTU: Rebase to v4.13-rc1

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Start new release
Seth Forshee [Tue, 18 Jul 2017 18:06:00 +0000 (13:06 -0500)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: Ubuntu-4.12.0-7.8
Tim Gardner [Thu, 24 Jul 2014 13:28:11 +0000 (07:28 -0600)]
UBUNTU: Ubuntu-4.12.0-7.8

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (efi-lockdown) efi: Don't print secure boot state from the efi stub
Seth Forshee [Fri, 2 Jun 2017 18:45:22 +0000 (13:45 -0500)]
UBUNTU: SAUCE: (efi-lockdown) efi: Don't print secure boot state from the efi stub

During boot the efi stub prints what amounts to debugging
messages about the secure boot state to the efi console. which
appear on the screen during boot. The same information is printed
in dmesg while the kernel is booting, so they serve no purpose
aside from debugging issues in the efi stub. Remove them.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (efi-lockdown) efi: Sanitize boot_params in efi stub
Seth Forshee [Thu, 4 May 2017 13:09:04 +0000 (08:09 -0500)]
UBUNTU: SAUCE: (efi-lockdown) efi: Sanitize boot_params in efi stub

The efi stub will set the value of boot_params.secure_boot
without first checking whether boot_params has been sanitized. If
they have not, the value of secure_boot will be cleared later
when boot_params is sanitized. This currently happens with grub
as it currently does not clear the sentinel, and thus the kernel
cannot determine the secure boot state.

Since the efi stub is modifying a field in an area subject to
sanitization, it must first sanitize boot_params if needed. Later
sanitization by the decompressor will do nothing as the sentinel
value will have been cleared.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (efi-lockdown) MODSIGN: Allow the "db" UEFI variable to be suppressed
Josh Boyer [Fri, 5 May 2017 07:21:59 +0000 (08:21 +0100)]
UBUNTU: SAUCE: (efi-lockdown) MODSIGN: Allow the "db" UEFI variable to be suppressed

If a user tells shim to not use the certs/hashes in the UEFI db variable
for verification purposes, shim will set a UEFI variable called
MokIgnoreDB.  Have the uefi import code look for this and ignore the db
variable if it is found.

Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit d88a05741dd4e3ec91690da8a8025f15ca9e37e9
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (efi-lockdown) MODSIGN: Import certificates from UEFI Secure Boot
Josh Boyer [Fri, 5 May 2017 07:21:59 +0000 (08:21 +0100)]
UBUNTU: SAUCE: (efi-lockdown) MODSIGN: Import certificates from UEFI Secure Boot

Secure Boot stores a list of allowed certificates in the 'db' variable.
This imports those certificates into the system trusted keyring.  This
allows for a third party signing certificate to be used in conjunction
with signed modules.  By importing the public certificate into the 'db'
variable, a user can allow a module signed with that certificate to
load.  The shim UEFI bootloader has a similar certificate list stored
in the 'MokListRT' variable.  We import those as well.

Secure Boot also maintains a list of disallowed certificates in the 'dbx'
variable.  We load those certificates into the newly introduced system
blacklist keyring and forbid any module signed with those from loading and
forbid the use within the kernel of any key with a matching hash.

This facility is enabled by setting CONFIG_LOAD_UEFI_KEYS.

Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit dc5fd3fc2faf24eed23ed8317f2315fb49ff6382
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (efi-lockdown) efi: Add an EFI signature blob parser
Dave Howells [Fri, 5 May 2017 07:21:58 +0000 (08:21 +0100)]
UBUNTU: SAUCE: (efi-lockdown) efi: Add an EFI signature blob parser

Add a function to parse an EFI signature blob looking for elements of
interest.  A list is made up of a series of sublists, where all the
elements in a sublist are of the same type, but sublists can be of
different types.

For each sublist encountered, the function pointed to by the
get_handler_for_guid argument is called with the type specifier GUID and
returns either a pointer to a function to handle elements of that type or
NULL if the type is not of interest.

If the sublist is of interest, each element is passed to the handler
function in turn.

Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit cb3666f519f625a709b4a24f5a9307fb9ed4784a
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (efi-lockdown) efi: Add EFI signature data types
Dave Howells [Fri, 5 May 2017 07:21:58 +0000 (08:21 +0100)]
UBUNTU: SAUCE: (efi-lockdown) efi: Add EFI signature data types

Add the data types that are used for containing hashes, keys and
certificates for cryptographic verification along with their corresponding
type GUIDs.

Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit 2e3003b76149804455a19ee319fcf5753b6ecb4a
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (efi-lockdown) KEYS: Allow unrestricted boot-time addition of keys...
David Howells [Fri, 5 May 2017 07:21:56 +0000 (08:21 +0100)]
UBUNTU: SAUCE: (efi-lockdown) KEYS: Allow unrestricted boot-time addition of keys to secondary keyring

Allow keys to be added to the system secondary certificates keyring during
kernel initialisation in an unrestricted fashion.  Such keys are implicitly
trusted and don't have their trust chains checked on link.

This allows keys in the UEFI database to be added in secure boot mode for
the purposes of module signing.

Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit d2123d28abfa79a66af0fa42fcc4fa306bfda0b6
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (efi-lockdown) Lock down TIOCSSERIAL
David Howells [Wed, 7 Dec 2016 10:28:39 +0000 (10:28 +0000)]
UBUNTU: SAUCE: (efi-lockdown) Lock down TIOCSSERIAL

Lock down TIOCSSERIAL as that can be used to change the ioport and irq
settings on a serial port.  This only appears to be an issue for the serial
drivers that use the core serial code.  All other drivers seem to either
ignore attempts to change port/irq or give an error.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit 83bd921f9ac911f2644bdc5abd31dd4d56cfeb4e
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (efi-lockdown) Prohibit PCMCIA CIS storage when the kernel is locked...
David Howells [Fri, 25 Nov 2016 14:37:45 +0000 (14:37 +0000)]
UBUNTU: SAUCE: (efi-lockdown) Prohibit PCMCIA CIS storage when the kernel is locked down

Prohibit replacement of the PCMCIA Card Information Structure when the
kernel is locked down.

Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit 634dc9eb8591baee1d8fbe22066c6dfbe10d988e
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (efi-lockdown) scsi: Lock down the eata driver
David Howells [Tue, 22 Nov 2016 10:10:34 +0000 (10:10 +0000)]
UBUNTU: SAUCE: (efi-lockdown) scsi: Lock down the eata driver

When the kernel is running in secure boot mode, we lock down the kernel to
prevent userspace from modifying the running kernel image.  Whilst this
includes prohibiting access to things like /dev/mem, it must also prevent
access by means of configuring driver modules in such a way as to cause a
device to access or modify the kernel image.

The eata driver takes a single string parameter that contains a slew of
settings, including hardware resource configuration.  Prohibit use of the
parameter if the kernel is locked down.

Suggested-by: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Dario Ballabio <ballabio_dario@emc.com>
cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
cc: "Martin K. Petersen" <martin.petersen@oracle.com>
cc: linux-scsi@vger.kernel.org
(cherry picked from commit 83b96284c638df0320251a0c502d850130095568
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (efi-lockdown) bpf: Restrict kernel image access functions when the...
Lee, Chun-Yi [Wed, 23 Nov 2016 13:52:16 +0000 (13:52 +0000)]
UBUNTU: SAUCE: (efi-lockdown) bpf: Restrict kernel image access functions when the kernel is locked down

There are some bpf functions can be used to read kernel memory:
bpf_probe_read, bpf_probe_write_user and bpf_trace_printk.  These allow
private keys in kernel memory (e.g. the hibernation image signing key) to
be read by an eBPF program.  Prohibit those functions when the kernel is
locked down.

Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit 59e44bdc67df6cdcd4627f2b5b0b4d7e735c23fc
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (efi-lockdown) Enable cold boot attack mitigation
Matthew Garrett [Wed, 23 Nov 2016 13:41:23 +0000 (13:41 +0000)]
UBUNTU: SAUCE: (efi-lockdown) Enable cold boot attack mitigation

(cherry picked from commit 05e930a4e4cd9fdbf99df4b5265a41926b969b35
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (efi-lockdown) acpi: Disable APEI error injection if the kernel is...
Linn Crosetto [Wed, 23 Nov 2016 13:39:41 +0000 (13:39 +0000)]
UBUNTU: SAUCE: (efi-lockdown) acpi: Disable APEI error injection if the kernel is locked down

ACPI provides an error injection mechanism, EINJ, for debugging and testing
the ACPI Platform Error Interface (APEI) and other RAS features.  If
supported by the firmware, ACPI specification 5.0 and later provide for a
way to specify a physical memory address to which to inject the error.

Injecting errors through EINJ can produce errors which to the platform are
indistinguishable from real hardware errors.  This can have undesirable
side-effects, such as causing the platform to mark hardware as needing
replacement.

While it does not provide a method to load unauthenticated privileged code,
the effect of these errors may persist across reboots and affect trust in
the underlying hardware, so disable error injection through EINJ if
the kernel is locked down.

Signed-off-by: Linn Crosetto <linn@hpe.com>
Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit 1f3424cef8e1ac3b770a2b9087a9f7a937d63f00
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (efi-lockdown) acpi: Disable ACPI table override if the kernel is...
Linn Crosetto [Wed, 23 Nov 2016 13:32:27 +0000 (13:32 +0000)]
UBUNTU: SAUCE: (efi-lockdown) acpi: Disable ACPI table override if the kernel is locked down

From the kernel documentation (initrd_table_override.txt):

  If the ACPI_INITRD_TABLE_OVERRIDE compile option is true, it is possible
  to override nearly any ACPI table provided by the BIOS with an
  instrumented, modified one.

When securelevel is set, the kernel should disallow any unauthenticated
changes to kernel space.  ACPI tables contain code invoked by the kernel,
so do not allow ACPI tables to be overridden if the kernel is locked down.

Signed-off-by: Linn Crosetto <linn@hpe.com>
Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit 95c6461495bf8d85daa48d77d29c36852b7b8bab
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (efi-lockdown) acpi: Ignore acpi_rsdp kernel param when the kernel...
Josh Boyer [Tue, 22 Nov 2016 08:46:16 +0000 (08:46 +0000)]
UBUNTU: SAUCE: (efi-lockdown) acpi: Ignore acpi_rsdp kernel param when the kernel has been locked down

This option allows userspace to pass the RSDP address to the kernel, which
makes it possible for a user to circumvent any restrictions imposed on
loading modules.  Ignore the option when the kernel is locked down.

Signed-off-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit 0495804df6187a2a52d2a5a086d3f44a10594272
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (efi-lockdown) ACPI: Limit access to custom_method when the kernel...
Matthew Garrett [Tue, 22 Nov 2016 08:46:16 +0000 (08:46 +0000)]
UBUNTU: SAUCE: (efi-lockdown) ACPI: Limit access to custom_method when the kernel is locked down

custom_method effectively allows arbitrary access to system memory, making
it possible for an attacker to circumvent restrictions on module loading.
Disable it if the kernel is locked down.

Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit 92399e07fe1628f60b39ec541c16b2786234f11a
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (efi-lockdown) asus-wmi: Restrict debugfs interface when the kernel...
Matthew Garrett [Tue, 22 Nov 2016 08:46:16 +0000 (08:46 +0000)]
UBUNTU: SAUCE: (efi-lockdown) asus-wmi: Restrict debugfs interface when the kernel is locked down

We have no way of validating what all of the Asus WMI methods do on a given
machine - and there's a risk that some will allow hardware state to be
manipulated in such a way that arbitrary code can be executed in the
kernel, circumventing module loading restrictions.  Prevent that if the
kernel is locked down.

Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit 37b6f12b0ffcb731a1eab47c552659f64ab2b312
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
7 years agoUBUNTU: SAUCE: (efi-lockdown) x86: Restrict MSR access when the kernel is locked...
Matthew Garrett [Tue, 22 Nov 2016 08:46:17 +0000 (08:46 +0000)]
UBUNTU: SAUCE: (efi-lockdown) x86: Restrict MSR access when the kernel is locked down

Writing to MSRs should not be allowed if the kernel is locked down, since
it could lead to execution of arbitrary code in kernel mode.  Based on a
patch by Kees Cook.

Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit 02704579cfdfb2e63401172a421ea373d53007a3
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>