1. 26 Jan, 2008 10 commits
    • Nicolas Pitre's avatar
      ARM kprobes: special hook for the kprobes breakpoint handler · 79696910
      Nicolas Pitre authored
      The kprobes code is already able to cope with reentrant probes, so its
      handler must be called outside of the region protected by undef_lock.
      
      If ever this lock is released when handlers are called then this commit
      could be reverted.
      Signed-off-by: default avatarNicolas Pitre <nico@marvell.com>
      79696910
    • Nicolas Pitre's avatar
    • Nicolas Pitre's avatar
      ARM kprobes: don't let a single-stepped stmdb corrupt the exception stack · d30a0c8b
      Nicolas Pitre authored
      If kprobes installs a breakpoint on a "stmdb sp!, {...}" instruction,
      and then single-step it by simulation from the exception context, it will
      corrupt the saved regs on the stack from the previous context.
      
      To avoid this, let's add an optional parameter to the svc_entry macro
      allowing for a hole to be created on the stack before saving the
      interrupted context, and use it in the undef_svc handler when kprobes
      is enabled.
      Signed-off-by: default avatarNicolas Pitre <nico@marvell.com>
      d30a0c8b
    • Nicolas Pitre's avatar
    • Abhishek Sagar's avatar
      ARM kprobes: core code · 24ba613c
      Abhishek Sagar authored
      This is a full implementation of Kprobes including Jprobes and
      Kretprobes support.
      
      This ARM implementation does not follow the usual kprobes double-
      exception model. The traditional model is where the initial kprobes
      breakpoint calls kprobe_handler(), which returns from exception to
      execute the instruction in its original context, then immediately
      re-enters after a second breakpoint (or single-stepping exception)
      into post_kprobe_handler(), each time the probe is hit..  The ARM
      implementation only executes one kprobes exception per hit, so no
      post_kprobe_handler() phase. All side-effects from the kprobe'd
      instruction are resolved before returning from the initial exception.
      As a result, all instructions are _always_ effectively boosted
      regardless of the type of instruction, and even regardless of whether
      or not there is a post-handler for the probe.
      Signed-off-by: default avatarAbhishek Sagar <sagar.abhishek@gmail.com>
      Signed-off-by: default avatarQuentin Barnes <qbarnes@gmail.com>
      Signed-off-by: default avatarNicolas Pitre <nico@marvell.com>
      24ba613c
    • Quentin Barnes's avatar
      ARM kprobes: instruction single-stepping support · 35aa1df4
      Quentin Barnes authored
      This is the code implementing instruction single-stepping for kprobes
      on ARM.
      
      To get around the limitation of no Next-PC and no hardware single-
      stepping, all kprobe'd instructions are split into three camps:
      simulation, emulation, and rejected. "Simulated" instructions are
      those instructions which behavior is reproduced by straight C code.
      "Emulated" instructions are ones that are copied, slightly altered
      and executed directly in the instruction slot to reproduce their
      behavior.  "Rejected" instructions are ones that could be simulated,
      but work hasn't been put into simulating them. These instructions
      should be very rare, if not unencountered, in the kernel. If ever
      needed, code could be added to simulate them.
      
      One might wonder why this and the ptrace singlestep facility are not
      sharing some code.  Both approaches are fundamentally different because
      the ptrace code regains control after the stepped instruction by installing
      a breakpoint after the instruction itself, and possibly at the location
      where the instruction might be branching to, instead of simulating or
      emulating the target instruction.
      
      The ptrace approach isn't suitable for kprobes because the breakpoints
      would have to be moved back, and the icache flushed, everytime the
      probe is hit to let normal code execution resume, which would have a
      significant performance impact. It is also racy on SMP since another
      CPU could, with the right timing, sail through the probe point without
      being caught.  Because ptrace single-stepping always result in a
      different process to be scheduled, the concern for performance is much
      less significant.
      
      On the other hand, the kprobes approach isn't (currently) suitable for
      ptrace because it has no provision for proper user space memory
      protection and translation, and even if that was implemented, the gain
      wouldn't be worth the added complexity in the ptrace path compared to
      the current approach.
      
      So, until kprobes does support user space, both kprobes and ptrace are
      best kept independent and separate.
      Signed-off-by: default avatarQuentin Barnes <qbarnes@gmail.com>
      Signed-off-by: default avatarAbhishek Sagar <sagar.abhishek@gmail.com>
      Signed-off-by: default avatarNicolas Pitre <nico@marvell.com>
      35aa1df4
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 · 9b73e76f
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (200 commits)
        [SCSI] usbstorage: use last_sector_bug flag universally
        [SCSI] libsas: abstract STP task status into a function
        [SCSI] ultrastor: clean up inline asm warnings
        [SCSI] aic7xxx: fix firmware build
        [SCSI] aacraid: fib context lock for management ioctls
        [SCSI] ch: remove forward declarations
        [SCSI] ch: fix device minor number management bug
        [SCSI] ch: handle class_device_create failure properly
        [SCSI] NCR5380: fix section mismatch
        [SCSI] sg: fix /proc/scsi/sg/devices when no SCSI devices
        [SCSI] IB/iSER: add logical unit reset support
        [SCSI] don't use __GFP_DMA for sense buffers if not required
        [SCSI] use dynamically allocated sense buffer
        [SCSI] scsi.h: add macro for enclosure bit of inquiry data
        [SCSI] sd: add fix for devices with last sector access problems
        [SCSI] fix pcmcia compile problem
        [SCSI] aacraid: add Voodoo Lite class of cards.
        [SCSI] aacraid: add new driver features flags
        [SCSI] qla2xxx: Update version number to 8.02.00-k7.
        [SCSI] qla2xxx: Issue correct MBC_INITIALIZE_FIRMWARE command.
        ...
      9b73e76f
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 50d9a126
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        [CRYPTO] hifn795x: Disallow built-in hifn795x when HW_RANDOM is m
      50d9a126
    • Linus Torvalds's avatar
      Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2 · 29bd17af
      Linus Torvalds authored
      * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2: (31 commits)
        ocfs2: clean up bh null checks
        ocfs2: document access rules for blocked_lock_list
        configfs: file.c fix possible recursive locking
        configfs: dir.c fix possible recursive locking
        configfs: Remove EXPERIMENTAL
        ocfs2: bump version number
        ocfs2/dlm: Clear joining_node on hearbeat node down
        ocfs2: convert byte order of constant instead of variable
        ocfs2: Update default cluster timeouts
        ocfs2: printf fixes
        ocfs2: Use generic_file_llseek
        ocfs2: Safer read_inline_data()
        ocfs2: Silence false lockdep warnings
        [PATCH 2/2] ocfs2: cluster aware flock()
        [PATCH 1/2] ocfs2: add flock lock type
        ocfs2: Local alloc window size changeable via mount option
        ocfs2: Support commit= mount option
        ocfs2: Add missing permission checks
        [PATCH 2/2] ocfs2: Implement group add for online resize
        [PATCH 1/2] ocfs2: Add group extend for online resize
        ...
      29bd17af
    • Linus Torvalds's avatar
      Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev · 2ba14a01
      Linus Torvalds authored
      * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: (67 commits)
        fix drivers/ata/sata_fsl.c double-decl
        [libata] Prefer SCSI_SENSE_BUFFERSIZE to sizeof()
        pata_legacy: Merge winbond support
        ata_generic: Cenatek support
        pata_winbond: error return
        pata_serverworks: Fix cable types and cosmetics
        pata_mpc52xx: remove un-needed assignment
        libata: fix off-by-one in error categorization
        ahci: factor out AHCI enabling and enable AHCI before reading CAP
        ata_piix: implement SIDPR SCR access
        ata_piix: convert to prepare - activate initialization
        libata: factor out ata_pci_activate_sff_host() from ata_pci_one()
        [libata] Prefer SCSI_SENSE_BUFFERSIZE to sizeof()
        pata_legacy: resychronize with upstream changes and resubmit
        [libata] pata_legacy: typo fix
        [libata] pata_winbond: update for new ->data_xfer hook
        pata_pcmcia: convert to new data_xfer prototype
        libata annotations and fixes
        libata: use dev_driver_string() instead of "libata" in libata-sff.c
        ata_piix: kill unused constants and flags
        ...
      2ba14a01
  2. 25 Jan, 2008 30 commits