Skip to content
Snippets Groups Projects
  1. Nov 18, 2010
    • Frederic Weisbecker's avatar
      tracing: New macro to set up initial event flags value · 1ed0c597
      Frederic Weisbecker authored
      
      This introduces the new TRACE_EVENT_FLAGS() macro in order
      to set up initial event flags value.
      
      This macro must simply follow the definition of a trace event
      and take the event name and the flag value as parameters:
      
      TRACE_EVENT(my_event, .....
      ....
      );
      
      TRACE_EVENT_FLAGS(my_event, 1)
      
      This will set up 1 as the initial my_event->flags value.
      
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Jason Baron <jbaron@redhat.com>
      1ed0c597
    • Frederic Weisbecker's avatar
      tracing: New flag to allow non privileged users to use a trace event · 61c32659
      Frederic Weisbecker authored
      
      This adds a new trace event internal flag that allows them to be
      used in perf by non privileged users in case of task bound tracing.
      
      This is desired for syscalls tracepoint because they don't leak
      global system informations, like some other tracepoints.
      
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Jason Baron <jbaron@redhat.com>
      61c32659
    • Soeren Sandmann Pedersen's avatar
      x86: Eliminate bp argument from the stack tracing routines · 9c0729dc
      Soeren Sandmann Pedersen authored
      
      The various stack tracing routines take a 'bp' argument in which the
      caller is supposed to provide the base pointer to use, or 0 if doesn't
      have one. Since bp is garbage whenever CONFIG_FRAME_POINTER is not
      defined, this means all callers in principle should either always pass
      0, or be conditional on CONFIG_FRAME_POINTER.
      
      However, there are only really three use cases for stack tracing:
      
      (a) Trace the current task, including IRQ stack if any
      (b) Trace the current task, but skip IRQ stack
      (c) Trace some other task
      
      In all cases, if CONFIG_FRAME_POINTER is not defined, bp should just
      be 0.  If it _is_ defined, then
      
      - in case (a) bp should be gotten directly from the CPU's register, so
        the caller should pass NULL for regs,
      
      - in case (b) the caller should should pass the IRQ registers to
        dump_trace(),
      
      - in case (c) bp should be gotten from the top of the task's stack, so
        the caller should pass NULL for regs.
      
      Hence, the bp argument is not necessary because the combination of
      task and regs is sufficient to determine an appropriate value for bp.
      
      This patch introduces a new inline function stack_frame(task, regs)
      that computes the desired bp. This function is then called from the
      two versions of dump_stack().
      
      Signed-off-by: default avatarSoren Sandmann <ssp@redhat.com>
      Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arjan van de Ven <arjan@infradead.org>,
      Cc: Frederic Weisbecker <fweisbec@gmail.com>,
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>,
      LKML-Reference: <m3oc9rop28.fsf@dhcp-100-3-82.bos.redhat.com>>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      9c0729dc
  2. Oct 31, 2010
  3. Oct 30, 2010
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.infradead.org/users/eparis/notify · 1792f17b
      Linus Torvalds authored
      * 'for-linus' of git://git.infradead.org/users/eparis/notify: (22 commits)
        Ensure FMODE_NONOTIFY is not set by userspace
        make fanotify_read() restartable across signals
        fsnotify: remove alignment padding from fsnotify_mark on 64 bit builds
        fs/notify/fanotify/fanotify_user.c: fix warnings
        fanotify: Fix FAN_CLOSE comments
        fanotify: do not recalculate the mask if the ignored mask changed
        fanotify: ignore events on directories unless specifically requested
        fsnotify: rename FS_IN_ISDIR to FS_ISDIR
        fanotify: do not send events for irregular files
        fanotify: limit number of listeners per user
        fanotify: allow userspace to override max marks
        fanotify: limit the number of marks in a single fanotify group
        fanotify: allow userspace to override max queue depth
        fsnotify: implement a default maximum queue depth
        fanotify: ignore fanotify ignore marks if open writers
        fanotify: allow userspace to flush all marks
        fsnotify: call fsnotify_parent in perm events
        fsnotify: correctly handle return codes from listeners
        fanotify: use __aligned_u64 in fanotify userspace metadata
        fanotify: implement fanotify listener ordering
        ...
      1792f17b
    • Linus Torvalds's avatar
      Merge branches 'perf-fixes-for-linus' and 'x86-fixes-for-linus' of... · f02a38d8
      Linus Torvalds authored
      Merge branches 'perf-fixes-for-linus' and 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        jump label: Add work around to i386 gcc asm goto bug
        x86, ftrace: Use safe noops, drop trap test
        jump_label: Fix unaligned traps on sparc.
        jump label: Make arch_jump_label_text_poke_early() optional
        jump label: Fix error with preempt disable holding mutex
        oprofile: Remove deprecated use of flush_scheduled_work()
        oprofile: Fix the hang while taking the cpu offline
        jump label: Fix deadlock b/w jump_label_mutex vs. text_mutex
        jump label: Fix module __init section race
      
      * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        x86: Check irq_remapped instead of remapping_enabled in destroy_irq()
      f02a38d8
    • Lino Sanfilippo's avatar
      Ensure FMODE_NONOTIFY is not set by userspace · 6bff7ecc
      Lino Sanfilippo authored
      
          In fsnotify_open() ensure that FMODE_NONOTIFY is never set by userspace.
          Also always call fsnotify_parent and fsnotify.
      
      Signed-off-by: default avatarLino Sanfilippo <LinoSanfilippo@gmx.de>
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      6bff7ecc
    • Lino Sanfilippo's avatar
      make fanotify_read() restartable across signals · 1a5cea72
      Lino Sanfilippo authored
      
          In fanotify_read() return -ERESTARTSYS instead of -EINTR to
          make read() restartable across signals (BSD semantic).
      
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      1a5cea72
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable · 925d169f
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (39 commits)
        Btrfs: deal with errors from updating the tree log
        Btrfs: allow subvol deletion by unprivileged user with -o user_subvol_rm_allowed
        Btrfs: make SNAP_DESTROY async
        Btrfs: add SNAP_CREATE_ASYNC ioctl
        Btrfs: add START_SYNC, WAIT_SYNC ioctls
        Btrfs: async transaction commit
        Btrfs: fix deadlock in btrfs_commit_transaction
        Btrfs: fix lockdep warning on clone ioctl
        Btrfs: fix clone ioctl where range is adjacent to extent
        Btrfs: fix delalloc checks in clone ioctl
        Btrfs: drop unused variable in block_alloc_rsv
        Btrfs: cleanup warnings from gcc 4.6 (nonbugs)
        Btrfs: Fix variables set but not read (bugs found by gcc 4.6)
        Btrfs: Use ERR_CAST helpers
        Btrfs: use memdup_user helpers
        Btrfs: fix raid code for removing missing drives
        Btrfs: Switch the extent buffer rbtree into a radix tree
        Btrfs: restructure try_release_extent_buffer()
        Btrfs: use the flusher threads for delalloc throttling
        Btrfs: tune the chunk allocation to 5% of the FS as metadata
        ...
      
      Fix up trivial conflicts in fs/btrfs/super.c and fs/fs-writeback.c, and
      remove use of INIT_RCU_HEAD in fs/btrfs/extent_io.c (that init macro was
      useless and removed in commit 5e8067ad: "rcu head remove init")
      925d169f
    • Linus Torvalds's avatar
      fs-writeback.c: unify some common code · cdf01dd5
      Linus Torvalds authored
      
      The btrfs merge looks like hell, because it changes fs-writeback.c, and
      the crazy code has this repeated "estimate number of dirty pages"
      counting that involves three different helper functions.  And it's done
      in two different places.
      
      Just unify that whole calculation as a "get_nr_dirty_pages()" helper
      function, and the merge result will look half-way decent.
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cdf01dd5
    • Linus Torvalds's avatar
      Merge branch 'audit.b64' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current · 847f8776
      Linus Torvalds authored
      * 'audit.b64' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
        audit mmap
        audit: make link()/linkat() match "attribute change" predicate
        audit: Use rcu for task lookup protection
        audit: Do not send uninitialized data for AUDIT_TTY_GET
        audit: Call tty_audit_push_task() outside preempt disabled
        in untag_chunk() we need to do alloc_chunk() a bit earlier
        audit: make functions static
        Audit: add support to match lsm labels on user audit messages
      847f8776
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/mtd-2.6 · 79346507
      Linus Torvalds authored
      * git://git.infradead.org/mtd-2.6: (82 commits)
        mtd: fix build error in m25p80.c
        mtd: Remove redundant mutex from mtd_blkdevs.c
        MTD: Fix wrong check register_blkdev return value
        Revert "mtd: cleanup Kconfig dependencies"
        mtd: cfi_cmdset_0002: make sector erase command variable
        mtd: cfi_cmdset_0002: add CFI detection for SST 38VF640x chips
        mtd: cfi_util: add support for switching SST 39VF640xB chips into QRY mode
        mtd: cfi_cmdset_0001: use defined value of P_ID_INTEL_PERFORMANCE instead of hardcoded one
        block2mtd: dubious assignment
        P4080/mtd: Fix the freescale lbc issue with 36bit mode
        P4080/eLBC: Make Freescale elbc interrupt common to elbc devices
        mtd: phram: use KBUILD_MODNAME
        mtd: OneNAND: S5PC110: Fix double call suspend & resume function
        mtd: nand: fix MTD_MODE_RAW writes
        jffs2: use kmemdup
        mtd: sm_ftl: cosmetic, use bool when possible
        mtd: r852: remove useless pci powerup/down from suspend/resume routines
        mtd: blktrans: fix a race vs kthread_stop
        mtd: blktrans: kill BKL
        mtd: allow to unload the mtdtrans module if its block devices aren't open
        ...
      
      Fix up trivial whitespace-introduced conflict in drivers/mtd/mtdchar.c
      79346507
    • Linus Torvalds's avatar
      Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm · 706d4b12
      Linus Torvalds authored
      * 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (215 commits)
        ARM: memblock: setup lowmem mappings using memblock
        ARM: memblock: move meminfo into find_limits directly
        ARM: memblock: convert free_highpages() to use memblock
        ARM: move freeing of highmem pages out of mem_init()
        ARM: memblock: convert memory detail printing to use memblock
        ARM: memblock: use memblock to free memory into arm_bootmem_init()
        ARM: memblock: use memblock when initializing memory allocators
        ARM: ensure membank array is always sorted
        ARM: 6466/1: implement flush_icache_all for the rest of the CPUs
        ARM: 6464/2: fix spinlock recursion in adjust_pte()
        ARM: fix memblock breakage
        ARM: 6465/1: Fix data abort accessing proc_info from __lookup_processor_type
        ARM: 6460/1: ixp2000: fix type of ixp2000_timer_interrupt
        ARM: 6449/1: Fix for compiler warning of uninitialized variable.
        ARM: 6445/1: fixup TCM memory types
        ARM: imx: Add wake functionality to GPIO
        ARM: mx5: Add gpio-keys to mx51 babbage board
        ARM: imx: Add gpio-keys to plat-mxc
        mx31_3ds: Fix spi registration
        mx31_3ds: Fix the logic for detecting the debug board
        ...
      706d4b12
    • Vasiliy Kulikov's avatar
      ipc: shm: fix information leak to userland · 3af54c9b
      Vasiliy Kulikov authored
      
      The shmid_ds structure is copied to userland with shm_unused{,2,3}
      fields unitialized.  It leads to leaking of contents of kernel stack
      memory.
      
      Signed-off-by: default avatarVasiliy Kulikov <segooon@gmail.com>
      Acked-by: default avatarAl Viro <viro@ZenIV.linux.org.uk>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3af54c9b
    • wu zhangjin's avatar
      fs/compat.c: fix build on MIPS/s390 · 504b701b
      wu zhangjin authored
      
      The definition of PAGE_CACHE_MASK in <linux/pagemap.h> is needed to use
      MAX_RW_COUNT, and on x86-64 that gets done indirectly through the
      architecture header includes.  But on MIPS and s390 that doesn't happen,
      and we need to make sure that fs/compat.c includes pagemap.h explicitly.
      
      Introduced in commit 435f49a5 ("readv/writev: do the same
      MAX_RW_COUNT truncation that read/write does").
      
      Reported-by: Sachin Sant <sachinp@in.ibm.com> (S390)
      Reported-by: wu zhangjin <wuzhangjin@gmail.com> (MIPS)
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      504b701b
    • Al Viro's avatar
      audit mmap · 120a795d
      Al Viro authored
      
      Normal syscall audit doesn't catch 5th argument of syscall.  It also
      doesn't catch the contents of userland structures pointed to be
      syscall argument, so for both old and new mmap(2) ABI it doesn't
      record the descriptor we are mapping.  For old one it also misses
      flags.
      
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      120a795d
    • Al Viro's avatar
    • Thomas Gleixner's avatar
      audit: Use rcu for task lookup protection · ab263f47
      Thomas Gleixner authored
      
      Protect the task lookups in audit_receive_msg() with rcu_read_lock()
      instead of tasklist_lock and use lock/unlock_sighand to protect
      against the exit race.
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Eric Paris <eparis@redhat.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      ab263f47
    • Thomas Gleixner's avatar
      audit: Do not send uninitialized data for AUDIT_TTY_GET · 20703205
      Thomas Gleixner authored
      
      audit_receive_msg() sends uninitialized data for AUDIT_TTY_GET when
      the task was not found.
      
      Send reply only when task was found.
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Eric Paris <eparis@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      20703205
Loading