09 Mar, 2013

1 commit


26 Feb, 2013

1 commit

  • Paolo Pisati reports that IPv6 triggers this warning:

    BUG: scheduling while atomic: swapper/0/0/0x40000100
    Modules linked in:
    [] (unwind_backtrace+0x0/0xf0) from [] (__schedule_bug+0x48/0x5c)
    [] (__schedule_bug+0x48/0x5c) from [] (__schedule+0x700/0x740)
    [] (__schedule+0x700/0x740) from [] (__cond_resched+0x24/0x34)
    [] (__cond_resched+0x24/0x34) from [] (_cond_resched+0x3c/0x44)
    [] (_cond_resched+0x3c/0x44) from [] (do_alignment+0x178/0x78c)
    [] (do_alignment+0x178/0x78c) from [] (do_DataAbort+0x34/0x98)
    [] (do_DataAbort+0x34/0x98) from [] (__dabt_svc+0x40/0x60)
    Exception stack(0xc0763d70 to 0xc0763db8)
    3d60: e97e805e e97e806e 2c000000 11000000
    3d80: ea86bb00 0000002c 00000011 e97e807e c076d2a8 e97e805e e97e806e 0000002c
    3da0: 3d000000 c0763dbc c04b98fc c02a8490 00000113 ffffffff
    [] (__dabt_svc+0x40/0x60) from [] (__csum_ipv6_magic+0x8/0xc8)

    Fix this by using probe_kernel_address() stead of __get_user().

    Cc:
    Reported-by: Paolo Pisati
    Tested-by: Paolo Pisati
    Signed-off-by: Russell King

    Russell King
     

01 Feb, 2013

1 commit

  • This makes cr_alignment a constant 0 to break code that tries to modify
    the value as it's likely that it's built on wrong assumption when
    CONFIG_CPU_CP15 isn't defined. For code that is only reading the value 0
    is more or less a fine value to report.

    Signed-off-by: Uwe Kleine-König
    Message-Id: 1358413196-5609-2-git-send-email-u.kleine-koenig@pengutronix.de (v8)

    Uwe Kleine-König
     

04 Nov, 2012

1 commit

  • The variables here are really not used uninitialized.

    arch/arm/mm/alignment.c: In function 'do_alignment':
    arch/arm/mm/alignment.c:327:15: warning: 'offset.un' may be used uninitialized in this function [-Wmaybe-uninitialized]
    arch/arm/mm/alignment.c:748:21: note: 'offset.un' was declared here

    Signed-off-by: Viresh Kumar
    Signed-off-by: Russell King

    viresh kumar
     

10 Oct, 2012

1 commit

  • One such warning was recently fixed in a761cebf "ARM: Fix build warning
    in arch/arm/mm/alignment.c" but only for the thumb2 case, this fixes
    the other half.

    arch/arm/mm/alignment.c: In function 'do_alignment':
    arch/arm/mm/alignment.c:327:15: error: 'offset.un' may be used uninitialized in this function
    arch/arm/mm/alignment.c:748:21: note: 'offset.un' was declared here

    Signed-off-by: Arnd Bergmann
    Cc: Russell King

    Arnd Bergmann
     

16 Sep, 2012

1 commit

  • Fix this harmless build warning:

    arch/arm/mm/alignment.c: In function 'do_alignment':
    arch/arm/mm/alignment.c:749:21: warning: 'offset.un' may be used uninitialized in this function

    This is caused by the compiler not being able to properly analyse the
    code to prove that offset.un is assigned in every case. The case it
    struggles with is where we assign the handler from the Thumb parser -
    do_alignment_t32_to_handler(). As this starts by zeroing this variable
    via a pointer, move it into the calling function. This fixes the
    warning.

    Signed-off-by: Russell King

    Russell King
     

29 Mar, 2012

2 commits


08 Dec, 2011

1 commit


02 Oct, 2011

1 commit


09 Aug, 2011

2 commits

  • With the UM_SIGNAL alignment fault mode, no siginfo structure is
    passed to userspace.

    POSIX specifies how siginfo_t should be populated for alignment
    faults, so this patch does just that:

    * si_signo = SIGBUS
    * si_code = BUS_ADRALN
    * si_addr = misaligned data address at which access was attempted

    Signed-off-by: Dave Martin
    Acked-by: Nicolas Pitre
    Acked-by: Kirill A. Shutemov
    Reviewed-by: Will Deacon
    Signed-off-by: Russell King

    Dave Martin
     
  • Currently, it's possible to set the kernel to ignore alignment
    faults when changing the alignment fault handling mode at runtime
    via /proc/sys/alignment, even though this is undesirable on ARMv6
    and above, where it can result in infinite spins where an un-fixed-
    up instruction repeatedly faults.

    In addition, the kernel clobbers any alignment mode specified on
    the command-line if running on ARMv6 or above.

    This patch factors out the necessary safety check into a couple of
    new helper functions, and checks and modifies the fault handling
    mode as appropriate on boot and on writes to /proc/cpu/alignment.

    Prior to ARMv6, the behaviour is unchanged.

    For ARMv6 and above, the behaviour changes as follows:

    * Attempting to ignore faults on ARMv6 results in the mode being
    forced to UM_FIXUP instead. A warning is printed if this
    happened as a result of a write to /proc/cpu/alignment. The
    user's UM_WARN bit (if present) is still honoured.

    * An alignment= argument from the kernel command-line is now
    honoured, except that the kernel will modify the specified mode
    as described above. This is allows modes such as UM_SIGNAL and
    UM_WARN to be active immediately from boot, which is useful for
    debugging purposes.

    Signed-off-by: Dave Martin
    Acked-by: Nicolas Pitre
    Signed-off-by: Russell King

    Dave Martin
     

02 Jul, 2011

1 commit


23 Sep, 2010

1 commit

  • When the policy for user space is to ignore misaligned accesses from user
    space, the processor then performs a documented rotation on the accessed
    data. This is the result of the access being trapped, and the kernel
    disabling the alignment trap before returning to user space again.

    In kernel space we always want misaligned accesses to be fixed up. This
    is enforced by always re-enabling the alignment trap on every entry into
    kernel space from user space. No such re-enabling is performed when an
    exception occurs while already in kernel space as the alignment trap is
    always supposed to be enabled in that case.

    There is however a small race window when a misaligned access in user
    space is trapped and the alignment trap disabled, but the CPU didn't
    return to user space just yet. Any exception would be entered from kernel
    space at that point and the kernel would then execute with the alignment
    trap disabled.

    Thanks to Maxime Bizon for providing a test module
    that made this issue reproducible.

    Signed-off-by: Nicolas Pitre
    Signed-off-by: Russell King

    Nicolas Pitre
     

27 Jul, 2010

3 commits


18 May, 2010

1 commit


15 May, 2010

1 commit

  • Convert code away from ->read_proc/->write_proc interfaces. Switch to
    proc_create()/proc_create_data() which makes addition of proc entries
    reliable wrt NULL ->proc_fops, NULL ->data and so on.

    Problem with ->read_proc et al is described here commit
    786d7e1612f0b0adb6046f19b906609e4fe8b1ba "Fix rmmod/read/write races in
    /proc entries"

    This patch is part of an effort to remove the old simple procfs PAGE_SIZE
    buffer interface.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Russell King

    Alexey Dobriyan
     

21 Apr, 2010

1 commit

  • /tmp/ccJ3ssZW.s: Assembler messages:
    /tmp/ccJ3ssZW.s:1952: Error: can't resolve `.text' {.text section} - `.LFB1077'

    This is caused because:

    .section .data
    .section .text
    .section .text
    .previous

    does not return us to the .text section, but the .data section; this
    makes use of .previous dangerous if the ordering of previous sections
    is not known.

    Fix up the other users of .previous; .pushsection and .popsection are
    a safer pairing to use than .section and .previous.

    Signed-off-by: Russell King

    Russell King
     

02 Mar, 2010

1 commit

  • * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (100 commits)
    ARM: Eliminate decompressor -Dstatic= PIC hack
    ARM: 5958/1: ARM: U300: fix inverted clk round rate
    ARM: 5956/1: misplaced parentheses
    ARM: 5955/1: ep93xx: move timer defines into core.c and document
    ARM: 5954/1: ep93xx: move gpio interrupt support to gpio.c
    ARM: 5953/1: ep93xx: fix broken build of clock.c
    ARM: 5952/1: ARM: MM: Add ARM_L1_CACHE_SHIFT_6 for handle inside each ARCH Kconfig
    ARM: 5949/1: NUC900 add gpio virtual memory map
    ARM: 5948/1: Enable timer0 to time4 clock support for nuc910
    ARM: 5940/2: ARM: MMCI: remove custom DBG macro and printk
    ARM: make_coherent(): fix problems with highpte, part 2
    MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itself
    ARM: 5945/1: ep93xx: include correct irq.h in core.c
    ARM: 5933/1: amba-pl011: support hardware flow control
    ARM: 5930/1: Add PKMAP area description to memory.txt.
    ARM: 5929/1: Add checks to detect overlap of memory regions.
    ARM: 5928/1: Change type of VMALLOC_END to unsigned long.
    ARM: 5927/1: Make delimiters of DMA area globally visibly.
    ARM: 5926/1: Add "Virtual kernel memory..." printout.
    ARM: 5920/1: OMAP4: Enable L2 Cache
    ...

    Fix up trivial conflict in arch/arm/mach-mx25/clock.c

    Linus Torvalds
     

21 Feb, 2010

1 commit

  • Some glibc versions intentionally create lots of alignment faults in
    their gconv code, which if not fixed up, results in segfaults during
    boot. This can prevent systems booting properly.

    There is no clear hard-configurable default for this; the desired
    default depends on the nature of the userspace which is going to be
    booted.

    So, provide a way for the alignment fault handler to be configured via
    the kernel command line.

    Signed-off-by: Russell King

    Russell King
     

16 Feb, 2010

1 commit


24 Jul, 2009

1 commit


19 Jun, 2009

1 commit

  • From: Min Zhang

    Add alignment fault fixup support for 32-bit Thumb-2 LDM, LDRD, POP,
    PUSH, STM and STRD instructions. Alignment fault fixup support for
    the remaining 32-bit Thumb-2 load/store instruction cases is not
    included since ARMv6 and later processors include hardware support
    for loads and stores of unaligned words and halfwords.

    Signed-off-by: Min Zhang
    Signed-off-by: George G. Davis
    Signed-off-by: Russell King

    George G. Davis
     

16 Dec, 2008

1 commit


07 Dec, 2008

1 commit

  • On ARMv6 and later CPUs, it is possible for userspace processes to
    get stuck on a misaligned load or store due to the "ignore fault"
    setting; unlike previous CPUs, retrying the instruction without
    the 'A' bit set does not always cause the load to succeed.

    We have no real option but to default to fixing up alignment faults
    on these CPUs, and having the CPU fix up those misaligned accesses
    which it can.

    Reported-by: Wolfgang Grandegger
    Signed-off-by: Russell King

    Russell King
     

30 Nov, 2008

1 commit


06 Sep, 2008

1 commit


20 Oct, 2007

1 commit

  • One of the easiest things to isolate is the pid printed in kernel log.
    There was a patch, that made this for arch-independent code, this one makes
    so for arch/xxx files.

    It took some time to cross-compile it, but hopefully these are all the
    printks in arch code.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Pavel Emelyanov
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

01 Jun, 2007

1 commit

  • Fix various bits of obviously-busted code which we're not happening to
    compile, due to ifdefs.

    Cc: "Luck, Tony"
    Cc: Ivan Kokshaysky
    Cc: Richard Henderson
    Cc: Russell King
    Cc: Ralf Baechle
    Cc: Jeff Garzik
    Cc: Jan Kara
    Cc: James Bottomley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoann Padioleau
     

21 May, 2007

1 commit


22 Apr, 2007

1 commit


27 Sep, 2006

1 commit


01 Jul, 2006

1 commit


13 Oct, 2005

1 commit


10 Oct, 2005

1 commit


01 Sep, 2005

1 commit

  • Patch from Steve Longerbeam

    Adds an implementation of unaligned LDRD and STRD fixups.
    Also fixes a bug where do_alignment() would misinterpret and
    fixup an unaligned LDRD/STRD as LDRH/STRH, causing memory
    corruption.
    This is the same as Patch #2867/1, but with minor whitespace
    and comments changes, plus a check for arch-level >= v5TE
    before printing ai_dword count in proc_alignment_read().

    Signed-off-by: Steve Longerbeam
    Signed-off-by: Russell King

    Steve Longerbeam
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds