An error occurred fetching the project authors.
  1. 08 Feb, 2016 1 commit
    • Kees Cook's avatar
      ARM: 8501/1: mm: flip priority of CONFIG_DEBUG_RODATA · 25362dc4
      Kees Cook authored
      The use of CONFIG_DEBUG_RODATA is generally seen as an essential part of
      kernel self-protection:
      http://www.openwall.com/lists/kernel-hardening/2015/11/30/13
      Additionally, its name has grown to mean things beyond just rodata. To
      get ARM closer to this, we ought to rearrange the names of the configs
      that control how the kernel protects its memory. What was called
      CONFIG_ARM_KERNMEM_PERMS is realy doing the work that other architectures
      call CONFIG_DEBUG_RODATA.
      
      This redefines CONFIG_DEBUG_RODATA to actually do the bulk of the
      ROing (and NXing). In the place of the old CONFIG_DEBUG_RODATA, use
      CONFIG_DEBUG_ALIGN_RODATA, since that's what the option does: adds
      section alignment for making rodata explicitly NX, as arm does not split
      the page tables like arm64 does without _ALIGN_RODATA.
      
      Also adds human readable names to the sections so I could more easily
      debug my typos, and makes CONFIG_DEBUG_RODATA default "y" for CPU_V7.
      
      Results in /sys/kernel/debug/kernel_page_tables for each config state:
      
       # CONFIG_DEBUG_RODATA is not set
       # CONFIG_DEBUG_ALIGN_RODATA is not set
      
      ---[ Kernel Mapping ]---
      0x80000000-0x80900000           9M     RW x  SHD
      0x80900000-0xa0000000         503M     RW NX SHD
      
       CONFIG_DEBUG_RODATA=y
       CONFIG_DEBUG_ALIGN_RODATA=y
      
      ---[ Kernel Mapping ]---
      0x80000000-0x80100000           1M     RW NX SHD
      0x80100000-0x80700000           6M     ro x  SHD
      0x80700000-0x80a00000           3M     ro NX SHD
      0x80a00000-0xa0000000         502M     RW NX SHD
      
       CONFIG_DEBUG_RODATA=y
       # CONFIG_DEBUG_ALIGN_RODATA is not set
      
      ---[ Kernel Mapping ]---
      0x80000000-0x80100000           1M     RW NX SHD
      0x80100000-0x80a00000           9M     ro x  SHD
      0x80a00000-0xa0000000         502M     RW NX SHD
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Reviewed-by: default avatarLaura Abbott <labbott@fedoraproject.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      25362dc4
  2. 13 Dec, 2015 1 commit
  3. 04 Dec, 2015 1 commit
  4. 02 Jun, 2015 1 commit
  5. 14 Apr, 2015 2 commits
  6. 21 Jan, 2015 1 commit
  7. 09 Jan, 2015 1 commit
  8. 21 Nov, 2014 1 commit
  9. 21 Oct, 2014 1 commit
  10. 16 Oct, 2014 3 commits
  11. 10 Oct, 2014 1 commit
  12. 02 Oct, 2014 1 commit
  13. 02 Jun, 2014 2 commits
  14. 01 Jun, 2014 1 commit
  15. 30 Apr, 2014 1 commit
  16. 11 Mar, 2014 1 commit
  17. 28 Jan, 2014 1 commit
  18. 22 Jan, 2014 2 commits
    • Santosh Shilimkar's avatar
      arch/arm/mm/init.c: use memblock apis for early memory allocations · cfb66586
      Santosh Shilimkar authored
      Switch to memblock interfaces for early memory allocator instead of
      bootmem allocator.  No functional change in beahvior than what it is in
      current code from bootmem users points of view.
      
      Archs already converted to NO_BOOTMEM now directly use memblock
      interfaces instead of bootmem wrappers build on top of memblock.  And
      the archs which still uses bootmem, these new apis just fallback to
      exiting bootmem APIs.
      Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Michal Hocko <mhocko@suse.cz>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cfb66586
    • Mel Gorman's avatar
      mm, show_mem: remove SHOW_MEM_FILTER_PAGE_COUNT · aec6a888
      Mel Gorman authored
      Commit 4b59e6c4 ("mm, show_mem: suppress page counts in
      non-blockable contexts") introduced SHOW_MEM_FILTER_PAGE_COUNT to
      suppress PFN walks on large memory machines.  Commit c78e9363 ("mm:
      do not walk all of system memory during show_mem") avoided a PFN walk in
      the generic show_mem helper which removes the requirement for
      SHOW_MEM_FILTER_PAGE_COUNT in that case.
      
      This patch removes PFN walkers from the arch-specific implementations
      that report on a per-node or per-zone granularity.  ARM and unicore32
      still do a PFN walk as they report memory usage on each bank which is a
      much finer granularity where the debugging information may still be of
      use.  As the remaining arches doing PFN walks have relatively small
      amounts of memory, this patch simply removes SHOW_MEM_FILTER_PAGE_COUNT.
      
      [akpm@linux-foundation.org: fix parisc]
      Signed-off-by: default avatarMel Gorman <mgorman@suse.de>
      Acked-by: default avatarDavid Rientjes <rientjes@google.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: James Bottomley <jejb@parisc-linux.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      aec6a888
  19. 07 Jan, 2014 1 commit
  20. 09 Dec, 2013 1 commit
  21. 23 Nov, 2013 3 commits
    • Santosh Shilimkar's avatar
      ARM: mm: Remove bootmem code and switch to NO_BOOTMEM · 84f452b1
      Santosh Shilimkar authored
      Now with dma_mask series merged and max*pfn has consistent meaning on ARM
      as rest of the arch's thanks to RMK's mega series, lets switch ARM code
      to NO_BOOTMEM. With NO_BOOTMEM change, now we use memblock allocator to
      reserve space for crash kernel to have one less dependency with nobootmem
      allocator wrapper.
      
      Tested with both flat memory and sparse (faked) memory models with highmem
      enabled.
      
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
      Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      84f452b1
    • Grygorii Strashko's avatar
      ARM: mm: Don't allow resizing of memblock data until "low" memory is not mapped · 8e58caef
      Grygorii Strashko authored
      If allowed by call to memblock_allow_resize() - The Memblock core will
      try to allocate additional memory and rearrange its internal data in
      case, if there are more then INIT_MEMBLOCK_REGIONS(128) memory regions
      of any type have been allocated. If this happens before Low memory is
      mapped (which is done now by map_lowmem()) the system will hang, because
      the Memblock core will try to operate with virtual addresses which
      aren't mapped yet.
      
      In ARM code, the memblock resizing is allowed (memblock_allow_resize())
      from arm_memblock_init() which is called before map_lowmem(), so
      this may lead to an error as described above.
      
      Hence, allow Memblock resizing later during init, from bootmem_init()
      when all appropriate mappings are ready.
      
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
      Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      8e58caef
    • Santosh Shilimkar's avatar
      ARM: mm: Fix max_mapnr with recent max*pfn updates · b3ba41f2
      Santosh Shilimkar authored
      With commit  26ba47b1 {ARM: 7805/1: mm: change max*pfn to include
      the physical offset of memory}, the max_pfn already contain
      PHYS_PFN_OFFSET, so it shouldn't be taken into account again.
      
      While at it, use use set_max_mapnr() helper.
      
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
      Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      b3ba41f2
  22. 31 Oct, 2013 2 commits
    • Santosh Shilimkar's avatar
      ARM: 7805/1: mm: change max*pfn to include the physical offset of memory · 26ba47b1
      Santosh Shilimkar authored
      Most of the kernel code assumes that max*pfn is maximum pfns because
      the physical start of memory is expected to be PFN0. Since this
      assumption is not true on ARM architectures, the meaning of max*pfn
      is number of memory pages. This is done to keep drivers happy which
      are making use of of these variable to calculate the dma bounce limit
      using dma_mask.
      
      Now since we have a architecture override possibility for DMAable
      maximum pfns, lets make meaning of max*pfns as maximum pnfs on ARM
      as well.
      
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
      Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      26ba47b1
    • Russell King's avatar
      ARM: DMA-API: better handing of DMA masks for coherent allocations · 4dcfa600
      Russell King authored
      We need to start treating DMA masks as something which is specific to
      the bus that the device resides on, otherwise we're going to hit all
      sorts of nasty issues with LPAE and 32-bit DMA controllers in >32-bit
      systems, where memory is offset from PFN 0.
      
      In order to start doing this, we convert the DMA mask to a PFN using
      the device specific dma_to_pfn() macro.  This is the reverse of the
      pfn_to_dma() macro which is used to get the DMA address for the device.
      
      This gives us a PFN mask, which we can then check against the PFN
      limit of the DMA zone.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      4dcfa600
  23. 15 Oct, 2013 1 commit
  24. 09 Oct, 2013 2 commits
    • Rob Herring's avatar
      of: remove early_init_dt_setup_initrd_arch · 29eb45a9
      Rob Herring authored
      All arches do essentially the same thing now for
      early_init_dt_setup_initrd_arch, so it can now be removed.
      Signed-off-by: default avatarRob Herring <rob.herring@calxeda.com>
      Acked-by: default avatarVineet Gupta <vgupta@synopsys.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: x86@kernel.org
      Cc: Chris Zankel <chris@zankel.net>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Acked-by: default avatarGrant Likely <grant.likely@linaro.org>
      29eb45a9
    • Rob Herring's avatar
      arm: set initrd_start/initrd_end for fdt scan · 65939301
      Rob Herring authored
      In order to unify the initrd scanning for DT across architectures, make
      arm set initrd_start and initrd_end instead of the physical addresses.
      This is aligned with all other architectures.
      Signed-off-by: default avatarRob Herring <rob.herring@calxeda.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: linux-arm-kernel@lists.infradead.org
      Acked-by: default avatarGrant Likely <grant.likely@linaro.org>
      65939301
  25. 27 Aug, 2013 1 commit
  26. 13 Aug, 2013 1 commit
  27. 26 Jul, 2013 1 commit
    • Russell King's avatar
      ARM: constify machine_desc structure uses · ff69a4c8
      Russell King authored
      struct machine_desc records are defined everywhere as a 'const'
      structure, but unfortuantely it loses its const-ness through the use of
      linker magic - the symbols which surround the section are not declared
      const so it becomes possible not to use 'const' for pointers to these
      const structures.
      
      Let's fix this oversight - all pointers to these structures should be
      marked const too.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      ff69a4c8
  28. 24 Jul, 2013 1 commit
  29. 09 Jul, 2013 1 commit
  30. 03 Jul, 2013 2 commits
    • Jiang Liu's avatar
      mm/ARM: prepare for removing num_physpages and simplify mem_init() · 2450c973
      Jiang Liu authored
      Prepare for removing num_physpages and simplify mem_init().
      Signed-off-by: default avatarJiang Liu <jiang.liu@huawei.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2450c973
    • Jiang Liu's avatar
      mm: concentrate modification of totalram_pages into the mm core · 0c988534
      Jiang Liu authored
      Concentrate code to modify totalram_pages into the mm core, so the arch
      memory initialized code doesn't need to take care of it.  With these
      changes applied, only following functions from mm core modify global
      variable totalram_pages: free_bootmem_late(), free_all_bootmem(),
      free_all_bootmem_node(), adjust_managed_page_count().
      
      With this patch applied, it will be much more easier for us to keep
      totalram_pages and zone->managed_pages in consistence.
      Signed-off-by: default avatarJiang Liu <jiang.liu@huawei.com>
      Acked-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: <sworddragon2@aol.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Jianguo Wu <wujianguo@huawei.com>
      Cc: Joonsoo Kim <js1304@gmail.com>
      Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: Michel Lespinasse <walken@google.com>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Tang Chen <tangchen@cn.fujitsu.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Wen Congyang <wency@cn.fujitsu.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0c988534