28 Jan, 2013
19 commits
-
The irq_remapped function is only used in IOMMU code after
the last patch. So move its definition there too.Signed-off-by: Joerg Roedel
Acked-by: Sebastian Andrzej Siewior
Reviewed-by: Konrad Rzeszutek Wilk -
This callback replaces the old __eoi_ioapic_pin function
which needs a special path for interrupt remapping.Signed-off-by: Joerg Roedel
Acked-by: Sebastian Andrzej Siewior
Reviewed-by: Konrad Rzeszutek Wilk -
This call-back points to the right function for initializing
the msi_msg structure. The old code for msi_msg generation
was split up into the irq-remapped and the default case.The irq-remapped case just calls into the specific Intel or
AMD implementation when the device is behind an IOMMU.
Otherwise the default function is called.Signed-off-by: Joerg Roedel
Acked-by: Sebastian Andrzej Siewior
Reviewed-by: Konrad Rzeszutek Wilk -
This function does irq-remapping specific interrupt setup
like modifying the chip defaults.Signed-off-by: Joerg Roedel
Acked-by: Sebastian Andrzej Siewior
Reviewed-by: Konrad Rzeszutek Wilk -
The function is called unconditionally now in IO-APIC code
removing another irq_remapped() check from x86 core code.Signed-off-by: Joerg Roedel
Acked-by: Sebastian Andrzej Siewior
Reviewed-by: Konrad Rzeszutek Wilk -
This function is only called from default_ioapic_set_affinity()
which is only used when interrupt remapping is disabled
since the introduction of the set_affinity function pointer.
So the check will always evaluate as true and can be
removed.Signed-off-by: Joerg Roedel
Acked-by: Sebastian Andrzej Siewior
Reviewed-by: Konrad Rzeszutek Wilk -
Move all the code to either to the header file
asm/irq_remapping.h or to drivers/iommu/.Signed-off-by: Joerg Roedel
Acked-by: Sebastian Andrzej Siewior
Reviewed-by: Konrad Rzeszutek Wilk -
Add a data structure to store information the IOMMU driver
can use to get from a 'struct irq_cfg' to the remapping
entry.Signed-off-by: Joerg Roedel
Acked-by: Sebastian Andrzej Siewior
Reviewed-by: Konrad Rzeszutek Wilk -
Remove the last left-over from this flag from x86 code.
Signed-off-by: Joerg Roedel
Acked-by: Sebastian Andrzej Siewior
Reviewed-by: Konrad Rzeszutek Wilk -
This function is only called when irq-remapping is disabled.
Signed-off-by: Joerg Roedel
Acked-by: Sebastian Andrzej Siewior
Reviewed-by: Konrad Rzeszutek Wilk -
Move these checks to IRQ remapping code by introducing the
panic_on_irq_remap() function.Signed-off-by: Joerg Roedel
Acked-by: Sebastian Andrzej Siewior
Reviewed-by: Konrad Rzeszutek Wilk -
This pointer is changed to a different function when IRQ
remapping is enabled.Signed-off-by: Joerg Roedel
Acked-by: Sebastian Andrzej Siewior
Reviewed-by: Konrad Rzeszutek Wilk -
With interrupt remapping a special function is used to
change the affinity of an IO-APIC interrupt. Abstract this
with a function pointer.Signed-off-by: Joerg Roedel
Acked-by: Sebastian Andrzej Siewior
Reviewed-by: Konrad Rzeszutek Wilk -
Use seperate routines to setup MSI IRQs for both
irq_remapping_enabled cases.Signed-off-by: Joerg Roedel
Acked-by: Sebastian Andrzej Siewior
Reviewed-by: Konrad Rzeszutek Wilk -
This function pointer can be overwritten by the IRQ
remapping code. The irq_remapping_enabled check can be
removed from default_setup_hpet_msi.Signed-off-by: Joerg Roedel
Acked-by: Sebastian Andrzej Siewior
Reviewed-by: Konrad Rzeszutek Wilk -
This call-back is used to dump IO-APIC entries for debugging
purposes into the kernel log. VT-d needs a special routine
for this and will overwrite the default.Signed-off-by: Joerg Roedel
Acked-by: Sebastian Andrzej Siewior
Reviewed-by: Konrad Rzeszutek Wilk -
This function pointer is used to call a system-specific
function for disabling the IO-APIC. Currently this is used
for IRQ remapping which has its own disable routine.Also introduce the necessary infrastructure in the interrupt
remapping code to overwrite this and other function pointers
as necessary by interrupt remapping.Signed-off-by: Joerg Roedel
Acked-by: Sebastian Andrzej Siewior
Reviewed-by: Konrad Rzeszutek Wilk -
IO-APIC and PIC use the same resume routines when IRQ
remapping is enabled or disabled. So it should be safe to
mask the other APICs for the IRQ-remapping-disabled case
too.Signed-off-by: Joerg Roedel
Acked-by: Sebastian Andrzej Siewior
Reviewed-by: Konrad Rzeszutek Wilk -
Move the three easy to move checks in the x86' apic.c file
into the IRQ-remapping code.Signed-off-by: Joerg Roedel
Acked-by: Sebastian Andrzej Siewior
Reviewed-by: Konrad Rzeszutek Wilk
25 Jan, 2013
1 commit
-
The MSI specification has several constraints in comparison with
MSI-X, most notable of them is the inability to configure MSIs
independently. As a result, it is impossible to dispatch
interrupts from different queues to different CPUs. This is
largely devalues the support of multiple MSIs in SMP systems.Also, a necessity to allocate a contiguous block of vector
numbers for devices capable of multiple MSIs might cause a
considerable pressure on x86 interrupt vector allocator and
could lead to fragmentation of the interrupt vectors space.This patch overcomes both drawbacks in presense of IRQ remapping
and lets devices take advantage of multiple queues and per-IRQ
affinity assignments.Signed-off-by: Alexander Gordeev
Cc: Bjorn Helgaas
Cc: Suresh Siddha
Cc: Yinghai Lu
Cc: Matthew Wilcox
Cc: Jeff Garzik
Cc: Linus Torvalds
Cc: Andrew Morton
Cc: Peter Zijlstra
Cc: Thomas Gleixner
Link: http://lkml.kernel.org/r/c8bd86ff56b5fc118257436768aaa04489ac0a4c.1353324359.git.agordeev@redhat.com
Signed-off-by: Ingo Molnar
24 Jan, 2013
5 commits
-
This patch updates x2apic initializaition code to allow x2apic
on VMware platform even without interrupt remapping support.
The hypervisor_x2apic_available hook was added in x2apic
initialization code and used by KVM and XEN, before this.
I have also cleaned up that code to export this hook through the
hypervisor_x86 structure.Compile tested for KVM and XEN configs, this patch doesn't have
any functional effect on those two platforms.On VMware platform, verified that x2apic is used in physical
mode on products that support this.Signed-off-by: Alok N Kataria
Reviewed-by: Doug Covelli
Reviewed-by: Dan Hecht
Acked-by: H. Peter Anvin
Cc: Konrad Rzeszutek Wilk
Cc: Jeremy Fitzhardinge
Cc: Avi Kivity
Link: http://lkml.kernel.org/r/1358466282.423.60.camel@akataria-dtop.eng.vmware.com
Signed-off-by: Ingo Molnar -
Since circa 3.5, we've had dozens of reports of people hitting
this warning. Forwarded reports have been met with silence, so
just remove the warning if no-one cares.Example reports:
https://bugzilla.redhat.com/show_bug.cgi?id=797687
https://bugzilla.redhat.com/show_bug.cgi?id=867174
https://bugzilla.redhat.com/show_bug.cgi?id=894865Signed-off-by: Dave Jones
Cc: Andrew Morton
Link: http://lkml.kernel.org/r/20130118175847.GA27662@redhat.com
Signed-off-by: Ingo Molnar -
Pull more USB fixes from Greg Kroah-Hartman:
"Here are some more USB fixes for the 3.8-rc4 tree.Some gadget driver fixes, and finally resolved the ehci-mxc driver
build issues (it's just some code moving around and being deleted)."* tag 'usb-3.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
USB: EHCI: fix build error in ehci-mxc
USB: EHCI: add a name for the platform-private field
USB: EHCI: fix incorrect configuration test
USB: EHCI: Move definition of EHCI_STATS to ehci.h
USB: UHCI: fix IRQ race during initialization
usb: gadget: FunctionFS: Fix missing braces in parse_opts
usb: dwc3: gadget: fix ep->maxburst for ep0
ARM: i.MX clock: Change the connection-id for fsl-usb2-udc
usb: gadget: fsl_mxc_udc: replace MX35_IO_ADDRESS to ioremap
usb: gadget: fsl-mxc-udc: replace cpu_is_xxx() with platform_device_id
usb: musb: cppi_dma: drop '__init' annotation -
Pull m68k fixes from Geert Uytterhoeven:
"The asm-generic changeset has been ack'ed by Arnd."* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
m68k: Wire up finit_module
asm-generic/dma-mapping-broken.h: Provide dma_alloc_attrs()/dma_free_attrs()
m68k: Provide dma_alloc_attrs()/dma_free_attrs() -
Pull arm64 fixes from Catalin Marinas:
- ELF coredump fix (more registers dumped than what user space expects)
- SUBARCH name generation (s/aarch64/arm64/)* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
arm64: makefile: fix uname munging when setting ARCH on native machine
arm64: elf: fix core dumping to match what glibc expects
23 Jan, 2013
4 commits
-
Pull perf/urgent fixes from Arnaldo Carvalho de Melo:
. revert 20b279 - require exclude_guest to use PEBS - kernel side, now
older binaries will continue working for things like cycles:pp
without needing to pass extra modifiers, from David Ahern.. Fix building from 'make perf-*-src-pkg' tarballs, broken by UAPI,
from Sebastian Andrzej Siewior[ Pulling directly, Ingo would normally pull but has been unresponsive ]
* tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
perf tools: Fix building from 'make perf-*-src-pkg' tarballs
perf x86: revert 20b279 - require exclude_guest to use PEBS - kernel side -
Pull parisc fixes from Helge Deller:
"Improve the stability of the linux kernel on the parisc architecture"* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: sigaltstack doesn't round ss.ss_sp as required
parisc: improve ptrace support for gdb single-step
parisc: don't claim cpu irqs more than once
parisc: avoid undefined shift in cnv_float.h -
putreg() assumes that the tracee is not running and pt_regs_access() can
safely play with its stack. However a killed tracee can return from
ptrace_stop() to the low-level asm code and do RESTORE_REST, this means
that debugger can actually read/modify the kernel stack until the tracee
does SAVE_REST again.set_task_blockstep() can race with SIGKILL too and in some sense this
race is even worse, the very fact the tracee can be woken up breaks the
logic.As Linus suggested we can clear TASK_WAKEKILL around the arch_ptrace()
call, this ensures that nobody can ever wakeup the tracee while the
debugger looks at it. Not only this fixes the mentioned problems, we
can do some cleanups/simplifications in arch_ptrace() paths.Probably ptrace_unfreeze_traced() needs more callers, for example it
makes sense to make the tracee killable for oom-killer before
access_process_vm().While at it, add the comment into may_ptrace_stop() to explain why
ptrace_stop() still can't rely on SIGKILL and signal_pending_state().Reported-by: Salman Qazi
Reported-by: Suleiman Souhlal
Suggested-by: Linus Torvalds
Signed-off-by: Oleg Nesterov
Signed-off-by: Linus Torvalds -
The kernel's internal definition of ELF_NGREG uses struct pt_regs, which
means that we disagree with userspace on the size of coredumps since
glibc correctly uses the user-visible struct user_pt_regs.This patch fixes our ELF_NGREG definition to use struct user_pt_regs
and introduces our own ELF_CORE_COPY_REGS to convert between the user
and kernel structure definitions.Cc:
Signed-off-by: Will Deacon
Signed-off-by: Catalin Marinas
21 Jan, 2013
1 commit
-
The ia64 function "thread_matches()" has no users since commit
e868a55c2a8c ("[IA64] remove find_thread_for_addr()"). Remove it.This allows us to make ptrace_check_attach() static to kernel/ptrace.c,
which is good since we'll need to change the semantics of it and fix up
all the callers.Signed-off-by: Oleg Nesterov
Signed-off-by: Linus Torvalds
19 Jan, 2013
2 commits
-
Pull Xen fixes from Konrad Rzeszutek Wilk:
- CVE-2013-0190/XSA-40 (or stack corruption for 32-bit PV kernels)
- Fix racy vma access spotted by Al Viro
- Fix mmap batch ioctl potentially resulting in large O(n) page allcations.
- Fix vcpu online/offline BUG:scheduling while atomic..
- Fix unbound buffer scanning for more than 32 vCPUs.
- Fix grant table being incorrectly initialized
- Fix incorrect check in pciback
- Allow privcmd in backend domains.Fix up whitespace conflict due to ugly merge resolution in Xen tree in
arch/arm/xen/enlighten.c* tag 'stable/for-linus-3.8-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
xen: Fix stack corruption in xen_failsafe_callback for 32bit PVOPS guests.
Revert "xen/smp: Fix CPU online/offline bug triggering a BUG: scheduling while atomic."
xen/gntdev: remove erronous use of copy_to_user
xen/gntdev: correctly unmap unlinked maps in mmu notifier
xen/gntdev: fix unsafe vma access
xen/privcmd: Fix mmap batch ioctl.
Xen: properly bound buffer access when parsing cpu/*/availability
xen/grant-table: correctly initialize grant table version 1
x86/xen : Fix the wrong check in pciback
xen/privcmd: Relax access control in privcmd_ioctl_mmap -
Pull m68knommu arch fixes from Greg Ungerer:
"This contains a couple of fixes, both affecting compilation of non-mmu
m68k targets."* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
m68k: fix conditional use of init_pointer_table
m68knommu: add KMAP definitions for non-MMU definitions
18 Jan, 2013
3 commits
-
As we use platform_device_id for fsl-usb2-udc driver, it needs to
change clk connection-id, or the related devm_clk_get will be failed.Signed-off-by: Peter Chen
Acked-by: Shawn Guo
Signed-off-by: Felipe Balbi -
As mach/hardware.h is deleted, we need to use platform_device_id to
differentiate SoCs. Besides, one cpu_is_mx35 is useless as it has
already used pdata to differentiate runtimeMeanwhile we update the platform code accordingly.
Signed-off-by: Peter Chen
Signed-off-by: Felipe Balbi -
Pull more s390 patches from Martin Schwidefsky:
"A couple of bug fixes: one of the transparent huge page primitives is
broken, the sched_clock function overflows after 417 days, the XFS
module has grown too large for -fpic and the new pci code has broken
normal channel subsystem notifications."* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
s390/chsc: fix SEI usage
s390/time: fix sched_clock() overflow
s390: use -fPIC for module compile
s390/mm: fix pmd_pfn() for thp
17 Jan, 2013
5 commits
-
This fixes CVE-2013-0190 / XSA-40
There has been an error on the xen_failsafe_callback path for failed
iret, which causes the stack pointer to be wrong when entering the
iret_exc error path. This can result in the kernel crashing.In the classic kernel case, the relevant code looked a little like:
popl %eax # Error code from hypervisor
jz 5f
addl $16,%esp
jmp iret_exc # Hypervisor said iret fault
5: addl $16,%esp
# Hypervisor said segment selector faultHere, there are two identical addls on either option of a branch which
appears to have been optimised by hoisting it above the jz, and
converting it to an lea, which leaves the flags register unaffected.In the PVOPS case, the code looks like:
popl_cfi %eax # Error from the hypervisor
lea 16(%esp),%esp # Add $16 before choosing fault path
CFI_ADJUST_CFA_OFFSET -16
jz 5f
addl $16,%esp # Incorrectly adjust %esp again
jmp iret_excIt is possible unprivileged userspace applications to cause this
behaviour, for example by loading an LDT code selector, then changing
the code selector to be not-present. At this point, there is a race
condition where it is possible for the hypervisor to return back to
userspace from an interrupt, fault on its own iret, and inject a
failsafe_callback into the kernel.This bug has been present since the introduction of Xen PVOPS support
in commit 5ead97c84 (xen: Core Xen implementation), in 2.6.23.Signed-off-by: Frediano Ziglio
Signed-off-by: Andrew Cooper
Cc: stable@vger.kernel.org
Signed-off-by: Konrad Rzeszutek Wilk -
Pull second round of sound fixes from Takashi Iwai:
"Yet a few more fixes popped up in this week.The biggest change here is the addition of pinctrl support for Atmel,
which turned out to be almost mandatory to make things working.The rest are a few fixes for M-Audio usb-audio device and a fix for
regression of HD-audio HDMI codecs with alsactl in the recent kernel."* tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda/hdmi - Work around "alsactl restore" errors
ALSA: usb-audio: selector map for M-Audio FT C400
ALSA: usb-audio: M-Audio FT C400 skip packet quirk
ALSA: usb-audio: correct M-Audio C400 clock source quirk
ALSA: usb - fix race in creation of M-Audio Fast track pro driver
ASoC: atmel-ssc: add pinctrl selection to driver
ARM: at91/dts: add pinctrl support for SSC peripheral -
Pull s390 KVM fix from Gleb Natapov.
* git://git.kernel.org/pub/scm/virt/kvm/kvm:
s390/kvm: Fix BUG in include/linux/kvm_host.h:745 -
Pull SuperH fixes from Paul Mundt.
* tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
sh: ecovec: add sample amixer settings
sh: Fix up stack debugging build.
sh: wire up finit_module syscall.
sh: Fix FDPIC binary loader
sh: clkfwk: bugfix: sh_clk_div_enable() care sh_clk_div_set_rate() if div6
sh: define TASK_UNMAPPED_BASE as a page aligned constant -
Pull arm64 fixes from Catalin Marinas:
- Page protection fixes, including proper PAGE_NONE handling
- Timezone vdso sequence counting fix
- Additional compat syscall wiring* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
arm64: compat: add syscall table entries for new syscalls
arm64: mm: introduce present, faulting entries for PAGE_NONE
arm64: mm: only wrprotect clean ptes if they are present
arm64: vdso: remove broken, redundant sequence counting for timezones