- 29 Apr, 2011 22 commits
-
-
Jon Medhurst authored
Following the change to remove support for coprocessor instructions we are left with three stub functions which can be consolidated. Signed-off-by:
Jon Medhurst <tixy@yxit.co.uk> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
Jon Medhurst authored
The kernel doesn't currently support VFP or Neon code, and probing of code with CP15 operations is fraught with bad consequences. Therefore we don't need the ability to probe coprocessor instructions and the code to support this can be removed. The removed code also had at least two bugs: - MRC into R15 should set CPSR not trash PC - LDC and STC which use PC as base register needed the address offset by 8 Signed-off-by:
Jon Medhurst <tixy@yxit.co.uk> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
Jon Medhurst authored
The USAD8 instruction wasn't being explicitly decoded leading to the incorrect emulation routine being called. It can be correctly decoded in the same way as the signed multiply instructions so we move the decoding there. Signed-off-by:
Jon Medhurst <tixy@yxit.co.uk> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
Jon Medhurst authored
The signed multiply instructions were being decoded incorrectly. Signed-off-by:
Jon Medhurst <tixy@yxit.co.uk> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
Jon Medhurst authored
These sign extension instructions are encoded as extend-and-add instructions where the register to add is specified as r15. The decoding routines weren't checking for this and were using the incorrect emulation code, giving incorrect results. Signed-off-by:
Jon Medhurst <tixy@yxit.co.uk> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
Jon Medhurst authored
The instructions space for media instructions contains some undefined patterns. We need to reject probing of these because they may in future become defined and the kprobes code may then emulate them faultily. Signed-off-by:
Jon Medhurst <tixy@yxit.co.uk> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
Jon Medhurst authored
The v6T2 RBIT instruction was accidentally being emulated correctly, this patch adds correct decoding for the instruction. Signed-off-by:
Jon Medhurst <tixy@yxit.co.uk> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
Jon Medhurst authored
These instructions are specified as UNPREDICTABLE. Signed-off-by:
Jon Medhurst <tixy@yxit.co.uk> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
Jon Medhurst authored
The decoding of these instructions got the register indexed and immediate indexed forms the wrong way around, causing incorrect emulation. Instructions like "LDRD Rx, [Rx]" were corrupting Rx because the base register writeback was being performed unconditionally, overwriting the value just loaded from memory. The fix is to only writeback the base register when that form of the instruction is used. Note, now that we reject probing writeback with PC the emulation code doesn't need the check rn!=15. Signed-off-by:
Jon Medhurst <tixy@yxit.co.uk> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
Jon Medhurst authored
Using PC as an base register with writeback is UNPREDICTABLE, as is non word-sized loads or stores of PC. (We only really care about preventing loads to PC but it keeps the code simpler if we also exclude stores.) Signed-off-by:
Jon Medhurst <tixy@yxit.co.uk> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
Jon Medhurst authored
The decoding of these instructions got the register indexed and immediate indexed forms the wrong way around, causing incorrect emulation. Signed-off-by:
Jon Medhurst <tixy@yxit.co.uk> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
Jon Medhurst authored
The emulation code for STREX and LDREX instructions is faulty, however, rather than attempting to fix this we reject probes of these instructions. We do this because they can never succeed in gaining exclusive access as the exception framework clears the exclusivity monitor when a probes breakpoint is hit. (This is a general problem when probing all instructions executing between a LDREX and its corresponding STREX and can lead to infinite retry loops.) Signed-off-by:
Jon Medhurst <tixy@yxit.co.uk> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
Jon Medhurst authored
The instructions space for 'Multiply and multiply-accumulate' instructions contains some undefined patterns. We need to reject probing of these because they may in future become defined and the kprobes code may then emulate them faultily. This has already happened with the new MLS instruction which this patch also adds correct decoding for as well as tightening up other decoding tests. (Before this patch the wrong emulation routine was being called for MLS though it still produced correct results.) Signed-off-by:
Jon Medhurst <tixy@yxit.co.uk> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
Jon Medhurst authored
Signed-off-by:
Jon Medhurst <tixy@yxit.co.uk> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
Jon Medhurst authored
Signed-off-by:
Jon Medhurst <tixy@yxit.co.uk> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
Jon Medhurst authored
The MRS instruction should set mode and interrupt bits in the read value so it is simpler to use a new simulation routine (simulate_mrs) rather than some modified emulation. prep_emulate_rd12 is now unused and removed. Signed-off-by:
Jon Medhurst <tixy@yxit.co.uk> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
Jon Medhurst authored
We need to reject probing of instructions which read SPSR because we can't handle this as the value in SPSR is lost when the exception handler for the probe breakpoint first runs. This patch also fixes the bitmask for MRS instructions decoding to include checking bits 5-7. Signed-off-by:
Jon Medhurst <tixy@yxit.co.uk> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
Jon Medhurst authored
Emulation of instructions like "ADD rd, rn, #<const>" would result in a corrupted value for rd. Signed-off-by:
Jon Medhurst <tixy@yxit.co.uk> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
Jon Medhurst authored
Probing these instructions was corrupting R0 because the emulation code didn't account for the fact that they don't write a result to a register. Signed-off-by:
Jon Medhurst <tixy@yxit.co.uk> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
Jon Medhurst authored
Now we have the framework code handling conditionally executed instructions we can remove redundant checks in individual simulation routines. Signed-off-by:
Jon Medhurst <tixy@yxit.co.uk> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
Jon Medhurst authored
When a kprobe is placed onto conditionally executed ARM instructions, many of the emulation routines used to single step them produce corrupt register results. Rather than fix all of these cases we modify the framework which calls them to test the relevant condition flags and, if the test fails, skip calling the emulation code. Signed-off-by:
Jon Medhurst <tixy@yxit.co.uk> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
Viktor Rosendahl authored
Currently emulate_ldrd and emulate_strd don't even have the adjustment of the PC value, so in case of Rn == PC, it will not update the PC incorrectly but instead load/store from the wrong address. Let's add both the adjustment of the PC value and the check for PC == PC. Signed-off-by:
Viktor Rosendahl <viktor.rosendahl@nokia.com> Signed-off-by:
Nicolas Pitre <nicolas.pitre@linaro.org>
-
- 06 Apr, 2011 1 commit
-
-
Linus Torvalds authored
-
- 05 Apr, 2011 17 commits
-
-
git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-2.6-blockLinus Torvalds authored
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-2.6-block: ide: always ensure that blk_delay_queue() is called if we have pending IO block: fix request sorting at unplug dm: improve block integrity support fs: export empty_aops ide: ide_requeue_and_plug() reinstate "always plug" behaviour blk-throttle: don't call xchg on bool ufs: remove unessecary blk_flush_plug block: make the flush insertion use the tail of the dispatch list block: get rid of elv_insert() interface block: dump request state on seeing a corrupted request completion
-
Eric Paris authored
On an error path in inotify_init1 a normal user can trigger a double free of struct user. This is a regression introduced by a2ae4cc9 ("inotify: stop kernel memory leak on file creation failure"). We fix this by making sure that if a group exists the user reference is dropped when the group is cleaned up. We should not explictly drop the reference on error and also drop the reference when the group is cleaned up. The new lifetime rules are that an inotify group lives from inotify_new_group to the last fsnotify_put_group. Since the struct user and inotify_devs are directly tied to this lifetime they are only changed/updated in those two locations. We get rid of all special casing of struct user or user->inotify_devs. Signed-off-by:
Eric Paris <eparis@redhat.com> Cc: stable@kernel.org (2.6.37 and up) Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Jens Axboe authored
Just because we are not requeuing a request does not mean that some aren't pending. So always issue a blk_delay_queue() if either we are requeueing OR there's pending IO. This fixes a boot problem for some IDE boxes. Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Konstantin Khlebnikov authored
Comparison function for list_sort() must be anticommutative, otherwise it is not sorting in ordinary meaning. But fortunately list_sort() always check ((*cmp)(priv, a, b) <= 0) it not distinguish negative and zero, so comparison function can implement only less-or-equal instead of full three-way comparison. Signed-off-by:
Konstantin Khlebnikov <khlebnikov@openvz.org> Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Mike Snitzer authored
The current block integrity (DIF/DIX) support in DM is verifying that all devices' integrity profiles match during DM device resume (which is past the point of no return). To some degree that is unavoidable (stacked DM devices force this late checking). But for most DM devices (which aren't stacking on other DM devices) the ideal time to verify all integrity profiles match is during table load. Introduce the notion of an "initialized" integrity profile: a profile that was blk_integrity_register()'d with a non-NULL 'blk_integrity' template. Add blk_integrity_is_initialized() to allow checking if a profile was initialized. Update DM integrity support to: - check all devices with _initialized_ integrity profiles match during table load; uninitialized profiles (e.g. for underlying DM device(s) of a stacked DM device) are ignored. - disallow a table load that would result in an integrity profile that conflicts with a DM device's existing (in-use) integrity profile - avoid clearing an existing integrity profile - validate all integrity profiles match during resume; but if they don't all we can do is report the mismatch (during resume we're past the point of no return) Signed-off-by:
Mike Snitzer <snitzer@redhat.com> Cc: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Jens Axboe authored
With the ->sync_page() hook gone, we have a few users that add their own static address_space_operations without any functions defined. fs/inode.c already has an empty_aops that it uses for init purposes. Lets export that and use it in the places where an otherwise empty aops was defined. Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Jens Axboe authored
We see stalls if we don't always ensure that the queue gets run again. Even if rq == NULL, we could have other pending requests in the queue. Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Andreas Schwab authored
xchg does not work portably with smaller than 32bit types. Signed-off-by:
Andreas Schwab <schwab@linux-m68k.org> Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Christoph Hellwig authored
We already flush the per-process plugging list when context switching, so a blk_flush_plug call just before a yield() is not needed. Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Jens Axboe authored
It's not a preempt type request, in fact we have to insert it behind requests that do specify INSERT_FRONT. Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Jens Axboe authored
Merge it with __elv_add_request(), it's pretty pointless to have a function with only two callers. The main interface is elv_add_request()/__elv_add_request(). Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Jens Axboe authored
Currently we just dump a non-informative 'request botched' message. Lets actually try and print something sane to help debug issues around this. Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6Linus Torvalds authored
* 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6: drm/i915/lvds: Remove 0xa0 DDC probe for LVDS drm/i915/crt: Remove 0xa0 probe for VGA
-
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds authored
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: rpckbd - fix a leak of the IRQ during init failure Input: wacom - add support for Lenovo tablet ID (0xE6) Input: i8042 - downgrade selftest error message to dbg() Input: synaptics - fix crash in synaptics_module_init() Input: spear-keyboard - fix inverted condition in interrupt handler Input: uinput - allow for 0/0 min/max on absolute axes. Input: sparse-keymap - report KEY_UNKNOWN for unknown scan codes Input: sparse-keymap - report scancodes with key events Input: h3600_ts_input - fix a spelling error Input: wacom - report resolution for pen devices Input: wacom - constify wacom_features for a new missed Bamboo models
-
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpcLinus Torvalds authored
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc/pseries: Fix build without CONFIG_HOTPLUG_CPU powerpc: Set nr_cpu_ids early and use it to free PACAs powerpc/pseries: Don't register global initcall powerpc/kexec: Fix mismatched ifdefs for PPC64/SMP. edac/mpc85xx: Limit setting/clearing of HID1[RFXE] to e500v1/v2 cores powerpc/85xx: Update dts for PCIe memory maps to match u-boot of Px020RDB
-
git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstableLinus Torvalds authored
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: Btrfs: don't warn in btrfs_add_orphan Btrfs: fix free space cache when there are pinned extents and clusters V2 Btrfs: Fix uninitialized root flags for subvolumes btrfs: clear __GFP_FS flag in the space cache inode Btrfs: fix memory leak in start_transaction() Btrfs: fix memory leak in btrfs_ioctl_start_sync() Btrfs: fix subvol_sem leak in btrfs_rename() Btrfs: Fix oops for defrag with compression turned on Btrfs: fix /proc/mounts info. Btrfs: fix compiler warning in file.c
-
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds authored
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (27 commits) ipv6: Don't pass invalid dst_entry pointer to dst_release(). mlx4: fix kfree on error path in new_steering_entry() tcp: len check is unnecessarily devastating, change to WARN_ON sctp: malloc enough room for asconf-ack chunk sctp: fix auth_hmacs field's length of struct sctp_cookie net: Fix dev dev_ethtool_get_rx_csum() for forced NETIF_F_RXCSUM usbnet: use eth%d name for known ethernet devices starfire: clean up dma_addr_t size test iwlegacy: fix bugs in change_interface carl9170: Fix tx aggregation problems with some clients iwl3945: disable hw scan by default wireless: rt2x00: rt2800usb.c add and identify ids iwl3945: do not deprecate software scan mac80211: fix aggregation frame release during timeout cfg80211: fix BSS double-unlinking (continued) cfg80211:: fix possible NULL pointer dereference mac80211: fix possible NULL pointer dereference mac80211: fix NULL pointer dereference in ieee80211_key_alloc() ath9k: fix a chip wakeup related crash in ath9k_start mac80211: fix a crash in minstrel_ht in HT mode with no supported MCS rates ...
-