summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* target: remove the task_lba field in struct se_taskChristoph Hellwig2012-05-075-13/+14
| | | | | | | | | | Now that we don't split commands the lba field in the task is always equivalent to the one in the CDB, even in cases where we have two tasks due to a BIDI transfer. Just refer the the lba in the command instead of duplicating it in the task. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: remove target_get_task_cdbChristoph Hellwig2012-05-073-52/+2Star
| | | | | | | | | | Now that tasks are always the same size as the command there is no need to rewrite a CDB in common code. Notw that we keep the separately allocated CDB in the pscsi and stgt backends for now, to easy reintroducing any command splitting local to these backends if nessecary. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: remove the unused transport_limit_task_sectors helperChristoph Hellwig2012-05-071-15/+0Star
| | | | | Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: Handle GET_EVENT_STATUS_NOTIFICATION passthroughStefan Hajnoczi2012-05-071-0/+4
| | | | | | | | | | | The SCSI MMC GET_EVENT_STATUS_NOTIFICATION command can be used to find out about media change, among other things. This patch adds it to the command sequencer so that PSCSI CD-ROM passthrough works with modern Linux guests that issue this command. Tested-by: Cong Meng <mengcong@cn.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target/iscsi: cleanup some allocation style issuesDan Carpenter2012-05-071-10/+10
| | | | | | | | | | | | We can use kcalloc() here instead of kzalloc(). It's better style and it has overflow checking built in. Also -ENOMEM is the correct error code for allocation errors. -1 means -EPERM. None of the callers preserve the error codes so it doesn't matter except as a cleanup. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target/iscsi: Go back to core allocating data buffer for cmdAndy Grover2012-04-153-80/+6Star
| | | | | | | | | | | | | We originally changed iscsi to allocate its own buffers just as an intermediate step to clean up some core buffer allocation mechanisms. Now we can put it back. Also had to change allocate_iovecs to use data_length instead of t_data_nents because iovecs are now allocated before the data buffer, thus t_data_nents is not yet initialized. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: Call core_alua_check_nonop_delay in target_submit_cmd()Andy Grover2012-04-151-0/+7
| | | | | | | | It appears iscsi is the only one to call this in its cmd submit path, but it appears to be applicable to all fabrics, and should always be called. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target/iscsi: Fold _decide_list_to_build into _build_pdu_and_seq_listsAndy Grover2012-04-155-58/+50Star
| | | | | | | | | | | | | | Rename iscsit_build_pdu_and_seq_list to iscsit_do_build_pdu_and_seq_lists Rename iscsit_do_build_list to iscsit_build_pdu_and_seq_lists Move code from iscsit_decide_list_to_build into _seq_pdu_list.c, seems a better fit. Also update some comments in pdu/seq code for correctness and whitespace. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target/iscsi: Eliminate iscsi_cmd.data_lengthAndy Grover2012-04-158-67/+60Star
| | | | | | | | Redundant, just use iscsi_cmd->se_cmd.data_length once se_cmd is initialized, or hdr->data_length before then. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target/iscsi: Move init_se_cmd closer to lookup_cmd_lunAndy Grover2012-04-151-11/+11
| | | | | | | | | | if we can get calls to init_se_cmd, get_sess_cmd, lookup_cmd_lun, core_alua_check_nonop_delay, and handle_cdb_direct next to each other, then we can just call target_submit_cmd. This is a step towards that goal. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target/iscsi: Inline iscsit_allocate_se_cmd and *_for_tmrAndy Grover2012-04-153-130/+101Star
| | | | | | | | | Trying to move a bunch of stuff around so iscsi can use target_submit_cmd someday, and so stuff needs to be in that function directly instead of hidden, so it can be reordered etc. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: rewrite comment for generic_new_cmdAndy Grover2012-04-151-3/+3
| | | | | Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: Rename target_allocate_tasks to target_setup_cmd_from_cdbAndy Grover2012-04-155-16/+11Star
| | | | | | | | | | | This patch renames a horribly misnamed function that no longer allocate tasks to something more descriptive for it's modern use in target core. (nab: Fix up ib_srpt to use this as well ahead of a target_submit_cmd conversion) Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target/iscsi: Misc cleanups from Agrover (round 2)Andy Grover2012-04-1512-109/+87Star
| | | | | | | | | | | | | | | This patch includes the handful of squashed patches for target/iscsi from Andy's original series into lio-core/master code: *) Make iscsit_add_reject static *) Remove unused data_offset_end from iscsi_datain_req *) Remove "#if 0" stubs *) Rename iscsi_datain_req to cmd_datain_node *) Cleanups for built_r2ts_for_cmd() *) Cleanups for Cleanup build_sendtargets_response() Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target/iscsi: Refactor target_tx_thread immediate+response queue loopsAndy Grover2012-04-152-244/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | Immediate queue: Consolidate down to one switch statement by moving send_tx_data and stuff from second switch into the first switch, or the functions the first switch calls. Response queue: Do not lock istate_lock except directly around i_state modifications. Put entire ISTATE_SEND_DATAIN path within first switch statement, in prep for further refactoring. All other cases set use_misc = 1 and will not be using sendpage, so just use send_tx_data for these and set use_misc param to 1. map_sg, sent_status, use_misc, and se_cmd vars no longer needed. Then put immediate and response handling in separate functions in order to get iscsi_target_tx_thread down to where it fits on a page. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target/iscsi: Remove unneeded locking from iscsi_target_tx_threadAndy Grover2012-04-151-10/+2Star
| | | | | | | | | When processing immediate queue, we're switching on a local variable so it's not necessary to lock around it. However, we are modifying cmd->i_state in two spots, so lock around those parts only. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target/iscsi: Misc cleanups from Agrover (round 1)Andy Grover2012-04-153-52/+16Star
| | | | | | | | | | | | | *) Use decoded cmd->immediate_cmd for conditional instead of re-examining hdr->opcode *) Make iscist_dataout_post_crc_passed more legible *) use max() to reduce code in build_r2ts_for_cmd() *) Remove CONFIG_SMP and if 0 ifdefs *) Replace if/goto with a while loop *) Remove unused conn->tx_immediate_queue and tx_response_queue Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target/iscsi: Rename iscsi_cmd.i_list to iscsi_cmd.i_conn_nodeAndy Grover2012-04-156-38/+38
| | | | | | | | The name change makes it clear this list_head is so the cmd can be an item in the connection's conn_cmd_list. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: Remove transport_do_task_sg_chain() and associated detritusRoland Dreier2012-04-153-79/+0Star
| | | | | | | | | | | | | Now that all fabrics are converted over to using se_cmd->t_data_sg directly, we can drop the task sg chaining support. With the modern memory allocation in target core, task sg chaining is needless overhead -- we would split up the main cmd sglist into pieces, and then splice those pieces back together instead of just using the original list directly. Signed-off-by: Roland Dreier <roland@purestorage.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* IB/srpt: Remove use of transport_do_task_sg_chain()Roland Dreier2012-04-151-6/+2Star
| | | | | | | | | | | With the modern target core, se_cmd->t_data_sg already points to a sglist that covers the whole command. So task_sg chaining is needless overhead and obfuscation -- instead of splicing the split up task sglists back into one list, we can just use the original list directly. Signed-off-by: Roland Dreier <roland@purestorage.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* tcm_fc: Remove use of transport_do_task_sg_chain()Roland Dreier2012-04-153-18/+5Star
| | | | | | | | | | | | With the modern target core, se_cmd->t_data_sg already points to a sglist that covers the whole command. So task_sg chaining is needless overhead and obfuscation -- instead of splicing the split up task sglists back into one list, we can just use the original list directly. Signed-off-by: Roland Dreier <roland@purestorage.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Kiran Patil <Kiran.patil@intel.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: stop splitting commands into multiple tasksChristoph Hellwig2012-04-152-103/+25Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | From hch: The high-performance backends (iblock and rd) support tasks of unlimited size. With that there is no reason to keep a complex infrastructure for splitting up commands in place. Stop doing so and only submit a single task per data direction. Once this is in place we can slowly remove fields from the task that duplicate things in the command, or move other fields into the command. From nab: The benefit to IBLOCK performance by removing the additional fast-path allocation overhead + SGL mapping to se_task->task_sg[] is now greater than transparently supporting an received CDB I/O length that exceeds what is allowed by backend pSCSI LLD hardware max_sectors, that was originally supported for all backend export cases. This change may effect some users of pSCSI users on legacy hardware, but I think most folks are now using TYPE_DISK struct scsi_device export with IBLOCK. The only other place where this may can issues that cannot be resolved with IBLOCK TYPE_DISK is using TYPE_ROM, TYPE_TAPE or other pSCSI non TYPE_DISK export with an SCSI LLDs using a smaller max_sectors. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: don't limit transfer sizes for the ramdisk backendChristoph Hellwig2012-04-152-6/+2Star
| | | | | | | | The ramdisk backend has not inherent limitations for handling requests, so don't artificially limits the transfer size. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: misc ramdisk backend cleanupsChristoph Hellwig2012-04-152-125/+41Star
| | | | | | | | Remove various leftovers of the old direct/indirect split, as well as the unused rd_request structure and a couple unused defines and fields. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: add unknown size flag to target_submit_cmd()Sebastian Andrzej Siewior2012-04-152-0/+7
| | | | | | | | | | | The UASP protocol does not inform the target device upfront how much data it should expect so we have to learn in from the CDB. So in order to handle this case, add a TARGET_SCF_UNKNOWN_SIZE to target_submit_cmd() and perform an explictly assignment for se_cmd->data_length from the extracted CDB size in transport_generic_cmd_sequencer(). Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: Remove obsolete DF_READ_ONLY usageNicholas Bellinger2012-04-153-14/+5Star
| | | | | | | | | | | | | This was used at one time as a hack by FILEIO backend registration to allow a struct block_device that was claimed with blkdev_get (by a local filesystem mount for example) to be exported as read-only (SCSI WP=1). Since FILEIO backend registration will no longer attempt to obtain exclusive access to an underlying struct block_device here, this flag is now obsolete. Reported-by: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* Linux 3.4-rc2Linus Torvalds2012-04-081-1/+1
|
* Merge tag 'regmap-3.4-fixes' of ↵Linus Torvalds2012-04-072-1/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull two more small regmap fixes from Mark Brown: - Now we have users for it that aren't running Android it turns out that regcache_sync_region() is much more useful to drivers if it's exported for use by modules. Who knew? - Make sure we don't divide by zero when doing debugfs dumps of rbtrees, not visible up until now because everything was providing at least some cache on startup. * tag 'regmap-3.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: prevent division by zero in rbtree_show regmap: Export regcache_sync_region()
| * regmap: prevent division by zero in rbtree_showStephen Warren2012-04-051-1/+7
| | | | | | | | | | | | | | | | | | If there are no nodes in the cache, nodes will be 0, so calculating "registers / nodes" will cause division by zero. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
| * regmap: Export regcache_sync_region()Mark Brown2012-04-031-0/+1
| | | | | | | | | | | | | | regcache_sync_region() isn't going to be useful to most drivers if we don't export it since otherwise they can't use it when built modular. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge branch 'kvm-updates/3.4' of git://git.kernel.org/pub/scm/virt/kvm/kvmLinus Torvalds2012-04-078-12/+36
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull a few KVM fixes from Avi Kivity: "A bunch of powerpc KVM fixes, a guest and a host RCU fix (unrelated), and a small build fix." * 'kvm-updates/3.4' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: Resolve RCU vs. async page fault problem KVM: VMX: vmx_set_cr0 expects kvm->srcu locked KVM: PMU: Fix integer constant is too large warning in kvm_pmu_set_msr() KVM: PPC: Book3S: PR: Fix preemption KVM: PPC: Save/Restore CR over vcpu_run KVM: PPC: Book3S HV: Save and restore CR in __kvmppc_vcore_entry KVM: PPC: Book3S HV: Fix kvm_alloc_linear in case where no linears exist KVM: PPC: Book3S: Compile fix for ppc32 in HIOR access code
| * | KVM: Resolve RCU vs. async page fault problemGleb Natapov2012-04-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Page ready" async PF can kick vcpu out of idle state much like IRQ. We need to tell RCU about this. Reported-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Gleb Natapov <gleb@redhat.com> Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
| * | Merge tag 'powerpc-fixes' of git://github.com/paulusmack/linux into new/masterAvi Kivity2012-04-055-11/+29
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Five fixes for bugs that have crept in to the powerpc KVM implementations. These are all small simple patches that only affect arch/powerpc/kvm. They come from the series that Alex Graf put together but which was too late for the 3.4 merge window. * tag 'powerpc-fixes' of git://github.com/paulusmack/linux: KVM: PPC: Book3S: PR: Fix preemption KVM: PPC: Save/Restore CR over vcpu_run KVM: PPC: Book3S HV: Save and restore CR in __kvmppc_vcore_entry KVM: PPC: Book3S HV: Fix kvm_alloc_linear in case where no linears exist KVM: PPC: Book3S: Compile fix for ppc32 in HIOR access code Signed-off-by: Avi Kivity <avi@redhat.com>
| | * | KVM: PPC: Book3S: PR: Fix preemptionAlexander Graf2012-04-031-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were leaking preemption counters. Fix the code to always toggle between preempt and non-preempt properly. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
| | * | KVM: PPC: Save/Restore CR over vcpu_runAlexander Graf2012-04-032-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On PPC, CR2-CR4 are nonvolatile, thus have to be saved across function calls. We didn't respect that for any architecture until Paul spotted it in his patch for Book3S-HV. This patch saves/restores CR for all KVM capable PPC hosts. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
| | * | KVM: PPC: Book3S HV: Save and restore CR in __kvmppc_vcore_entryPaul Mackerras2012-04-031-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ABI specifies that CR fields CR2--CR4 are nonvolatile across function calls. Currently __kvmppc_vcore_entry doesn't save and restore the CR, leading to CR2--CR4 getting corrupted with guest values, possibly leading to incorrect behaviour in its caller. This adds instructions to save and restore CR at the points where we save and restore the nonvolatile GPRs. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
| | * | KVM: PPC: Book3S HV: Fix kvm_alloc_linear in case where no linears existPaul Mackerras2012-04-031-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In kvm_alloc_linear we were using and deferencing ri after the list_for_each_entry had come to the end of the list. In that situation, ri is not really defined and probably points to the list head. This will happen every time if the free_linears list is empty, for instance. This led to a NULL pointer dereference crash in memset on POWER7 while trying to allocate an HPT in the case where no HPTs were preallocated. This fixes it by using a separate variable for the return value from the loop iterator. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
| | * | KVM: PPC: Book3S: Compile fix for ppc32 in HIOR access codeAlexander Graf2012-04-031-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were failing to compile on book3s_32 with the following errors: arch/powerpc/kvm/book3s_pr.c:883:45: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] arch/powerpc/kvm/book3s_pr.c:898:79: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] Fix this by explicity casting the u64 to long before we use it as a pointer. Also, on PPC32 we can not use get_user/put_user for 64bit wide variables, as there is no single instruction that could load or store variables that big. So instead, we have to use copy_from/to_user which works everywhere. Reported-by: Jörg Sommer <joerg@alea.gnuu.de> Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * | | KVM: VMX: vmx_set_cr0 expects kvm->srcu lockedMarcelo Tosatti2012-04-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vmx_set_cr0 is called from vcpu run context, therefore it expects kvm->srcu to be held (for setting up the real-mode TSS). Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
| * | | KVM: PMU: Fix integer constant is too large warning in kvm_pmu_set_msr()Sasikantha babu2012-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sasikantha babu <sasikanth.v19@gmail.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* | | | Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-shLinus Torvalds2012-04-0720-105/+147
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull SuperH fixes from Paul Mundt. * tag 'sh-for-linus' of git://github.com/pmundt/linux-sh: sh: fix clock-sh7757 for the latest sh_mobile_sdhi driver serial: sh-sci: use serial_port_in/out vs sci_in/out. sh: vsyscall: Fix up .eh_frame generation. sh: dma: Fix up device attribute mismatch from sysdev fallout. sh: dwarf unwinder depends on SHcompact. sh: fix up fallout from system.h disintegration.
| * | | | sh: fix clock-sh7757 for the latest sh_mobile_sdhi driverShimoda, Yoshihiro2012-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit 996bc8aebd2cd5b6d4c5d85085f171fa2447f364 (mmc: sh_mobile_sdhi: do not manage PM clocks manually) modified the sh_mobile_sdhi driver to remove the clk_enable/clk_disable. So, we need to change the "CLKDEV_CON_ID" to "CLKDEV_DEV_ID". If we don't change this, we will see the following error from the driver: sh_mobile_sdhi sh_mobile_sdhi.0: timeout waiting for hardware interrupt (CMD52) Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | | | |
| | \ \ \
| *-. \ \ \ Merge branches 'sh/urgent', 'sh/vsyscall' and 'common/serial-rework' into ↵Paul Mundt2012-03-304-102/+131
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | sh-latest
| | | * | | | serial: sh-sci: use serial_port_in/out vs sci_in/out.Paul Mundt2012-03-302-89/+86Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follows the 8250 change for pretty much the same rationale. See commit "serial: use serial_port_in/out vs serial_in/out in 8250". Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | | | | sh: vsyscall: Fix up .eh_frame generation.Paul Mundt2012-03-302-13/+45
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some improper formatting caused the .eh_frame generation to fail, resulting in gcc/g++ testsuite failures with regards to unwinding through the vDSO. Now that someone is actually working on this on the gcc side it's time to fix up the kernel side, too. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | | | sh: dma: Fix up device attribute mismatch from sysdev fallout.Paul Mundt2012-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes up an attribute mismatch that was introduced in the sysdev->struct device migration. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | | | sh: dwarf unwinder depends on SHcompact.Paul Mundt2012-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Presently there's no SHmedia support plugged in for the dwarf unwinder. While it's trivial to provide an SHmedia version of dwarf_read_arch_reg(), the general sh64 case is more complicated in that the TLB miss handler uses a locked down set of registers for optimization (including the frame pointer) which we need for the unwind table generation. While freeing up the frame pointer for use in the TLB miss handler is reasonably straightforward, it's still more trouble than it's worth, so we simply restrict the unwinder to 32-bit for now. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | | | sh: fix up fallout from system.h disintegration.Paul Mundt2012-03-3013-1/+13
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | Quite a bit of fallout all over the place, nothing terribly exciting. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | | | Merge branch 'for-linus' of ↵Linus Torvalds2012-04-071-4/+4
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull security layer fixlet from James Morris. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: sysctl: fix write access to dmesg_restrict/kptr_restrict
| * | | | | sysctl: fix write access to dmesg_restrict/kptr_restrictKees Cook2012-04-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit bfdc0b4 adds code to restrict access to dmesg_restrict, however, it incorrectly alters kptr_restrict rather than dmesg_restrict. The original patch from Richard Weinberger (https://lkml.org/lkml/2011/3/14/362) alters dmesg_restrict as expected, and so the patch seems to have been misapplied. This adds the CAP_SYS_ADMIN check to both dmesg_restrict and kptr_restrict, since both are sensitive. Reported-by: Phillip Lougher <plougher@redhat.com> Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Acked-by: Richard Weinberger <richard@nod.at> Cc: stable@vger.kernel.org Signed-off-by: James Morris <james.l.morris@oracle.com>