mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-27 01:11:31 +00:00
The !CONFIG_GENERIC_IOMAP version of ioport_map uses MMIO_UPPER_LIMIT to
prevent users from making I/O accesses outside the expected I/O range -
however it erroneously treats MMIO_UPPER_LIMIT as a mask which is
contradictory to its other users.
The introduction of CONFIG_INDIRECT_PIO, which subtracts an arbitrary
amount from IO_SPACE_LIMIT to form MMIO_UPPER_LIMIT, results in ioport_map
mangling the given port rather than capping it.
We address this by aligning more closely with the CONFIG_GENERIC_IOMAP
implementation of ioport_map by using the comparison operator and
returning NULL where the port exceeds MMIO_UPPER_LIMIT. Though note that
we preserve the existing behavior of masking with IO_SPACE_LIMIT such that
we don't break existing buggy drivers that somehow rely on this masking.
Fixes:
|
||
|---|---|---|
| .. | ||
| bitops | ||
| 4level-fixup.h | ||
| 5level-fixup.h | ||
| asm-offsets.h | ||
| asm-prototypes.h | ||
| atomic-instrumented.h | ||
| atomic-long.h | ||
| atomic.h | ||
| atomic64.h | ||
| audit_change_attr.h | ||
| audit_dir_write.h | ||
| audit_read.h | ||
| audit_signal.h | ||
| audit_write.h | ||
| barrier.h | ||
| bitops.h | ||
| bitsperlong.h | ||
| bug.h | ||
| bugs.h | ||
| cache.h | ||
| cacheflush.h | ||
| checksum.h | ||
| cmpxchg-local.h | ||
| cmpxchg.h | ||
| compat.h | ||
| current.h | ||
| delay.h | ||
| device.h | ||
| div64.h | ||
| dma-contiguous.h | ||
| dma-mapping.h | ||
| dma.h | ||
| early_ioremap.h | ||
| emergency-restart.h | ||
| error-injection.h | ||
| exec.h | ||
| export.h | ||
| extable.h | ||
| fb.h | ||
| fixmap.h | ||
| ftrace.h | ||
| futex.h | ||
| getorder.h | ||
| gpio.h | ||
| hardirq.h | ||
| hugetlb.h | ||
| hw_irq.h | ||
| ide_iops.h | ||
| int-ll64.h | ||
| io.h | ||
| ioctl.h | ||
| iomap.h | ||
| irq.h | ||
| irq_regs.h | ||
| irq_work.h | ||
| irqflags.h | ||
| kdebug.h | ||
| kmap_types.h | ||
| kprobes.h | ||
| kvm_para.h | ||
| linkage.h | ||
| local.h | ||
| local64.h | ||
| mcs_spinlock.h | ||
| memory_model.h | ||
| mm-arch-hooks.h | ||
| mm_hooks.h | ||
| mmu.h | ||
| mmu_context.h | ||
| module.h | ||
| msi.h | ||
| page.h | ||
| param.h | ||
| parport.h | ||
| pci.h | ||
| pci_iomap.h | ||
| percpu.h | ||
| pgalloc.h | ||
| pgtable-nop4d-hack.h | ||
| pgtable-nop4d.h | ||
| pgtable-nopmd.h | ||
| pgtable-nopud.h | ||
| pgtable.h | ||
| preempt.h | ||
| ptrace.h | ||
| qrwlock.h | ||
| qrwlock_types.h | ||
| qspinlock.h | ||
| qspinlock_types.h | ||
| resource.h | ||
| rwsem.h | ||
| seccomp.h | ||
| sections.h | ||
| segment.h | ||
| serial.h | ||
| set_memory.h | ||
| signal.h | ||
| simd.h | ||
| sizes.h | ||
| spinlock.h | ||
| statfs.h | ||
| string.h | ||
| switch_to.h | ||
| syscall.h | ||
| syscalls.h | ||
| termios-base.h | ||
| termios.h | ||
| timex.h | ||
| tlb.h | ||
| tlbflush.h | ||
| topology.h | ||
| trace_clock.h | ||
| uaccess.h | ||
| unaligned.h | ||
| unistd.h | ||
| user.h | ||
| vga.h | ||
| vmlinux.lds.h | ||
| vtime.h | ||
| word-at-a-time.h | ||
| xor.h | ||