1. 03 10月, 2019 2 次提交
    • K
      doc-rst: Programmatically render MAINTAINERS into ReST · aa204855
      Kees Cook 提交于
      In order to have the MAINTAINERS file visible in the rendered ReST
      output, this makes some small changes to the existing MAINTAINERS file
      to allow for better machine processing, and adds a new Sphinx directive
      "maintainers-include" to perform the rendering.
      
      Features include:
      - Per-subsystem reference links: subsystem maintainer entries can be
        trivially linked to both internally and external. For example:
        https://www.kernel.org/doc/html/latest/process/maintainers.html#secure-computing
      
      - Internally referenced .rst files are linked so they can be followed
        when browsing the resulting rendering. This allows, for example, the
        future addition of maintainer profiles to be automatically linked.
      
      - Field name expansion: instead of the short fields (e.g. "M", "F",
        "K"), use the indicated inline "full names" for the fields (which are
        marked with "*"s in MAINTAINERS) so that a rendered subsystem entry
        is more human readable. Email lists are additionally comma-separated.
        For example:
      
          SECURE COMPUTING
      	Mail:	  Kees Cook <keescook@chromium.org>
      	Reviewer: Andy Lutomirski <luto@amacapital.net>,
      		  Will Drewry <wad@chromium.org>
      	SCM:	  git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git seccomp
      	Status:	  Supported
      	Files:	  kernel/seccomp.c include/uapi/linux/seccomp.h
      		  include/linux/seccomp.h tools/testing/selftests/seccomp/*
      		  tools/testing/selftests/kselftest_harness.h
      		  userspace-api/seccomp_filter
      	Content regex:	\bsecure_computing \bTIF_SECCOMP\b
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      aa204855
    • K
      doc-rst: Reduce CSS padding around Field · 1b1438b5
      Kees Cook 提交于
      Right now any ":Field Name: Field Contents" lines end up with significant
      padding due to CSS from the "table" CSS which rightly needs padding to
      make tables readable. However, field lists don't need this as they tend
      to be stacked together. The future heavy use of fields in the parsed
      MAINTAINERS file needs this cleaned up, and existing users look better
      too. Note the needless white space (and misalignment of name/contents)
      between "Date" and "Author":
      
      https://www.kernel.org/doc/html/latest/accounting/psi.html
      
      This patch fixes this by lowering the padding with a more specific CSS.
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      1b1438b5
  2. 01 10月, 2019 7 次提交
  3. 29 9月, 2019 1 次提交
  4. 28 9月, 2019 1 次提交
  5. 27 9月, 2019 1 次提交
    • M
      mm: treewide: clarify pgtable_page_{ctor,dtor}() naming · b4ed71f5
      Mark Rutland 提交于
      The naming of pgtable_page_{ctor,dtor}() seems to have confused a few
      people, and until recently arm64 used these erroneously/pointlessly for
      other levels of page table.
      
      To make it incredibly clear that these only apply to the PTE level, and to
      align with the naming of pgtable_pmd_page_{ctor,dtor}(), let's rename them
      to pgtable_pte_page_{ctor,dtor}().
      
      These changes were generated with the following shell script:
      
      ----
      git grep -lw 'pgtable_page_.tor' | while read FILE; do
          sed -i '{s/pgtable_page_ctor/pgtable_pte_page_ctor/}' $FILE;
          sed -i '{s/pgtable_page_dtor/pgtable_pte_page_dtor/}' $FILE;
      done
      ----
      
      ... with the documentation re-flowed to remain under 80 columns, and
      whitespace fixed up in macros to keep backslashes aligned.
      
      There should be no functional change as a result of this patch.
      
      Link: http://lkml.kernel.org/r/20190722141133.3116-1-mark.rutland@arm.comSigned-off-by: NMark Rutland <mark.rutland@arm.com>
      Reviewed-by: NMike Rapoport <rppt@linux.ibm.com>
      Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>	[m68k]
      Cc: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Yu Zhao <yuzhao@google.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b4ed71f5
  6. 26 9月, 2019 2 次提交
  7. 25 9月, 2019 4 次提交
    • R
      dt-bindings: pwm: Update bindings for MT7629 SoC · 1c00ad6e
      Ryder Lee 提交于
      This updates bindings for MT7629 PWM controller.
      Signed-off-by: NRyder Lee <ryder.lee@mediatek.com>
      Signed-off-by: NSam Shih <sam.shih@mediatek.com>
      Reviewed-by: NRob Herring <robh@kernel.org>
      Reviewed-by: NMatthias Brugger <matthias.bgg@gmail.com>
      Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
      1c00ad6e
    • M
      memcg, kmem: deprecate kmem.limit_in_bytes · 0158115f
      Michal Hocko 提交于
      Cgroup v1 memcg controller has exposed a dedicated kmem limit to users
      which turned out to be really a bad idea because there are paths which
      cannot shrink the kernel memory usage enough to get below the limit (e.g.
      because the accounted memory is not reclaimable).  There are cases when
      the failure is even not allowed (e.g.  __GFP_NOFAIL).  This means that the
      kmem limit is in excess to the hard limit without any way to shrink and
      thus completely useless.  OOM killer cannot be invoked to handle the
      situation because that would lead to a premature oom killing.
      
      As a result many places might see ENOMEM returning from kmalloc and result
      in unexpected errors.  E.g.  a global OOM killer when there is a lot of
      free memory because ENOMEM is translated into VM_FAULT_OOM in #PF path and
      therefore pagefault_out_of_memory would result in OOM killer.
      
      Please note that the kernel memory is still accounted to the overall limit
      along with the user memory so removing the kmem specific limit should
      still allow to contain kernel memory consumption.  Unlike the kmem one,
      though, it invokes memory reclaim and targeted memcg oom killing if
      necessary.
      
      Start the deprecation process by crying to the kernel log.  Let's see
      whether there are relevant usecases and simply return to EINVAL in the
      second stage if nobody complains in few releases.
      
      [akpm@linux-foundation.org: tweak documentation text]
      Link: http://lkml.kernel.org/r/20190911151612.GI4023@dhcp22.suse.czSigned-off-by: NMichal Hocko <mhocko@suse.com>
      Reviewed-by: NShakeel Butt <shakeelb@google.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Thomas Lindroth <thomas.lindroth@gmail.com>
      Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0158115f
    • V
      mm, page_owner, debug_pagealloc: save and dump freeing stack trace · 8974558f
      Vlastimil Babka 提交于
      The debug_pagealloc functionality is useful to catch buggy page allocator
      users that cause e.g.  use after free or double free.  When page
      inconsistency is detected, debugging is often simpler by knowing the call
      stack of process that last allocated and freed the page.  When page_owner
      is also enabled, we record the allocation stack trace, but not freeing.
      
      This patch therefore adds recording of freeing process stack trace to page
      owner info, if both page_owner and debug_pagealloc are configured and
      enabled.  With only page_owner enabled, this info is not useful for the
      memory leak debugging use case.  dump_page() is adjusted to print the
      info.  An example result of calling __free_pages() twice may look like
      this (note the page last free stack trace):
      
      BUG: Bad page state in process bash  pfn:13d8f8
      page:ffffc31984f63e00 refcount:-1 mapcount:0 mapping:0000000000000000 index:0x0
      flags: 0x1affff800000000()
      raw: 01affff800000000 dead000000000100 dead000000000122 0000000000000000
      raw: 0000000000000000 0000000000000000 ffffffffffffffff 0000000000000000
      page dumped because: nonzero _refcount
      page_owner tracks the page as freed
      page last allocated via order 0, migratetype Unmovable, gfp_mask 0xcc0(GFP_KERNEL)
       prep_new_page+0x143/0x150
       get_page_from_freelist+0x289/0x380
       __alloc_pages_nodemask+0x13c/0x2d0
       khugepaged+0x6e/0xc10
       kthread+0xf9/0x130
       ret_from_fork+0x3a/0x50
      page last free stack trace:
       free_pcp_prepare+0x134/0x1e0
       free_unref_page+0x18/0x90
       khugepaged+0x7b/0xc10
       kthread+0xf9/0x130
       ret_from_fork+0x3a/0x50
      Modules linked in:
      CPU: 3 PID: 271 Comm: bash Not tainted 5.3.0-rc4-2.g07a1a73-default+ #57
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58-prebuilt.qemu.org 04/01/2014
      Call Trace:
       dump_stack+0x85/0xc0
       bad_page.cold+0xba/0xbf
       rmqueue_pcplist.isra.0+0x6c5/0x6d0
       rmqueue+0x2d/0x810
       get_page_from_freelist+0x191/0x380
       __alloc_pages_nodemask+0x13c/0x2d0
       __get_free_pages+0xd/0x30
       __pud_alloc+0x2c/0x110
       copy_page_range+0x4f9/0x630
       dup_mmap+0x362/0x480
       dup_mm+0x68/0x110
       copy_process+0x19e1/0x1b40
       _do_fork+0x73/0x310
       __x64_sys_clone+0x75/0x80
       do_syscall_64+0x6e/0x1e0
       entry_SYSCALL_64_after_hwframe+0x49/0xbe
      RIP: 0033:0x7f10af854a10
      ...
      
      Link: http://lkml.kernel.org/r/20190820131828.22684-5-vbabka@suse.czSigned-off-by: NVlastimil Babka <vbabka@suse.cz>
      Cc: Kirill A. Shutemov <kirill@shutemov.name>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Cc: Michal Hocko <mhocko@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8974558f
    • W
      mm, slab: extend slab/shrink to shrink all memcg caches · 04f768a3
      Waiman Long 提交于
      Currently, a value of '1" is written to /sys/kernel/slab/<slab>/shrink
      file to shrink the slab by flushing out all the per-cpu slabs and free
      slabs in partial lists.  This can be useful to squeeze out a bit more
      memory under extreme condition as well as making the active object counts
      in /proc/slabinfo more accurate.
      
      This usually applies only to the root caches, as the SLUB_MEMCG_SYSFS_ON
      option is usually not enabled and "slub_memcg_sysfs=1" not set.  Even if
      memcg sysfs is turned on, it is too cumbersome and impractical to manage
      all those per-memcg sysfs files in a real production system.
      
      So there is no practical way to shrink memcg caches.  Fix this by enabling
      a proper write to the shrink sysfs file of the root cache to scan all the
      available memcg caches and shrink them as well.  For a non-root memcg
      cache (when SLUB_MEMCG_SYSFS_ON or slub_memcg_sysfs is on), only that
      cache will be shrunk when written.
      
      On a 2-socket 64-core 256-thread arm64 system with 64k page after
      a parallel kernel build, the the amount of memory occupied by slabs
      before shrinking slabs were:
      
       # grep task_struct /proc/slabinfo
       task_struct        53137  53192   4288   61    4 : tunables    0    0
       0 : slabdata    872    872      0
       # grep "^S[lRU]" /proc/meminfo
       Slab:            3936832 kB
       SReclaimable:     399104 kB
       SUnreclaim:      3537728 kB
      
      After shrinking slabs (by echoing "1" to all shrink files):
      
       # grep "^S[lRU]" /proc/meminfo
       Slab:            1356288 kB
       SReclaimable:     263296 kB
       SUnreclaim:      1092992 kB
       # grep task_struct /proc/slabinfo
       task_struct         2764   6832   4288   61    4 : tunables    0    0
       0 : slabdata    112    112      0
      
      Link: http://lkml.kernel.org/r/20190723151445.7385-1-longman@redhat.comSigned-off-by: NWaiman Long <longman@redhat.com>
      Acked-by: NRoman Gushchin <guro@fb.com>
      Acked-by: NChristoph Lameter <cl@linux.com>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
      Cc: Michal Hocko <mhocko@kernel.org>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Shakeel Butt <shakeelb@google.com>
      Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      04f768a3
  8. 24 9月, 2019 1 次提交
  9. 21 9月, 2019 4 次提交
  10. 20 9月, 2019 1 次提交
  11. 18 9月, 2019 5 次提交
  12. 17 9月, 2019 11 次提交