Skip to content
Snippets Groups Projects
  1. May 01, 2019
  2. Apr 29, 2019
  3. Apr 26, 2019
  4. Apr 25, 2019
  5. Apr 22, 2019
    • Dave Young's avatar
      x86/kdump: Fall back to reserve high crashkernel memory · b9ac3849
      Dave Young authored
      
      crashkernel=xM tries to reserve memory for the crash kernel under 4G,
      which is enough, usually. But this could fail sometimes, for example
      when one tries to reserve a big chunk like 2G, for example.
      
      So let the crashkernel=xM just fall back to use high memory in case it
      fails to find a suitable low range. Do not set the ,high as default
      because it allocates extra low memory for DMA buffers and swiotlb, and
      this is not always necessary for all machines.
      
      Typically, crashkernel=128M usually works with low reservation under 4G,
      so keep <4G as default.
      
       [ bp: Massage. ]
      
      Signed-off-by: default avatarDave Young <dyoung@redhat.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Reviewed-by: default avatarIngo Molnar <mingo@kernel.org>
      Acked-by: default avatarBaoquan He <bhe@redhat.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Eric Biederman <ebiederm@xmission.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: linux-doc@vger.kernel.org
      Cc: "Paul E. McKenney" <paulmck@linux.ibm.com>
      Cc: Petr Tesarik <ptesarik@suse.cz>
      Cc: piliu@redhat.com
      Cc: Ram Pai <linuxram@us.ibm.com>
      Cc: Sinan Kaya <okaya@codeaurora.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Thymo van Beers <thymovanbeers@gmail.com>
      Cc: vgoyal@redhat.com
      Cc: x86-ml <x86@kernel.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Zhimin Gu <kookoo.gu@intel.com>
      Link: https://lkml.kernel.org/r/20190422031905.GA8387@dhcp-128-65.nay.redhat.com
      b9ac3849
  6. Apr 21, 2019
  7. Apr 19, 2019
  8. Apr 17, 2019
    • Josh Poimboeuf's avatar
      s390/speculation: Support 'mitigations=' cmdline option · 0336e04a
      Josh Poimboeuf authored
      
      Configure s390 runtime CPU speculation bug mitigations in accordance
      with the 'mitigations=' cmdline option.  This affects Spectre v1 and
      Spectre v2.
      
      The default behavior is unchanged.
      
      Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Tested-by: Jiri Kosina <jkosina@suse.cz> (on x86)
      Reviewed-by: default avatarJiri Kosina <jkosina@suse.cz>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: "H . Peter Anvin" <hpa@zytor.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Jiri Kosina <jikos@kernel.org>
      Cc: Waiman Long <longman@redhat.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Jon Masters <jcm@redhat.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: linux-s390@vger.kernel.org
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-arch@vger.kernel.org
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Tyler Hicks <tyhicks@canonical.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Steven Price <steven.price@arm.com>
      Cc: Phil Auld <pauld@redhat.com>
      Link: https://lkml.kernel.org/r/e4a161805458a5ec88812aac0307ae3908a030fc.1555085500.git.jpoimboe@redhat.com
      0336e04a
    • Josh Poimboeuf's avatar
      powerpc/speculation: Support 'mitigations=' cmdline option · 782e69ef
      Josh Poimboeuf authored
      
      Configure powerpc CPU runtime speculation bug mitigations in accordance
      with the 'mitigations=' cmdline option.  This affects Meltdown, Spectre
      v1, Spectre v2, and Speculative Store Bypass.
      
      The default behavior is unchanged.
      
      Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Tested-by: Jiri Kosina <jkosina@suse.cz> (on x86)
      Reviewed-by: default avatarJiri Kosina <jkosina@suse.cz>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: "H . Peter Anvin" <hpa@zytor.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Jiri Kosina <jikos@kernel.org>
      Cc: Waiman Long <longman@redhat.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Jon Masters <jcm@redhat.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: linux-s390@vger.kernel.org
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-arch@vger.kernel.org
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Tyler Hicks <tyhicks@canonical.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Steven Price <steven.price@arm.com>
      Cc: Phil Auld <pauld@redhat.com>
      Link: https://lkml.kernel.org/r/245a606e1a42a558a310220312d9b6adb9159df6.1555085500.git.jpoimboe@redhat.com
      782e69ef
    • Josh Poimboeuf's avatar
      x86/speculation: Support 'mitigations=' cmdline option · d68be4c4
      Josh Poimboeuf authored
      
      Configure x86 runtime CPU speculation bug mitigations in accordance with
      the 'mitigations=' cmdline option.  This affects Meltdown, Spectre v2,
      Speculative Store Bypass, and L1TF.
      
      The default behavior is unchanged.
      
      Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Tested-by: Jiri Kosina <jkosina@suse.cz> (on x86)
      Reviewed-by: default avatarJiri Kosina <jkosina@suse.cz>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: "H . Peter Anvin" <hpa@zytor.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Jiri Kosina <jikos@kernel.org>
      Cc: Waiman Long <longman@redhat.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Jon Masters <jcm@redhat.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: linux-s390@vger.kernel.org
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-arch@vger.kernel.org
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Tyler Hicks <tyhicks@canonical.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Steven Price <steven.price@arm.com>
      Cc: Phil Auld <pauld@redhat.com>
      Link: https://lkml.kernel.org/r/6616d0ae169308516cfdf5216bedd169f8a8291b.1555085500.git.jpoimboe@redhat.com
      d68be4c4
    • Josh Poimboeuf's avatar
      cpu/speculation: Add 'mitigations=' cmdline option · 98af8452
      Josh Poimboeuf authored
      
      Keeping track of the number of mitigations for all the CPU speculation
      bugs has become overwhelming for many users.  It's getting more and more
      complicated to decide which mitigations are needed for a given
      architecture.  Complicating matters is the fact that each arch tends to
      have its own custom way to mitigate the same vulnerability.
      
      Most users fall into a few basic categories:
      
      a) they want all mitigations off;
      
      b) they want all reasonable mitigations on, with SMT enabled even if
         it's vulnerable; or
      
      c) they want all reasonable mitigations on, with SMT disabled if
         vulnerable.
      
      Define a set of curated, arch-independent options, each of which is an
      aggregation of existing options:
      
      - mitigations=off: Disable all mitigations.
      
      - mitigations=auto: [default] Enable all the default mitigations, but
        leave SMT enabled, even if it's vulnerable.
      
      - mitigations=auto,nosmt: Enable all the default mitigations, disabling
        SMT if needed by a mitigation.
      
      Currently, these options are placeholders which don't actually do
      anything.  They will be fleshed out in upcoming patches.
      
      Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Tested-by: Jiri Kosina <jkosina@suse.cz> (on x86)
      Reviewed-by: default avatarJiri Kosina <jkosina@suse.cz>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: "H . Peter Anvin" <hpa@zytor.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Jiri Kosina <jikos@kernel.org>
      Cc: Waiman Long <longman@redhat.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Jon Masters <jcm@redhat.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: linux-s390@vger.kernel.org
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-arch@vger.kernel.org
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Tyler Hicks <tyhicks@canonical.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Steven Price <steven.price@arm.com>
      Cc: Phil Auld <pauld@redhat.com>
      Link: https://lkml.kernel.org/r/b07a8ef9b7c5055c3a4637c87d07c296d5016fe0.1555085500.git.jpoimboe@redhat.com
      98af8452
  9. Apr 10, 2019
  10. Apr 08, 2019
  11. Apr 07, 2019
    • Rafael J. Wysocki's avatar
      PM / arch: x86: MSR_IA32_ENERGY_PERF_BIAS sysfs interface · b9c273ba
      Rafael J. Wysocki authored
      
      The Performance and Energy Bias Hint (EPB) is expected to be set by
      user space through the generic MSR interface, but that interface is
      not particularly nice and there are security concerns regarding it,
      so it is not always available.
      
      For this reason, add a sysfs interface for reading and updating the
      EPB, in the form of a new attribute, energy_perf_bias, located
      under /sys/devices/system/cpu/cpu#/power/ for online CPUs that
      support the EPB feature.
      
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
      Acked-by: default avatarBorislav Petkov <bp@suse.de>
      b9c273ba
    • Rafael J. Wysocki's avatar
      PM / arch: x86: Rework the MSR_IA32_ENERGY_PERF_BIAS handling · 5861381d
      Rafael J. Wysocki authored
      
      The current handling of MSR_IA32_ENERGY_PERF_BIAS in the kernel is
      problematic, because it may cause changes made by user space to that
      MSR (with the help of the x86_energy_perf_policy tool, for example)
      to be lost every time a CPU goes offline and then back online as well
      as during system-wide power management transitions into sleep states
      and back into the working state.
      
      The first problem is that if the current EPB value for a CPU going
      online is 0 ('performance'), the kernel will change it to 6 ('normal')
      regardless of whether or not this is the first bring-up of that CPU.
      That also happens during system-wide resume from sleep states
      (including, but not limited to, hibernation).  However, the EPB may
      have been adjusted by user space this way and the kernel should not
      blindly override that setting.
      
      The second problem is that if the platform firmware resets the EPB
      values for any CPUs during system-wide resume from a sleep state,
      the kernel will not restore their previous EPB values that may
      have been set by user space before the preceding system-wide
      suspend transition.  Again, that behavior may at least be confusing
      from the user space perspective.
      
      In order to address these issues, rework the handling of
      MSR_IA32_ENERGY_PERF_BIAS so that the EPB value is saved on CPU
      offline and restored on CPU online as well as (for the boot CPU)
      during the syscore stages of system-wide suspend and resume
      transitions, respectively.
      
      However, retain the policy by which the EPB is set to 6 ('normal')
      on the first bring-up of each CPU if its initial value is 0, based
      on the observation that 0 may mean 'not initialized' just as well as
      'performance' in that case.
      
      While at it, move the MSR_IA32_ENERGY_PERF_BIAS handling code into
      a separate file and document it in Documentation/admin-guide.
      
      Fixes: abe48b10 (x86, intel, power: Initialize MSR_IA32_ENERGY_PERF_BIAS)
      Fixes: b51ef52d (x86/cpu: Restore MSR_IA32_ENERGY_PERF_BIAS after resume)
      Reported-by: default avatarThomas Renninger <trenn@suse.de>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
      Acked-by: default avatarBorislav Petkov <bp@suse.de>
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      5861381d
  12. Apr 04, 2019
  13. Mar 26, 2019
    • Paul E. McKenney's avatar
      rcu: Allow rcu_nocbs= to specify all CPUs · da8739f2
      Paul E. McKenney authored
      
      Currently, the rcu_nocbs= kernel boot parameter requires that a specific
      list of CPUs be specified, and has no way to say "all of them".
      As noted by user RavFX in a comment to Phoronix topic 1002538, this
      is an inconvenient side effect of the removal of the RCU_NOCB_CPU_ALL
      Kconfig option.  This commit therefore enables the rcu_nocbs= kernel boot
      parameter to be given the string "all", as in "rcu_nocbs=all" to specify
      that all CPUs on the system are to have their RCU callbacks offloaded.
      
      Another approach would be to make cpulist_parse() check for "all", but
      there are uses of cpulist_parse() that do other checking, which could
      conflict with an "all".  This commit therefore focuses on the specific
      use of cpulist_parse() in rcu_nocb_setup().
      
      Just a note to other people who would like changes to Linux-kernel RCU:
      If you send your requests to me directly, they might get fixed somewhat
      faster.  RavFX's comment was posted on January 22, 2018 and I first saw
      it on March 5, 2019.  And the only reason that I found it -at- -all- was
      that I was looking for projects using RCU, and my search engine showed
      me that Phoronix comment quite by accident.  Your choice, though!  ;-)
      
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      da8739f2
  14. Mar 22, 2019
  15. Mar 12, 2019
  16. Mar 06, 2019
    • Chris Down's avatar
      mm: memcontrol: expose THP events on a per-memcg basis · 1ff9e6e1
      Chris Down authored
      Currently THP allocation events data is fairly opaque, since you can
      only get it system-wide.  This patch makes it easier to reason about
      transparent hugepage behaviour on a per-memcg basis.
      
      For anonymous THP-backed pages, we already have MEMCG_RSS_HUGE in v1,
      which is used for v1's rss_huge [sic].  This is reused here as it's
      fairly involved to untangle NR_ANON_THPS right now to make it per-memcg,
      since right now some of this is delegated to rmap before we have any
      memcg actually assigned to the page.  It's a good idea to rework that,
      but let's leave untangling THP allocation for a future patch.
      
      [akpm@linux-foundation.org: fix build]
      [chris@chrisdown.name: fix memcontrol build when THP is disabled]
        Link: http://lkml.kernel.org/r/20190131160802.GA5777@chrisdown.name
      Link: http://lkml.kernel.org/r/20190129205852.GA7310@chrisdown.name
      
      
      Signed-off-by: default avatarChris Down <chris@chrisdown.name>
      Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Roman Gushchin <guro@fb.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1ff9e6e1
    • David Hildenbrand's avatar
      mm: convert PG_balloon to PG_offline · ca215086
      David Hildenbrand authored
      PG_balloon was introduced to implement page migration/compaction for
      pages inflated in virtio-balloon.  Nowadays, it is only a marker that a
      page is part of virtio-balloon and therefore logically offline.
      
      We also want to make use of this flag in other balloon drivers - for
      inflated pages or when onlining a section but keeping some pages offline
      (e.g.  used right now by XEN and Hyper-V via set_online_page_callback()).
      
      We are going to expose this flag to dump tools like makedumpfile.  But
      instead of exposing PG_balloon, let's generalize the concept of marking
      pages as logically offline, so it can be reused for other purposes later
      on.
      
      Rename PG_balloon to PG_offline.  This is an indicator that the page is
      logically offline, the content stale and that it should not be touched
      (e.g.  a hypervisor would have to allocate backing storage in order for
      the guest to dump an unused page).  We can then e.g.  exclude such pages
      from dumps.
      
      We replace and reuse KPF_BALLOON (23), as this shouldn't really harm
      (and for now the semantics stay the same).  In following patches, we
      will make use of this bit also in other balloon drivers.  While at it,
      document PGTABLE.
      
      [akpm@linux-foundation.org: fix comment text, per David]
      Link: http://lkml.kernel.org/r/20181119101616.8901-3-david@redhat.com
      
      
      Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      Acked-by: default avatarKonstantin Khlebnikov <koct9i@gmail.com>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Acked-by: default avatarPankaj gupta <pagupta@redhat.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
      Cc: Christian Hansen <chansen3@cisco.com>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Pavel Tatashin <pasha.tatashin@oracle.com>
      Cc: Alexander Duyck <alexander.h.duyck@linux.intel.com>
      Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Cc: Miles Chen <miles.chen@mediatek.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Kazuhito Hagio <k-hagio@ab.jp.nec.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Baoquan He <bhe@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Haiyang Zhang <haiyangz@microsoft.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Julien Freche <jfreche@vmware.com>
      Cc: Kairui Song <kasong@redhat.com>
      Cc: "K. Y. Srinivasan" <kys@microsoft.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Lianbo Jiang <lijiang@redhat.com>
      Cc: Michal Hocko <mhocko@kernel.org>
      Cc: Nadav Amit <namit@vmware.com>
      Cc: Omar Sandoval <osandov@fb.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Stefano Stabellini <sstabellini@kernel.org>
      Cc: Stephen Hemminger <sthemmin@microsoft.com>
      Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
      Cc: Xavier Deguillard <xdeguillard@vmware.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ca215086
  17. Feb 25, 2019
  18. Feb 22, 2019
  19. Feb 17, 2019
Loading