17 Oct, 2007

3 commits

  • Introduce architecture dependent kretprobe blacklists to prohibit users
    from inserting return probes on the function in which kprobes can be
    inserted but kretprobes can not.

    This patch also removes "__kprobes" mark from "__switch_to" on x86_64 and
    registers "__switch_to" to the blacklist on x86-64, because that mark is to
    prohibit user from inserting only kretprobe.

    Signed-off-by: Masami Hiramatsu
    Cc: Prasanna S Panchamukhi
    Acked-by: Ananth N Mavinakayanahalli
    Cc: Anil S Keshavamurthy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masami Hiramatsu
     
  • We have had complaints where a threaded application is left in a bad state
    after one of it's threads is killed when we hit a VM: out_of_memory
    condition.

    Killing just one of the process threads can leave the application in a bad
    state, whereas killing the entire process group would allow for the
    application to restart, or be otherwise handled, and makes it very obvious
    that something has gone wrong.

    This change allows the entire process group to be taken down, rather
    than just the one thread.

    Signed-off-by: Will Schmidt
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Russell King
    Cc: Ian Molton
    Cc: Haavard Skinnemoen
    Cc: Mikael Starvik
    Cc: David Howells
    Cc: Andi Kleen
    Cc: "Luck, Tony"
    Cc: Hirokazu Takata
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Cc: Ralf Baechle
    Cc: Kyle McMartin
    Cc: Matthew Wilcox
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Cc: Kazumoto Kojima
    Cc: Richard Curnow
    Cc: William Lee Irwin III
    Cc: "David S. Miller"
    Cc: Chris Zankel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Will Schmidt
     
  • Identical handlers of PTRACE_DETACH go into ptrace_request().
    Not touching compat code.
    Not touching archs that don't call ptrace_request.

    Signed-off-by: Alexey Dobriyan
    Acked-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

12 Oct, 2007

11 commits

  • Run the lockdep_sys_exit hook before returning to user space.

    Reviewed-by: Martin Schwidefsky
    Signed-off-by: Heiko Carstens
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Ingo Molnar

    Heiko Carstens
     
  • Make sure parameter list of the pfault token function is eight byte
    aligned. Otherwise we can get specification exceptions.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • Replace the hardcoded 4096 value with the PAGE_SIZE macro.
    Converted a few decimal numbers to readable hex numbers.

    Use of PAGE_SIZE required a small change to page.h
    to allow PAGE_SIZE to be used from assembler/linker scripts.

    Signed-off-by: Sam Ravnborg
    Signed-off-by: Martin Schwidefsky

    Sam Ravnborg
     
  • Introduce a consistent style in vmlinux.lds.
    This style is gradually being introduced for all archs.

    A few lables were moved inside the section definition so
    they are assigned the correct value of gcc decide to align
    the content to another address than the one . has.
    In the past this has fixed several bugs but for s390 it
    will not impact due to all the alignmnet already introduced.

    Stabs definitions are consolidated in asm-generic/vmlinux.lds.h
    This patch also introduce support for DWARF - without knowing
    if this makes sense for s390.

    Signed-off-by: Sam Ravnborg
    Signed-off-by: Martin Schwidefsky

    Sam Ravnborg
     
  • After assigning values to specific registers memset was called. This
    may clobber the contents of the used registers.
    To solve this extract the two used inline assemblies into small
    functions that don't call any functions.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • If we use the CLEAR ipl option, reipl is faster, since then VM can release
    the memory, which has been paged out.

    Signed-off-by: Michael Holzheu
    Signed-off-by: Martin Schwidefsky

    Michael Holzheu
     
  • Also removes a bunch of ^L in drivers/s390/cio/cmf.c

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • There is no need to assign "0" to "hops" twice. Remove one assigment.

    Signed-off-by: Christian Borntraeger
    Signed-off-by: Martin Schwidefsky

    Christian Borntraeger
     
  • The termination condition of the loop that prints the operands of
    an instruction doesn't stop after the maximum of 6 operands.
    It continues with the operands of the next instruction format
    instead which create really long lines.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • arch/s390/Kconfig tells us that CONFIG_APPLDATA_BASE is bool and hence can
    never be built modular. Given this, defining appldata_exit() function is
    pointless (and wasteful, actually). Remove all that.

    Previous patch annotated appldata_offline_cpu() as __cpuexit, but now with the
    __exit function appldata_exit() gone, the only callsite that references it is
    __cpuinit, so this function can also be __cpuinit, thereby saving space when
    HOTPLUG_CPU=n.

    Signed-off-by: Satyam Sharma
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Martin Schwidefsky

    Satyam Sharma
     
  • appldata_offline_cpu() is only called from __cpuinit-marked hotplug
    notifier callback and from the __exit-marked module_exit function,
    therefore candidate for __cpuexit.

    BTW the __exit module_exit function appldata_exit() of this driver fails to
    unregister_hotcpu_notifier() the notifier_block that was registered by
    appldata_init() during module startup. This will lead to oops if hotplug
    notification comes after module has been unloaded. Let's fix this by
    unregistering the notifier appropriately (before appldata_offline_cpu()'ing
    the CPUs).

    Signed-off-by: Satyam Sharma
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Martin Schwidefsky

    Satyam Sharma
     

11 Oct, 2007

5 commits

  • There are currently several SHA implementations that all define their own
    initialization vectors and size values. Since this values are idential
    move them to a header file under include/crypto.

    Signed-off-by: Jan Glauber
    Signed-off-by: Herbert Xu

    Jan Glauber
     
  • Loading the crypto algorithm by the alias instead of by module directly
    has the advantage that all possible implementations of this algorithm
    are loaded automatically and the crypto API can choose the best one
    depending on its priority.

    Additionally it ensures that the generic implementation as well as the
    HW driver (if available) is loaded in case the HW driver needs the
    generic version as fallback in corner cases.

    Also remove the probe for sha1 in padlock's init code.

    Quote from Herbert:
    The probe is actually pointless since we can always probe when
    the algorithm is actually used which does not lead to dead-locks
    like this.

    Signed-off-by: Sebastian Siewior
    Signed-off-by: Herbert Xu

    Sebastian Siewior
     
  • Loading the crypto algorithm by the alias instead of by module directly
    has the advantage that all possible implementations of this algorithm
    are loaded automatically and the crypto API can choose the best one
    depending on its priority.

    Additionally it ensures that the generic implementation as well as the
    HW driver (if available) is loaded in case the HW driver needs the
    generic version as fallback in corner cases.

    Signed-off-by: Sebastian Siewior
    Signed-off-by: Herbert Xu

    Sebastian Siewior
     
  • This patch makes most of the generic device layer network
    namespace safe. This patch makes dev_base_head a
    network namespace variable, and then it picks up
    a few associated variables. The functions:
    dev_getbyhwaddr
    dev_getfirsthwbytype
    dev_get_by_flags
    dev_get_by_name
    __dev_get_by_name
    dev_get_by_index
    __dev_get_by_index
    dev_ioctl
    dev_ethtool
    dev_load
    wireless_process_ioctl

    were modified to take a network namespace argument, and
    deal with it.

    vlan_ioctl_set and brioctl_set were modified so their
    hooks will receive a network namespace argument.

    So basically anthing in the core of the network stack that was
    affected to by the change of dev_base was modified to handle
    multiple network namespaces. The rest of the network stack was
    simply modified to explicitly use &init_net the initial network
    namespace. This can be fixed when those components of the network
    stack are modified to handle multiple network namespaces.

    For now the ifindex generator is left global.

    Fundametally ifindex numbers are per namespace, or else
    we will have corner case problems with migration when
    we get that far.

    At the same time there are assumptions in the network stack
    that the ifindex of a network device won't change. Making
    the ifindex number global seems a good compromise until
    the network stack can cope with ifindex changes when
    you change namespaces, and the like.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: David S. Miller

    Eric W. Biederman
     
  • As noted by Christoph Hellwig, pktgen was the only user so
    it can now be removed.

    [ Add missing cases caught by Adrian Bunk. -DaveM ]

    Signed-off-by: Robert Olsson
    Signed-off-by: David S. Miller

    Robert Olsson
     

22 Aug, 2007

4 commits

  • Placing a kprobe on "bc" instruction (s390/s390x) can cause an oops.
    The instruction length is encoded into the first two bits of the s390
    instruction. Kprobe is incorrectly computing the instruction length.
    The instruction length is used for determining what type of "fix-up" is
    needed for conditional branch instruction. The problem can bee seen by
    placing a kprobe on a "bc" instruction that will not branch. The
    results is that Kprobe incorrectly computes the new instruction
    pointer (psw.addr) after single stepping the instruction. The problem
    is corrected with this patch.

    Signed-off-by: David Wilder
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Heiko Carstens

    David Wilder
     
  • hypfs removes the whole hypfs directory tree and creates a new one, when a
    process triggers an update by writing to the "update" attribute. When removing
    and creating files, it is necessary to lock the inode of the parent directory
    where the files live. Currently hypfs does not lock the parent inode, which
    can lead to inode corruption. This patch:
    * Introduces correct locking
    * Fixes i_nlink reference counting for inodes, when creating directories
    * Adds info printk, when hypfs filesystem has been mounted

    Signed-off-by: Michael Holzheu
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Heiko Carstens

    Michael Holzheu
     
  • The instruction table for b2 opcodes was missing an opfrag value
    for the cpya instruction. All instructions specified after cpya
    were not considered by the disassembler. The fix is simple and
    obvious - add the opfrag field to the cpya instruction.

    Signed-off-by: Christian Borntraeger
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Heiko Carstens

    Christian Borntraeger
     
  • There are several s390 diagnose calls, which must be executed below the
    2GB memory boundary. In order to enforce this, those diagnoses must be
    compiled into the kernel. Currently diag 14 can be called within the
    vmur kernel module from addresses above 2GB. This leads to specification
    exceptions. This patch moves diag10, diag14 and diag210 into the new
    diag.c file.

    Signed-off-by: Michael Holzheu
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Heiko Carstens

    Michael Holzheu
     

10 Aug, 2007

2 commits


30 Jul, 2007

1 commit

  • Remove fs.h from mm.h. For this,
    1) Uninline vma_wants_writenotify(). It's pretty huge anyway.
    2) Add back fs.h or less bloated headers (err.h) to files that need it.

    As result, on x86_64 allyesconfig, fs.h dependencies cut down from 3929 files
    rebuilt down to 3444 (-12.3%).

    Cross-compile tested without regressions on my two usual configs and (sigh):

    alpha arm-mx1ads mips-bigsur powerpc-ebony
    alpha-allnoconfig arm-neponset mips-capcella powerpc-g5
    alpha-defconfig arm-netwinder mips-cobalt powerpc-holly
    alpha-up arm-netx mips-db1000 powerpc-iseries
    arm arm-ns9xxx mips-db1100 powerpc-linkstation
    arm-assabet arm-omap_h2_1610 mips-db1200 powerpc-lite5200
    arm-at91rm9200dk arm-onearm mips-db1500 powerpc-maple
    arm-at91rm9200ek arm-picotux200 mips-db1550 powerpc-mpc7448_hpc2
    arm-at91sam9260ek arm-pleb mips-ddb5477 powerpc-mpc8272_ads
    arm-at91sam9261ek arm-pnx4008 mips-decstation powerpc-mpc8313_rdb
    arm-at91sam9263ek arm-pxa255-idp mips-e55 powerpc-mpc832x_mds
    arm-at91sam9rlek arm-realview mips-emma2rh powerpc-mpc832x_rdb
    arm-ateb9200 arm-realview-smp mips-excite powerpc-mpc834x_itx
    arm-badge4 arm-rpc mips-fulong powerpc-mpc834x_itxgp
    arm-carmeva arm-s3c2410 mips-ip22 powerpc-mpc834x_mds
    arm-cerfcube arm-shannon mips-ip27 powerpc-mpc836x_mds
    arm-clps7500 arm-shark mips-ip32 powerpc-mpc8540_ads
    arm-collie arm-simpad mips-jazz powerpc-mpc8544_ds
    arm-corgi arm-spitz mips-jmr3927 powerpc-mpc8560_ads
    arm-csb337 arm-trizeps4 mips-malta powerpc-mpc8568mds
    arm-csb637 arm-versatile mips-mipssim powerpc-mpc85xx_cds
    arm-ebsa110 i386 mips-mpc30x powerpc-mpc8641_hpcn
    arm-edb7211 i386-allnoconfig mips-msp71xx powerpc-mpc866_ads
    arm-em_x270 i386-defconfig mips-ocelot powerpc-mpc885_ads
    arm-ep93xx i386-up mips-pb1100 powerpc-pasemi
    arm-footbridge ia64 mips-pb1500 powerpc-pmac32
    arm-fortunet ia64-allnoconfig mips-pb1550 powerpc-ppc64
    arm-h3600 ia64-bigsur mips-pnx8550-jbs powerpc-prpmc2800
    arm-h7201 ia64-defconfig mips-pnx8550-stb810 powerpc-ps3
    arm-h7202 ia64-gensparse mips-qemu powerpc-pseries
    arm-hackkit ia64-sim mips-rbhma4200 powerpc-up
    arm-integrator ia64-sn2 mips-rbhma4500 s390
    arm-iop13xx ia64-tiger mips-rm200 s390-allnoconfig
    arm-iop32x ia64-up mips-sb1250-swarm s390-defconfig
    arm-iop33x ia64-zx1 mips-sead s390-up
    arm-ixp2000 m68k mips-tb0219 sparc
    arm-ixp23xx m68k-amiga mips-tb0226 sparc-allnoconfig
    arm-ixp4xx m68k-apollo mips-tb0287 sparc-defconfig
    arm-jornada720 m68k-atari mips-workpad sparc-up
    arm-kafa m68k-bvme6000 mips-wrppmc sparc64
    arm-kb9202 m68k-hp300 mips-yosemite sparc64-allnoconfig
    arm-ks8695 m68k-mac parisc sparc64-defconfig
    arm-lart m68k-mvme147 parisc-allnoconfig sparc64-up
    arm-lpd270 m68k-mvme16x parisc-defconfig um-x86_64
    arm-lpd7a400 m68k-q40 parisc-up x86_64
    arm-lpd7a404 m68k-sun3 powerpc x86_64-allnoconfig
    arm-lubbock m68k-sun3x powerpc-cell x86_64-defconfig
    arm-lusl7200 mips powerpc-celleb x86_64-up
    arm-mainstone mips-atlas powerpc-chrp32

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

27 Jul, 2007

5 commits

  • If a machine check is pending and the external or I/O interrupt handler
    returns to userspace io_mcck_pending is going to call s390_handle_mcck.
    Before this happens a call to TRACE_IRQS_ON was already made since we
    know that we are going back to userspace and hence interrupts will be
    enabled. So there was an indication that interrupts are enabled while
    in reality they are still disabled.
    s390_handle_mcck will do a local_irq_save/restore pair and confuse
    lockdep which later complains about inconsistent irq tracing.
    To solve this just call trace_hardirqs_off before calling
    s390_handle_mcck and trace_hardirqs_on afterwards.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • This patch implements support of fallocate system call on s390(x)
    platform. A wrapper is added to address the issue which s390 ABI has with
    the arguments of this system call.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • There is no need to disable bottom halves when holding call_lock. Also
    this could imply that it is legal to call smp_call_function* from
    bh context, which it is not.
    Also test if func will be executed locally before disabling
    and aterwards enabling interrupts again. It's not necessary to disable
    and enable interrupts each time __smp_call_function_map gets called.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • smp_call_function_single now has the same semantics as s390's
    smp_call_function_on. Therefore convert to the *single variant
    and get rid of some architecture specific code.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

20 Jul, 2007

3 commits

  • This changes the s390 linker script to use the asm-generic NOTES macro so that
    ELF note sections with SHF_ALLOC set are linked into the kernel image along
    with other read-only data. The PT_NOTE also points to their location.

    This paves the way for putting useful build-time information into ELF notes
    that can be found easily later in a kernel memory dump.

    Signed-off-by: Roland McGrath
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • per cpu data section contains two types of data. One set which is
    exclusively accessed by the local cpu and the other set which is per cpu,
    but also shared by remote cpus. In the current kernel, these two sets are
    not clearely separated out. This can potentially cause the same data
    cacheline shared between the two sets of data, which will result in
    unnecessary bouncing of the cacheline between cpus.

    One way to fix the problem is to cacheline align the remotely accessed per
    cpu data, both at the beginning and at the end. Because of the padding at
    both ends, this will likely cause some memory wastage and also the
    interface to achieve this is not clean.

    This patch:

    Moves the remotely accessed per cpu data (which is currently marked
    as ____cacheline_aligned_in_smp) into a different section, where all the data
    elements are cacheline aligned. And as such, this differentiates the local
    only data and remotely accessed data cleanly.

    Signed-off-by: Fenghua Yu
    Acked-by: Suresh Siddha
    Cc: Rusty Russell
    Cc: Christoph Lameter
    Cc:
    Cc: "Luck, Tony"
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fenghua Yu
     
  • This patch completes Linus's wish that the fault return codes be made into
    bit flags, which I agree makes everything nicer. This requires requires
    all handle_mm_fault callers to be modified (possibly the modifications
    should go further and do things like fault accounting in handle_mm_fault --
    however that would be for another patch).

    [akpm@linux-foundation.org: fix alpha build]
    [akpm@linux-foundation.org: fix s390 build]
    [akpm@linux-foundation.org: fix sparc build]
    [akpm@linux-foundation.org: fix sparc64 build]
    [akpm@linux-foundation.org: fix ia64 build]
    Signed-off-by: Nick Piggin
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Russell King
    Cc: Ian Molton
    Cc: Bryan Wu
    Cc: Mikael Starvik
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: "Luck, Tony"
    Cc: Hirokazu Takata
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Cc: Greg Ungerer
    Cc: Matthew Wilcox
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Cc: Kazumoto Kojima
    Cc: Richard Curnow
    Cc: William Lee Irwin III
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Cc: Miles Bader
    Cc: Chris Zankel
    Acked-by: Kyle McMartin
    Acked-by: Haavard Skinnemoen
    Acked-by: Ralf Baechle
    Acked-by: Andi Kleen
    Signed-off-by: Andrew Morton
    [ Still apparently needs some ARM and PPC loving - Linus ]
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

18 Jul, 2007

4 commits

  • * 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
    [S390] Fix broken logic, SIGA flags must be bitwise ORed
    [S390] cio: Dont print trailing \0 in modalias_show().
    [S390] Simplify stack trace.
    [S390] z/VM unit record device driver
    [S390] vmcp cleanup
    [S390] qdio: output queue stall on FCP and network devices
    [S390] Fix disassembly of RX_URRD, SI_URD & PC-relative instructions.
    [S390] Update default configuration.

    Linus Torvalds
     
  • Identical implementations of PTRACE_POKEDATA go into generic_ptrace_pokedata()
    function.

    AFAICS, fix bug on xtensa where successful PTRACE_POKEDATA will nevertheless
    return EPERM.

    Signed-off-by: Alexey Dobriyan
    Cc: Christoph Hellwig
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Identical implementations of PTRACE_PEEKDATA go into generic_ptrace_peekdata()
    function.

    Signed-off-by: Alexey Dobriyan
    Cc: Christoph Hellwig
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • If the kernel OOPSed or BUGed then it probably should be considered as
    tainted. Thus, all subsequent OOPSes and SysRq dumps will report the
    tainted kernel. This saves a lot of time explaining oddities in the
    calltraces.

    Signed-off-by: Pavel Emelianov
    Acked-by: Randy Dunlap
    Cc:
    Signed-off-by: Andrew Morton
    [ Added parisc patch from Matthew Wilson -Linus ]
    Signed-off-by: Linus Torvalds

    Pavel Emelianov
     

17 Jul, 2007

2 commits

  • sparse gives us a few of these:
    stacktrace.c:69:38: warning: incorrect type in argument 2
    (different signedness)
    stacktrace.c:69:38: expected unsigned int *skip

    Just get rid of the 'skip' argument since it is contained in the
    struct stack_trace that gets passed anyway.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • z/VM Unit record character device driver to access VM reader, punch,
    and printer.

    Signed-off-by: Frank Munzert
    Signed-off-by: Martin Schwidefsky

    Frank Munzert