29 Jul, 2008

6 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (21 commits)
    x86/PCI: use dev_printk when possible
    PCI: add D3 power state avoidance quirk
    PCI: fix bogus "'device' may be used uninitialized" warning in pci_slot
    PCI: add an option to allow ASPM enabled forcibly
    PCI: disable ASPM on pre-1.1 PCIe devices
    PCI: disable ASPM per ACPI FADT setting
    PCI MSI: Don't disable MSIs if the mask bit isn't supported
    PCI: handle 64-bit resources better on 32-bit machines
    PCI: rewrite PCI BAR reading code
    PCI: document pci_target_state
    PCI hotplug: fix typo in pcie hotplug output
    x86 gart: replace to_pages macro with iommu_num_pages
    x86, AMD IOMMU: replace to_pages macro with iommu_num_pages
    iommu: add iommu_num_pages helper function
    dma-coherent: add documentation to new interfaces
    Cris: convert to using generic dma-coherent mem allocator
    Sh: use generic per-device coherent dma allocator
    ARM: support generic per-device coherent dma mem
    Generic dma-coherent: fix DMA_MEMORY_EXCLUSIVE
    x86: use generic per-device dma coherent allocator
    ...

    Linus Torvalds
     
  • With KVM/GFP/XPMEM there isn't just the primary CPU MMU pointing to pages.
    There are secondary MMUs (with secondary sptes and secondary tlbs) too.
    sptes in the kvm case are shadow pagetables, but when I say spte in
    mmu-notifier context, I mean "secondary pte". In GRU case there's no
    actual secondary pte and there's only a secondary tlb because the GRU
    secondary MMU has no knowledge about sptes and every secondary tlb miss
    event in the MMU always generates a page fault that has to be resolved by
    the CPU (this is not the case of KVM where the a secondary tlb miss will
    walk sptes in hardware and it will refill the secondary tlb transparently
    to software if the corresponding spte is present). The same way
    zap_page_range has to invalidate the pte before freeing the page, the spte
    (and secondary tlb) must also be invalidated before any page is freed and
    reused.

    Currently we take a page_count pin on every page mapped by sptes, but that
    means the pages can't be swapped whenever they're mapped by any spte
    because they're part of the guest working set. Furthermore a spte unmap
    event can immediately lead to a page to be freed when the pin is released
    (so requiring the same complex and relatively slow tlb_gather smp safe
    logic we have in zap_page_range and that can be avoided completely if the
    spte unmap event doesn't require an unpin of the page previously mapped in
    the secondary MMU).

    The mmu notifiers allow kvm/GRU/XPMEM to attach to the tsk->mm and know
    when the VM is swapping or freeing or doing anything on the primary MMU so
    that the secondary MMU code can drop sptes before the pages are freed,
    avoiding all page pinning and allowing 100% reliable swapping of guest
    physical address space. Furthermore it avoids the code that teardown the
    mappings of the secondary MMU, to implement a logic like tlb_gather in
    zap_page_range that would require many IPI to flush other cpu tlbs, for
    each fixed number of spte unmapped.

    To make an example: if what happens on the primary MMU is a protection
    downgrade (from writeable to wrprotect) the secondary MMU mappings will be
    invalidated, and the next secondary-mmu-page-fault will call
    get_user_pages and trigger a do_wp_page through get_user_pages if it
    called get_user_pages with write=1, and it'll re-establishing an updated
    spte or secondary-tlb-mapping on the copied page. Or it will setup a
    readonly spte or readonly tlb mapping if it's a guest-read, if it calls
    get_user_pages with write=0. This is just an example.

    This allows to map any page pointed by any pte (and in turn visible in the
    primary CPU MMU), into a secondary MMU (be it a pure tlb like GRU, or an
    full MMU with both sptes and secondary-tlb like the shadow-pagetable layer
    with kvm), or a remote DMA in software like XPMEM (hence needing of
    schedule in XPMEM code to send the invalidate to the remote node, while no
    need to schedule in kvm/gru as it's an immediate event like invalidating
    primary-mmu pte).

    At least for KVM without this patch it's impossible to swap guests
    reliably. And having this feature and removing the page pin allows
    several other optimizations that simplify life considerably.

    Dependencies:

    1) mm_take_all_locks() to register the mmu notifier when the whole VM
    isn't doing anything with "mm". This allows mmu notifier users to keep
    track if the VM is in the middle of the invalidate_range_begin/end
    critical section with an atomic counter incraese in range_begin and
    decreased in range_end. No secondary MMU page fault is allowed to map
    any spte or secondary tlb reference, while the VM is in the middle of
    range_begin/end as any page returned by get_user_pages in that critical
    section could later immediately be freed without any further
    ->invalidate_page notification (invalidate_range_begin/end works on
    ranges and ->invalidate_page isn't called immediately before freeing
    the page). To stop all page freeing and pagetable overwrites the
    mmap_sem must be taken in write mode and all other anon_vma/i_mmap
    locks must be taken too.

    2) It'd be a waste to add branches in the VM if nobody could possibly
    run KVM/GRU/XPMEM on the kernel, so mmu notifiers will only enabled if
    CONFIG_KVM=m/y. In the current kernel kvm won't yet take advantage of
    mmu notifiers, but this already allows to compile a KVM external module
    against a kernel with mmu notifiers enabled and from the next pull from
    kvm.git we'll start using them. And GRU/XPMEM will also be able to
    continue the development by enabling KVM=m in their config, until they
    submit all GRU/XPMEM GPLv2 code to the mainline kernel. Then they can
    also enable MMU_NOTIFIERS in the same way KVM does it (even if KVM=n).
    This guarantees nobody selects MMU_NOTIFIER=y if KVM and GRU and XPMEM
    are all =n.

    The mmu_notifier_register call can fail because mm_take_all_locks may be
    interrupted by a signal and return -EINTR. Because mmu_notifier_reigster
    is used when a driver startup, a failure can be gracefully handled. Here
    an example of the change applied to kvm to register the mmu notifiers.
    Usually when a driver startups other allocations are required anyway and
    -ENOMEM failure paths exists already.

    struct kvm *kvm_arch_create_vm(void)
    {
    struct kvm *kvm = kzalloc(sizeof(struct kvm), GFP_KERNEL);
    + int err;

    if (!kvm)
    return ERR_PTR(-ENOMEM);

    INIT_LIST_HEAD(&kvm->arch.active_mmu_pages);

    + kvm->arch.mmu_notifier.ops = &kvm_mmu_notifier_ops;
    + err = mmu_notifier_register(&kvm->arch.mmu_notifier, current->mm);
    + if (err) {
    + kfree(kvm);
    + return ERR_PTR(err);
    + }
    +
    return kvm;
    }

    mmu_notifier_unregister returns void and it's reliable.

    The patch also adds a few needed but missing includes that would prevent
    kernel to compile after these changes on non-x86 archs (x86 didn't need
    them by luck).

    [akpm@linux-foundation.org: coding-style fixes]
    [akpm@linux-foundation.org: fix mm/filemap_xip.c build]
    [akpm@linux-foundation.org: fix mm/mmu_notifier.c build]
    Signed-off-by: Andrea Arcangeli
    Signed-off-by: Nick Piggin
    Signed-off-by: Christoph Lameter
    Cc: Jack Steiner
    Cc: Robin Holt
    Cc: Nick Piggin
    Cc: Peter Zijlstra
    Cc: Kanoj Sarcar
    Cc: Roland Dreier
    Cc: Steve Wise
    Cc: Avi Kivity
    Cc: Hugh Dickins
    Cc: Rusty Russell
    Cc: Anthony Liguori
    Cc: Chris Wright
    Cc: Marcelo Tosatti
    Cc: Eric Dumazet
    Cc: "Paul E. McKenney"
    Cc: Izik Eidus
    Cc: Anthony Liguori
    Cc: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     
  • Conflicts:

    arch/x86/Kconfig

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Conflicts:

    kernel/stop_machine.c

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Clean up and optimize cpumask_of_cpu(), by sharing all the zero words.

    Instead of stupidly generating all possible i=0...NR_CPUS 2^i patterns
    creating a huge array of constant bitmasks, realize that the zero words
    can be shared.

    In other words, on a 64-bit architecture, we only ever need 64 of these
    arrays - with a different bit set in one single world (with enough zero
    words around it so that we can create any bitmask by just offsetting in
    that big array). And then we just put enough zeroes around it that we
    can point every single cpumask to be one of those things.

    So when we have 4k CPU's, instead of having 4k arrays (of 4k bits each,
    with one bit set in each array - 2MB memory total), we have exactly 64
    arrays instead, each 8k bits in size (64kB total).

    And then we just point cpumask(n) to the right position (which we can
    calculate dynamically). Once we have the right arrays, getting
    "cpumask(n)" ends up being:

    static inline const cpumask_t *get_cpu_mask(unsigned int cpu)
    {
    const unsigned long *p = cpu_bit_bitmap[1 + cpu % BITS_PER_LONG];
    p -= cpu / BITS_PER_LONG;
    return (const cpumask_t *)p;
    }

    This brings other advantages and simplifications as well:

    - we are not wasting memory that is just filled with a single bit in
    various different places

    - we don't need all those games to re-create the arrays in some dense
    format, because they're already going to be dense enough.

    if we compile a kernel for up to 4k CPU's, "wasting" that 64kB of memory
    is a non-issue (especially since by doing this "overlapping" trick we
    probably get better cache behaviour anyway).

    [ mingo@elte.hu:

    Converted Linus's mails into a commit. See:

    http://lkml.org/lkml/2008/7/27/156
    http://lkml.org/lkml/2008/7/28/320

    Also applied a family filter - which also has the side-effect of leaving
    out the bits where Linus calls me an idio... Oh, never mind ;-)
    ]

    Signed-off-by: Ingo Molnar
    Cc: Rusty Russell
    Cc: Andrew Morton
    Cc: Al Viro
    Cc: Mike Travis
    Signed-off-by: Ingo Molnar

    Linus Torvalds
     
  • Ingo Molnar
     

28 Jul, 2008

12 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
    stop_machine: fix up ftrace.c
    stop_machine: Wean existing callers off stop_machine_run()
    stop_machine(): stop_machine_run() changed to use cpu mask
    Hotplug CPU: don't check cpu_online after take_cpu_down
    Simplify stop_machine
    stop_machine: add ALL_CPUS option
    module: fix build warning with !CONFIG_KALLSYMS

    Linus Torvalds
     
  • Simple conversion.

    Signed-off-by: Rusty Russell
    Cc: Abhishek Sagar
    Cc: Ingo Molnar
    Cc: Steven Rostedt

    Rusty Russell
     
  • Signed-off-by: Rusty Russell

    Rusty Russell
     
  • Instead of a "cpu" arg with magic values NR_CPUS (any cpu) and ~0 (all
    cpus), pass a cpumask_t. Allow NULL for the common case (where we
    don't care which CPU the function is run on): temporary cpumask_t's
    are usually considered bad for stack space.

    This deprecates stop_machine_run, to be removed soon when all the
    callers are dead.

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • Akinobu points out that if take_cpu_down() succeeds, the cpu must be offline.
    Remove the cpu_online() check, and put a BUG_ON().

    Quoting Akinobu Mita:
    Actually the cpu_online() check was necessary before appling this
    stop_machine: simplify patch.

    With old __stop_machine_run(), __stop_machine_run() could succeed
    (return !IS_ERR(p) value) even if take_cpu_down() returned non-zero value.
    The return value of take_cpu_down() was obtained through kthread_stop()..

    Signed-off-by: Rusty Russell
    Cc: "Akinobu Mita"

    Rusty Russell
     
  • stop_machine creates a kthread which creates kernel threads. We can
    create those threads directly and simplify things a little. Some care
    must be taken with CPU hotunplug, which has special needs, but that code
    seems more robust than it was in the past.

    Signed-off-by: Rusty Russell
    Acked-by: Christian Borntraeger

    Rusty Russell
     
  • -allow stop_mahcine_run() to call a function on all cpus. Calling
    stop_machine_run() with a 'ALL_CPUS' invokes this new behavior.
    stop_machine_run() proceeds as normal until the calling cpu has
    invoked 'fn'. Then, we tell all the other cpus to call 'fn'.

    Signed-off-by: Jason Baron
    Signed-off-by: Mathieu Desnoyers
    Signed-off-by: Rusty Russell
    CC: Adrian Bunk
    CC: Andi Kleen
    CC: Alexey Dobriyan
    CC: Christoph Hellwig
    CC: mingo@elte.hu
    CC: akpm@osdl.org

    Jason Baron
     
  • This patch fixed the warning:

    CC kernel/module.o
    /home/wangcong/Projects/linux-2.6/kernel/module.c:332: warning:
    ‘lookup_symbol’ defined but not used

    Signed-off-by: WANG Cong
    Signed-off-by: Rusty Russell

    WANG Cong
     
  • Simplify the code of include/linux/task_io_accounting.h.

    It is also more reasonable to have all the task i/o-related statistics in a
    single struct (task_io_accounting).

    Signed-off-by: Andrea Righi
    Signed-off-by: Oleg Nesterov
    Signed-off-by: Linus Torvalds

    Andrea Righi
     
  • Put all i/o statistics in struct proc_io_accounting and use inline functions to
    initialize and increment statistics, removing a lot of single variable
    assignments.

    This also reduces the kernel size as following (with CONFIG_TASK_XACCT=y and
    CONFIG_TASK_IO_ACCOUNTING=y).

    text data bss dec hex filename
    11651 0 0 11651 2d83 kernel/exit.o.before
    11619 0 0 11619 2d63 kernel/exit.o.after
    10886 132 136 11154 2b92 kernel/fork.o.before
    10758 132 136 11026 2b12 kernel/fork.o.after

    3082029 807968 4818600 8708597 84e1f5 vmlinux.o.before
    3081869 807968 4818600 8708437 84e155 vmlinux.o.after

    Signed-off-by: Andrea Righi
    Acked-by: Oleg Nesterov
    Signed-off-by: Linus Torvalds

    Andrea Righi
     
  • Remove the following warning with CONFIG_TRACING=y:

    kernel/trace/trace.c: In function ‘s_next’:
    kernel/trace/trace.c:1186: warning: unused variable ‘last_ent’

    Signed-off-by: Andrea Righi
    Signed-off-by: Linus Torvalds

    Andrea Righi
     
  • try_attach() should walk into the matching subdirectory, not the first one...

    Signed-off-by: Al Viro
    Tested-by: Valdis.Kletnieks@vt.edu
    Tested-by: Ingo Molnar
    Signed-off-by: Linus Torvalds

    Al Viro
     

27 Jul, 2008

22 commits

  • fs.h needs path.h, not namei.h; nfs_fs.h doesn't need it at all.
    Several places in the tree needed direct include.

    Signed-off-by: Al Viro

    Al Viro
     
  • long overdue...

    Signed-off-by: Al Viro

    Al Viro
     
  • * kill nameidata * argument; map the 3 bits in ->flags anybody cares
    about to new MAY_... ones and pass with the mask.
    * kill redundant gfs2_iop_permission()
    * sanitize ecryptfs_permission()
    * fix remaining places where ->permission() instances might barf on new
    MAY_... found in mask.

    The obvious next target in that direction is permission(9)

    folded fix for nfs_permission() breakage from Miklos Szeredi

    Signed-off-by: Al Viro

    Al Viro
     
  • * keep references to ctl_table_head and ctl_table in /proc/sys inodes
    * grab the former during operations, use the latter for access to
    entry if that succeeds
    * have ->d_compare() check if table should be seen for one who does lookup;
    that allows us to avoid flipping inodes - if we have the same name resolve
    to different things, we'll just keep several dentries and ->d_compare()
    will reject the wrong ones.
    * have ->lookup() and ->readdir() scan the table of our inode first, then
    walk all ctl_table_header and scan ->attached_by for those that are
    attached to our directory.
    * implement ->getattr().
    * get rid of insane amounts of tree-walking
    * get rid of the need to know dentry in ->permission() and of the contortions
    induced by that.

    Signed-off-by: Al Viro

    Al Viro
     
  • In a sense, that's the heart of the series. It's based on the following
    property of the trees we are actually asked to add: they can be split into
    stem that is already covered by registered trees and crown that is entirely
    new. IOW, if a/b and a/c/d are introduced by our tree, then a/c is also
    introduced by it.

    That allows to associate tree and table entry with each node in the union;
    while directory nodes might be covered by many trees, only one will cover
    the node by its crown. And that will allow much saner logics for /proc/sys
    in the next patches. This patch introduces the data structures needed to
    keep track of that.

    When adding a sysctl table, we find a "parent" one. Which is to say,
    find the deepest node on its stem that already is present in one of the
    tables from our table set or its ancestor sets. That table will be our
    parent and that node in it - attachment point. Add our table to list
    anchored in parent, have it refer the parent and contents of attachment
    point. Also remember where its crown lives.

    Signed-off-by: Al Viro

    Al Viro
     
  • Refcount the sucker; instead of freeing it by the end of unregistration
    just drop the refcount and free only when it hits zero. Make sure that
    we _always_ make ->unregistering non-NULL in start_unregistering().

    That allows anybody to get a reference to such puppy, preventing its
    freeing and reuse. It does *not* block unregistration. Anybody who
    holds such a reference can
    * try to grab a "use" reference (ctl_head_grab()); that will
    succeeds if and only if it hadn't entered unregistration yet. If it
    succeeds, we can use it in all normal ways until we release the "use"
    reference (with ctl_head_finish()). Note that this relies on having
    ->unregistering become non-NULL in all cases when one starts to unregister
    the sucker.
    * keep pointers to ctl_table entries; they *can* be freed if
    the entire thing is unregistered. However, if ctl_head_grab() succeeds,
    we know that unregistration had not happened (and will not happen until
    ctl_head_finish()) and such pointers can be used safely.

    IOW, now we can have inodes under /proc/sys keep references to ctl_table
    entries, protecting them with references to ctl_table_header and
    grabbing the latter for the duration of operations that require access
    to ctl_table. That won't cause deadlocks, since unregistration will not
    be stopped by mere keeping a reference to ctl_table_header.

    Signed-off-by: Al Viro

    Al Viro
     
  • New object: set of sysctls [currently - root and per-net-ns].
    Contains: pointer to parent set, list of tables and "should I see this set?"
    method (->is_seen(set)).
    Current lists of tables are subsumed by that; net-ns contains such a beast.
    ->lookup() for ctl_table_root returns pointer to ctl_table_set instead of
    that to ->list of that ctl_table_set.

    [folded compile fixes by rdd for configs without sysctl]

    Signed-off-by: Al Viro

    Al Viro
     
  • …nel/git/tip/linux-2.6-tip

    * 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    ftrace: fix modular build
    ftrace: disable tracing on acpi idle calls
    ftrace: remove latency-tracer leftover
    ftrace: only trace preempt off with preempt tracer
    ftrace: fix 4d3702b6 (post-v2.6.26): WARNING: at kernel/lockdep.c:2731 check_flags (ftrace)

    Linus Torvalds
     
  • cgroup_seqfile_release() can become static.

    Signed-off-by: Adrian Bunk
    Acked-by: Paul Menage
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • This extends wait_task_inactive() with a new argument so it can be used in
    a "soft" mode where it will check for the task changing state unexpectedly
    and back off. There is no change to existing callers. This lays the
    groundwork to allow robust, noninvasive tracing that can try to sample a
    blocked thread but back off safely if it wakes up.

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • This defines a new hook tracehook_force_sigpending() that lets tracing
    code decide to force TIF_SIGPENDING on in recalc_sigpending().

    This is not used yet, so it compiles away to nothing for now. It lays the
    groundwork for new tracing code that can interrupt a task synthetically
    without actually sending a signal.

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • This moves the ptrace logic in task death (exit_notify) into tracehook.h
    inlines. Some code is rearranged slightly to make things nicer. There is
    no change, only cleanup.

    There is one hook called with the tasklist_lock write-locked, as ptrace
    needs. There is also a new hook called after exit_state changes and
    without locks. This is a better place for tracing work to be in the
    future, since it doesn't delay the whole system with locking.

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • This defines the tracehook_notify_jctl() hook to formalize the ptrace
    effects on the job control notifications. There is no change, only
    cleanup.

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • This defines the tracehook_get_signal() hook to allow tracing code to slip
    in before normal signal dequeuing. This lays the groundwork for new
    tracing features that can inject synthetic signals outside the normal
    queue or control the disposition of delivered signals. The calling
    convention lets tracehook_get_signal() decide both exactly what will
    happen and what signal number to report in the handler/exit.

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • This defines tracehook_consider_fatal_signal() has a fine-grained hook for
    deciding to skip the special cases for a fatal signal, as ptrace does.
    There is no change, only cleanup.

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • This defines tracehook_consider_ignored_signal() has a fine-grained hook
    for deciding to prevent the normal short-circuit of sending an ignored
    signal, as ptrace does. There is no change, only cleanup.

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • This moves the ptrace-related logic from release_task into tracehook.h and
    ptrace.h inlines. It provides clean hooks both before and after locking
    tasklist_lock, for future tracing logic to do more cleanup without the
    lock.

    This also changes release_task() itself in the rare "zap_leader" case to
    set the leader to EXIT_DEAD before iterating. This maintains the
    invariant that release_task() only ever handles a task in EXIT_DEAD. This
    is a common-sense invariant that is already always true except in this one
    arcane case of zombie leader whose parent ignores SIGCHLD.

    This change is harmless and only costs one store in this one rare case.
    It keeps the expected state more consisently sane, which is nicer when
    debugging weirdness in release_task(). It also lets some future code in
    the tracehook entry points rely on this invariant for bookkeeping.

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • This moves the PTRACE_EVENT_VFORK_DONE tracing into a tracehook.h inline,
    tracehook_report_vfork_done(). The change has no effect, just clean-up.

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • This moves all the ptrace initialization and tracing logic for task
    creation into tracehook.h and ptrace.h inlines. It reorganizes the code
    slightly, but should not change any behavior.

    There are four tracehook entry points, at each important stage of task
    creation. This keeps the interface from the core fork.c code fairly
    clean, while supporting the complex setup required for ptrace or something
    like it.

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • This moves the PTRACE_EVENT_EXIT tracing into a tracehook.h inline,
    tracehook_report_exec(). The change has no effect, just clean-up.

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • The ptrace_notify() function should not be called by any modules. It was
    only ever exported to be called by binfmt exec functions. But that is no
    longer necessary since fs/exec.c deals with that generically now. There
    should be no calls to ptrace_notify() from outside the core kernel.

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • Use WARN() instead of a printk+WARN_ON() pair; this way the message
    becomes part of the warning section for better reporting/collection.

    Signed-off-by: Arjan van de Ven
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven