Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212489
b: refs/heads/master
c: 552dc34
h: refs/heads/master
i:
  212487: 458be74
v: v3
  • Loading branch information
Russell King committed Oct 8, 2010
1 parent 97d3e65 commit ec6886c
Show file tree
Hide file tree
Showing 56 changed files with 2,856 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ee621dd619b9a85eced150fc06e352fef54cfda0
refs/heads/master: 552dc340bce3b28f4af33c9134adafa5efacf1c9
7 changes: 7 additions & 0 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,13 @@ S: Supported
F: arch/arm/mach-shmobile/
F: drivers/sh/

ARM/TELECHIPS ARM ARCHITECTURE
M: "Hans J. Koch" <hjk@linutronix.de>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
F: arch/arm/plat-tcc/
F: arch/arm/mach-tcc8k/

ARM/TECHNOLOGIC SYSTEMS TS7250 MACHINE SUPPORT
M: Lennert Buytenhek <kernel@wantstofly.org>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
Expand Down
25 changes: 25 additions & 0 deletions trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,15 @@ config ARCH_SHARK
Support for the StrongARM based Digital DNARD machine, also known
as "Shark" (<http://www.shark-linux.de/shark.html>).

config ARCH_TCC_926
bool "Telechips TCC ARM926-based systems"
select CPU_ARM926T
select HAVE_CLK
select COMMON_CLKDEV
select GENERIC_CLOCKEVENTS
help
Support for Telechips TCC ARM926-based systems.

config ARCH_LH7A40X
bool "Sharp LH7A40X"
select CPU_ARM922T
Expand Down Expand Up @@ -915,6 +924,8 @@ source "arch/arm/plat-s5p/Kconfig"

source "arch/arm/plat-spear/Kconfig"

source "arch/arm/plat-tcc/Kconfig"

if ARCH_S3C2410
source "arch/arm/mach-s3c2400/Kconfig"
source "arch/arm/mach-s3c2410/Kconfig"
Expand Down Expand Up @@ -1463,6 +1474,20 @@ config UACCESS_WITH_MEMCPY
However, if the CPU data cache is using a write-allocate mode,
this option is unlikely to provide any performance gain.

config SECCOMP
bool
prompt "Enable seccomp to safely compute untrusted bytecode"
---help---
This kernel feature is useful for number crunching applications
that may need to compute untrusted bytecode during their
execution. By using pipes or other transports made available to
the process as file descriptors supporting the read/write
syscalls, it's possible to isolate those applications in
their own address space using seccomp. Once seccomp is
enabled via prctl(PR_SET_SECCOMP), it cannot be disabled
and the task is only allowed to execute a few safe syscalls
defined by each seccomp mode.

config CC_STACKPROTECTOR
bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)"
help
Expand Down
14 changes: 14 additions & 0 deletions trunk/arch/arm/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@ menu "Kernel hacking"

source "lib/Kconfig.debug"

config STRICT_DEVMEM
bool "Filter access to /dev/mem"
depends on MMU
---help---
If this option is disabled, you allow userspace (root) access to all
of memory, including kernel and userspace memory. Accidental
access to this is obviously disastrous, but specific access can
be used by people debugging the kernel.

If this option is switched on, the /dev/mem file only allows
userspace access to memory mapped peripherals.

If in doubt, say Y.

# RMK wants arm kernels compiled with frame pointers or stack unwinding.
# If you know what you are doing and are willing to live without stack
# traces, you can get a slightly smaller kernel by setting this option to
Expand Down
9 changes: 6 additions & 3 deletions trunk/arch/arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ machine-$(CONFIG_ARCH_SHARK) := shark
machine-$(CONFIG_ARCH_SHMOBILE) := shmobile
machine-$(CONFIG_ARCH_STMP378X) := stmp378x
machine-$(CONFIG_ARCH_STMP37XX) := stmp37xx
machine-$(CONFIG_ARCH_TCC8K) := tcc8k
machine-$(CONFIG_ARCH_TEGRA) := tegra
machine-$(CONFIG_ARCH_U300) := u300
machine-$(CONFIG_ARCH_U8500) := ux500
Expand All @@ -202,6 +203,7 @@ plat-$(CONFIG_ARCH_MXC) := mxc
plat-$(CONFIG_ARCH_OMAP) := omap
plat-$(CONFIG_ARCH_S3C64XX) := samsung
plat-$(CONFIG_ARCH_STMP3XXX) := stmp3xxx
plat-$(CONFIG_ARCH_TCC_926) := tcc
plat-$(CONFIG_PLAT_IOP) := iop
plat-$(CONFIG_PLAT_NOMADIK) := nomadik
plat-$(CONFIG_PLAT_ORION) := orion
Expand Down Expand Up @@ -245,13 +247,14 @@ ifeq ($(FASTFPE),$(wildcard $(FASTFPE)))
FASTFPE_OBJ :=$(FASTFPE)/
endif

# If we have a machine-specific directory, then include it in the build.
core-y += arch/arm/kernel/ arch/arm/mm/ arch/arm/common/
core-y += $(machdirs) $(platdirs)
core-$(CONFIG_FPE_NWFPE) += arch/arm/nwfpe/
core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ)
core-$(CONFIG_VFP) += arch/arm/vfp/

# If we have a machine-specific directory, then include it in the build.
core-y += arch/arm/kernel/ arch/arm/mm/ arch/arm/common/
core-y += $(machdirs) $(platdirs)

drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/

libs-y := arch/arm/lib/ $(libs-y)
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/arm/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,8 @@ struct mm_struct;
extern unsigned long arch_randomize_brk(struct mm_struct *mm);
#define arch_randomize_brk arch_randomize_brk

extern int vectors_user_mapping(void);
#define arch_setup_additional_pages(bprm, uses_interp) vectors_user_mapping()
#define ARCH_HAS_SETUP_ADDITIONAL_PAGES

#endif
1 change: 1 addition & 0 deletions trunk/arch/arm/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *addr);
#define ARCH_HAS_VALID_PHYS_ADDR_RANGE
extern int valid_phys_addr_range(unsigned long addr, size_t size);
extern int valid_mmap_phys_addr_range(unsigned long pfn, size_t size);
extern int devmem_is_allowed(unsigned long pfn);
#endif

/*
Expand Down
29 changes: 28 additions & 1 deletion trunk/arch/arm/include/asm/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <asm/cacheflush.h>
#include <asm/cachetype.h>
#include <asm/proc-fns.h>
#include <asm-generic/mm_hooks.h>

void __check_kvm_seq(struct mm_struct *mm);

Expand Down Expand Up @@ -134,4 +133,32 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next,
#define deactivate_mm(tsk,mm) do { } while (0)
#define activate_mm(prev,next) switch_mm(prev, next, NULL)

/*
* We are inserting a "fake" vma for the user-accessible vector page so
* gdb and friends can get to it through ptrace and /proc/<pid>/mem.
* But we also want to remove it before the generic code gets to see it
* during process exit or the unmapping of it would cause total havoc.
* (the macro is used as remove_vma() is static to mm/mmap.c)
*/
#define arch_exit_mmap(mm) \
do { \
struct vm_area_struct *high_vma = find_vma(mm, 0xffff0000); \
if (high_vma) { \
BUG_ON(high_vma->vm_next); /* it should be last */ \
if (high_vma->vm_prev) \
high_vma->vm_prev->vm_next = NULL; \
else \
mm->mmap = NULL; \
rb_erase(&high_vma->vm_rb, &mm->mm_rb); \
mm->mmap_cache = NULL; \
mm->map_count--; \
remove_vma(high_vma); \
} \
} while (0)

static inline void arch_dup_mmap(struct mm_struct *oldmm,
struct mm_struct *mm)
{
}

#endif
11 changes: 11 additions & 0 deletions trunk/arch/arm/include/asm/seccomp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#ifndef _ASM_ARM_SECCOMP_H
#define _ASM_ARM_SECCOMP_H

#include <linux/unistd.h>

#define __NR_seccomp_read __NR_read
#define __NR_seccomp_write __NR_write
#define __NR_seccomp_exit __NR_exit
#define __NR_seccomp_sigreturn __NR_rt_sigreturn

#endif /* _ASM_ARM_SECCOMP_H */
2 changes: 2 additions & 0 deletions trunk/arch/arm/include/asm/thread_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ extern void vfp_flush_hwstate(struct thread_info *);
#define TIF_MEMDIE 18 /* is terminating due to OOM killer */
#define TIF_FREEZE 19
#define TIF_RESTORE_SIGMASK 20
#define TIF_SECCOMP 21

#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
Expand All @@ -153,6 +154,7 @@ extern void vfp_flush_hwstate(struct thread_info *);
#define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT)
#define _TIF_FREEZE (1 << TIF_FREEZE)
#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
#define _TIF_SECCOMP (1 << TIF_SECCOMP)

/*
* Change these and you break ASM code in entry-common.S
Expand Down
15 changes: 13 additions & 2 deletions trunk/arch/arm/kernel/entry-common.S
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ ENTRY(vector_swi)

get_thread_info tsk
adr tbl, sys_call_table @ load syscall table pointer
ldr ip, [tsk, #TI_FLAGS] @ check for syscall tracing

#if defined(CONFIG_OABI_COMPAT)
/*
Expand All @@ -312,8 +311,20 @@ ENTRY(vector_swi)
eor scno, scno, #__NR_SYSCALL_BASE @ check OS number
#endif

ldr r10, [tsk, #TI_FLAGS] @ check for syscall tracing
stmdb sp!, {r4, r5} @ push fifth and sixth args
tst ip, #_TIF_SYSCALL_TRACE @ are we tracing syscalls?

#ifdef CONFIG_SECCOMP
tst r10, #_TIF_SECCOMP
beq 1f
mov r0, scno
bl __secure_computing
add r0, sp, #S_R0 + S_OFF @ pointer to regs
ldmia r0, {r0 - r3} @ have to reload r0 - r3
1:
#endif

tst r10, #_TIF_SYSCALL_TRACE @ are we tracing syscalls?
bne __sys_trace

cmp scno, #NR_syscalls @ check upper syscall limit
Expand Down
21 changes: 21 additions & 0 deletions trunk/arch/arm/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,3 +458,24 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
unsigned long range_end = mm->brk + 0x02000000;
return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
}

/*
* The vectors page is always readable from user space for the
* atomic helpers and the signal restart code. Let's declare a mapping
* for it so it is visible through ptrace and /proc/<pid>/mem.
*/

int vectors_user_mapping(void)
{
struct mm_struct *mm = current->mm;
return install_special_mapping(mm, 0xffff0000, PAGE_SIZE,
VM_READ | VM_EXEC |
VM_MAYREAD | VM_MAYEXEC |
VM_ALWAYSDUMP | VM_RESERVED,
NULL);
}

const char *arch_vma_name(struct vm_area_struct *vma)
{
return (vma->vm_start == 0xffff0000) ? "[vectors]" : NULL;
}
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-aaec2000/include/mach/vmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
#ifndef __ASM_ARCH_VMALLOC_H
#define __ASM_ARCH_VMALLOC_H

#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
#define VMALLOC_END 0xd0000000

#endif /* __ASM_ARCH_VMALLOC_H */
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-bcmring/include/mach/vmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
* 0xe0000000 to 0xefffffff. This gives us 256 MB of vm space and handles
* larger physical memory designs better.
*/
#define VMALLOC_END (PAGE_OFFSET + 0x30000000)
#define VMALLOC_END 0xf0000000
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-clps711x/include/mach/vmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
#define VMALLOC_END 0xd0000000
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-ebsa110/include/mach/vmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#define VMALLOC_END (PAGE_OFFSET + 0x1f000000)
#define VMALLOC_END 0xdf000000
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-footbridge/include/mach/vmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
*/


#define VMALLOC_END (PAGE_OFFSET + 0x30000000)
#define VMALLOC_END 0xf0000000
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-h720x/include/mach/vmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
#ifndef __ARCH_ARM_VMALLOC_H
#define __ARCH_ARM_VMALLOC_H

#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
#define VMALLOC_END 0xd0000000

#endif
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-integrator/include/mach/vmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
#define VMALLOC_END 0xd0000000
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-msm/include/mach/vmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#ifndef __ASM_ARCH_MSM_VMALLOC_H
#define __ASM_ARCH_MSM_VMALLOC_H

#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
#define VMALLOC_END 0xd0000000

#endif

19 changes: 19 additions & 0 deletions trunk/arch/arm/mach-mx5/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,25 @@ int mx51_revision(void)
}
EXPORT_SYMBOL(mx51_revision);

#ifdef CONFIG_NEON

/*
* All versions of the silicon before Rev. 3 have broken NEON implementations.
* Dependent on link order - so the assumption is that vfp_init is called
* before us.
*/
static int __init mx51_neon_fixup(void)
{
if (mx51_revision() < MX51_CHIP_REV_3_0 && (elf_hwcap & HWCAP_NEON)) {
elf_hwcap &= ~HWCAP_NEON;
pr_info("Turning off NEON support, detected broken NEON implementation\n");
}
return 0;
}

late_initcall(mx51_neon_fixup);
#endif

static int __init post_cpu_init(void)
{
unsigned int reg;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-netx/include/mach/vmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
#define VMALLOC_END 0xd0000000
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-omap1/include/mach/vmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define VMALLOC_END (PAGE_OFFSET + 0x18000000)
#define VMALLOC_END 0xd8000000
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-omap2/include/mach/vmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define VMALLOC_END (PAGE_OFFSET + 0x38000000)
#define VMALLOC_END 0xf8000000
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-pnx4008/include/mach/vmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
* The vmalloc() routines leaves a hole of 4kB between each vmalloced
* area for the same reason. ;)
*/
#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
#define VMALLOC_END 0xd0000000
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-rpc/include/mach/vmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#define VMALLOC_END (PAGE_OFFSET + 0x1c000000)
#define VMALLOC_END 0xdc000000
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-shark/include/mach/vmalloc.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
* arch/arm/mach-shark/include/mach/vmalloc.h
*/
#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
#define VMALLOC_END 0xd0000000
11 changes: 11 additions & 0 deletions trunk/arch/arm/mach-tcc8k/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
if ARCH_TCC8K

comment "TCC8000 systems:"

config MACH_TCC8000_SDK
bool "Telechips TCC8000-SDK development kit"
default y
help
Support for the Telechips TCC8000-SDK board.

endif
9 changes: 9 additions & 0 deletions trunk/arch/arm/mach-tcc8k/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# Makefile for TCC8K boards and common files.
#

# Common support
obj-y += clock.o irq.o time.o io.o devices.o

# Board specific support
obj-$(CONFIG_MACH_TCC8000_SDK) += board-tcc8000-sdk.o
Loading

0 comments on commit ec6886c

Please sign in to comment.