1. 09 10月, 2015 1 次提交
  2. 22 6月, 2013 1 次提交
    • V
      ARC: [mm] Make stack/heap Non-executable by default · 3abc9448
      Vineet Gupta 提交于
      1. For VM_EXEC based delayed dcache/icache flush, reduces the number of
         flushes.
      
      2. Makes this security feature ON by default rather than OFF before.
      
      3. Applications can use mprotect() to selectively override this.
      
      4. ELF binaries have a GNU_STACK segment which can easily override the
         kernel default permissions.
         For nested-functions/trampolines, gcc already auto-enables executable
         stack in elf. Others needing this can use -Wl,-z,execstack option.
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      3abc9448
  3. 25 5月, 2013 1 次提交
    • V
      ARC: lazy dcache flush broke gdb in non-aliasing configs · 7bb66f6e
      Vineet Gupta 提交于
      gdbserver inserting a breakpoint ends up calling copy_user_page() for a
      code page. The generic version of which (non-aliasing config) didn't set
      the PG_arch_1 bit hence update_mmu_cache() didn't sync dcache/icache for
      corresponding dynamic loader code page - causing garbade to be executed.
      
      So now aliasing versions of copy_user_highpage()/clear_page() are made
      default. There is no significant overhead since all of special alias
      handling code is compiled out for non-aliasing build
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      7bb66f6e
  4. 10 5月, 2013 1 次提交
    • V
      ARC: [mm] Aliasing VIPT dcache support 2/4 · 4102b533
      Vineet Gupta 提交于
      This is the meat of the series which prevents any dcache alias creation
      by always keeping the U and K mapping of a page congruent.
      If a mapping already exists, and other tries to access the page, prev
      one is flushed to physical page (wback+inv)
      
      Essentially flush_dcache_page()/copy_user_highpage() create K-mapping
      of a page, but try to defer flushing, unless U-mapping exist.
      When page is actually mapped to userspace, update_mmu_cache() flushes
      the K-mapping (in certain cases this can be optimised out)
      
      Additonally flush_cache_mm(), flush_cache_range(), flush_cache_page()
      handle the puring of stale userspace mappings on exit/munmap...
      
      flush_anon_page() handles the existing U-mapping for anon page before
      kernel reads it via the GUP path.
      
      Note that while not complete, this is enough to boot a simple
      dynamically linked Busybox based rootfs
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      4102b533
  5. 16 2月, 2013 3 次提交
  6. 11 2月, 2013 1 次提交
    • V
      ARC: Fundamental ARCH data-types/defines · 3be80aae
      Vineet Gupta 提交于
      * L1_CACHE_SHIFT
      * PAGE_SIZE, PAGE_OFFSET
      * struct pt_regs, struct user_regs_struct
      * struct thread_struct, cpu_relax(), task_pt_regs(), start_thread(), ...
      * struct thread_info, THREAD_SIZE, INIT_THREAD_INFO(), TIF_*, ...
      * BUG()
      * ELF_*
      * Elf_*
      
      To disallow user-space visibility into some of the core kernel data-types
      such as struct pt_regs, #ifdef __KERNEL__ which also makes the UAPI header
      spit (further patch in the series) to NOT export it to asm/uapi/ptrace.h
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      Cc: Jonas Bonn <jonas.bonn@gmail.com>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      3be80aae