From: Luis Henriques <luis.henriques@canonical.com>
To: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Stable <stable@vger.kernel.org>, Jan Engelhardt <jengelh@inai.de>,
linux-arch@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [PATCH 3.18 04/57] vm: add VM_FAULT_SIGSEGV handling support
Date: Mon, 16 Feb 2015 09:50:07 +0000 [thread overview]
Message-ID: <20150216095007.GA2129@charon> (raw)
In-Reply-To: <CALYGNiPVvgxMFyDTSFv4mUhkq-5Q+Gp2UEY5W9G0gEc8YajipQ@mail.gmail.com>
On Tue, Feb 10, 2015 at 12:22:41PM +0400, Konstantin Khlebnikov wrote:
> I've found regression:
>
> [ 257.139907] ================================================
> [ 257.139909] [ BUG: lock held when returning to user space! ]
> [ 257.139912] 3.18.6-debug+ #161 Tainted: G U
> [ 257.139914] ------------------------------------------------
> [ 257.139916] python/22843 is leaving the kernel with locks still held!
> [ 257.139918] 1 lock held by python/22843:
> [ 257.139920] #0: (&mm->mmap_sem){++++++}, at: [<ffffffff8104e4c2>]
> __do_page_fault+0x162/0x570
>
> upstream commit 7fb08eca45270d0ae86e1ad9d39c40b7a55d0190 must be backported too.
>
I guess the same regression can be found in the 3.16 kernel as it also
includes a backport of 33692f27597f ("vm: add VM_FAULT_SIGSEGV
handling support"). I'll queue 7fb08eca4527 ("x86: mm: move mmap_sem
unlock from mm_fault_error() to caller") as well.
Cheers,
--
Luís
> On Wed, Feb 4, 2015 at 2:13 AM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > 3.18-stable review patch. If anyone has any objections, please let me know.
> >
> > ------------------
> >
> > From: Linus Torvalds <torvalds@linux-foundation.org>
> >
> > commit 33692f27597fcab536d7cbbcc8f52905133e4aa7 upstream.
> >
> > The core VM already knows about VM_FAULT_SIGBUS, but cannot return a
> > "you should SIGSEGV" error, because the SIGSEGV case was generally
> > handled by the caller - usually the architecture fault handler.
> >
> > That results in lots of duplication - all the architecture fault
> > handlers end up doing very similar "look up vma, check permissions, do
> > retries etc" - but it generally works. However, there are cases where
> > the VM actually wants to SIGSEGV, and applications _expect_ SIGSEGV.
> >
> > In particular, when accessing the stack guard page, libsigsegv expects a
> > SIGSEGV. And it usually got one, because the stack growth is handled by
> > that duplicated architecture fault handler.
> >
> > However, when the generic VM layer started propagating the error return
> > from the stack expansion in commit fee7e49d4514 ("mm: propagate error
> > from stack expansion even for guard page"), that now exposed the
> > existing VM_FAULT_SIGBUS result to user space. And user space really
> > expected SIGSEGV, not SIGBUS.
> >
> > To fix that case, we need to add a VM_FAULT_SIGSEGV, and teach all those
> > duplicate architecture fault handlers about it. They all already have
> > the code to handle SIGSEGV, so it's about just tying that new return
> > value to the existing code, but it's all a bit annoying.
> >
> > This is the mindless minimal patch to do this. A more extensive patch
> > would be to try to gather up the mostly shared fault handling logic into
> > one generic helper routine, and long-term we really should do that
> > cleanup.
> >
> > Just from this patch, you can generally see that most architectures just
> > copied (directly or indirectly) the old x86 way of doing things, but in
> > the meantime that original x86 model has been improved to hold the VM
> > semaphore for shorter times etc and to handle VM_FAULT_RETRY and other
> > "newer" things, so it would be a good idea to bring all those
> > improvements to the generic case and teach other architectures about
> > them too.
> >
> > Reported-and-tested-by: Takashi Iwai <tiwai@suse.de>
> > Tested-by: Jan Engelhardt <jengelh@inai.de>
> > Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> # "s390 still compiles and boots"
> > Cc: linux-arch@vger.kernel.org
> > Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >
> > ---
> > arch/alpha/mm/fault.c | 2 ++
> > arch/arc/mm/fault.c | 2 ++
> > arch/avr32/mm/fault.c | 2 ++
> > arch/cris/mm/fault.c | 2 ++
> > arch/frv/mm/fault.c | 2 ++
> > arch/ia64/mm/fault.c | 2 ++
> > arch/m32r/mm/fault.c | 2 ++
> > arch/m68k/mm/fault.c | 2 ++
> > arch/metag/mm/fault.c | 2 ++
> > arch/microblaze/mm/fault.c | 2 ++
> > arch/mips/mm/fault.c | 2 ++
> > arch/mn10300/mm/fault.c | 2 ++
> > arch/openrisc/mm/fault.c | 2 ++
> > arch/parisc/mm/fault.c | 2 ++
> > arch/powerpc/mm/copro_fault.c | 2 +-
> > arch/powerpc/mm/fault.c | 2 ++
> > arch/s390/mm/fault.c | 6 ++++++
> > arch/score/mm/fault.c | 2 ++
> > arch/sh/mm/fault.c | 2 ++
> > arch/sparc/mm/fault_32.c | 2 ++
> > arch/sparc/mm/fault_64.c | 2 ++
> > arch/tile/mm/fault.c | 2 ++
> > arch/um/kernel/trap.c | 2 ++
> > arch/x86/mm/fault.c | 2 ++
> > arch/xtensa/mm/fault.c | 2 ++
> > drivers/staging/lustre/lustre/llite/vvp_io.c | 2 +-
> > include/linux/mm.h | 6 ++++--
> > mm/gup.c | 4 ++--
> > mm/ksm.c | 2 +-
> > 29 files changed, 61 insertions(+), 7 deletions(-)
> >
> > --- a/arch/alpha/mm/fault.c
> > +++ b/arch/alpha/mm/fault.c
> > @@ -156,6 +156,8 @@ retry:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/arc/mm/fault.c
> > +++ b/arch/arc/mm/fault.c
> > @@ -161,6 +161,8 @@ good_area:
> >
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> >
> > --- a/arch/avr32/mm/fault.c
> > +++ b/arch/avr32/mm/fault.c
> > @@ -142,6 +142,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/cris/mm/fault.c
> > +++ b/arch/cris/mm/fault.c
> > @@ -176,6 +176,8 @@ retry:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/frv/mm/fault.c
> > +++ b/arch/frv/mm/fault.c
> > @@ -168,6 +168,8 @@ asmlinkage void do_page_fault(int datamm
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/ia64/mm/fault.c
> > +++ b/arch/ia64/mm/fault.c
> > @@ -172,6 +172,8 @@ retry:
> > */
> > if (fault & VM_FAULT_OOM) {
> > goto out_of_memory;
> > + } else if (fault & VM_FAULT_SIGSEGV) {
> > + goto bad_area;
> > } else if (fault & VM_FAULT_SIGBUS) {
> > signal = SIGBUS;
> > goto bad_area;
> > --- a/arch/m32r/mm/fault.c
> > +++ b/arch/m32r/mm/fault.c
> > @@ -200,6 +200,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/m68k/mm/fault.c
> > +++ b/arch/m68k/mm/fault.c
> > @@ -145,6 +145,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto map_err;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto bus_err;
> > BUG();
> > --- a/arch/metag/mm/fault.c
> > +++ b/arch/metag/mm/fault.c
> > @@ -141,6 +141,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/microblaze/mm/fault.c
> > +++ b/arch/microblaze/mm/fault.c
> > @@ -224,6 +224,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/mips/mm/fault.c
> > +++ b/arch/mips/mm/fault.c
> > @@ -158,6 +158,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/mn10300/mm/fault.c
> > +++ b/arch/mn10300/mm/fault.c
> > @@ -262,6 +262,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/openrisc/mm/fault.c
> > +++ b/arch/openrisc/mm/fault.c
> > @@ -171,6 +171,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/parisc/mm/fault.c
> > +++ b/arch/parisc/mm/fault.c
> > @@ -256,6 +256,8 @@ good_area:
> > */
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto bad_area;
> > BUG();
> > --- a/arch/powerpc/mm/copro_fault.c
> > +++ b/arch/powerpc/mm/copro_fault.c
> > @@ -76,7 +76,7 @@ int copro_handle_mm_fault(struct mm_stru
> > if (*flt & VM_FAULT_OOM) {
> > ret = -ENOMEM;
> > goto out_unlock;
> > - } else if (*flt & VM_FAULT_SIGBUS) {
> > + } else if (*flt & (VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV)) {
> > ret = -EFAULT;
> > goto out_unlock;
> > }
> > --- a/arch/powerpc/mm/fault.c
> > +++ b/arch/powerpc/mm/fault.c
> > @@ -444,6 +444,8 @@ good_area:
> > */
> > fault = handle_mm_fault(mm, vma, address, flags);
> > if (unlikely(fault & (VM_FAULT_RETRY|VM_FAULT_ERROR))) {
> > + if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > rc = mm_fault_error(regs, address, fault);
> > if (rc >= MM_FAULT_RETURN)
> > goto bail;
> > --- a/arch/s390/mm/fault.c
> > +++ b/arch/s390/mm/fault.c
> > @@ -374,6 +374,12 @@ static noinline void do_fault_error(stru
> > do_no_context(regs);
> > else
> > pagefault_out_of_memory();
> > + } else if (fault & VM_FAULT_SIGSEGV) {
> > + /* Kernel mode? Handle exceptions or die */
> > + if (!user_mode(regs))
> > + do_no_context(regs);
> > + else
> > + do_sigsegv(regs, SEGV_MAPERR);
> > } else if (fault & VM_FAULT_SIGBUS) {
> > /* Kernel mode? Handle exceptions or die */
> > if (!user_mode(regs))
> > --- a/arch/score/mm/fault.c
> > +++ b/arch/score/mm/fault.c
> > @@ -114,6 +114,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/sh/mm/fault.c
> > +++ b/arch/sh/mm/fault.c
> > @@ -353,6 +353,8 @@ mm_fault_error(struct pt_regs *regs, uns
> > } else {
> > if (fault & VM_FAULT_SIGBUS)
> > do_sigbus(regs, error_code, address);
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + bad_area(regs, error_code, address);
> > else
> > BUG();
> > }
> > --- a/arch/sparc/mm/fault_32.c
> > +++ b/arch/sparc/mm/fault_32.c
> > @@ -249,6 +249,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/sparc/mm/fault_64.c
> > +++ b/arch/sparc/mm/fault_64.c
> > @@ -446,6 +446,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/tile/mm/fault.c
> > +++ b/arch/tile/mm/fault.c
> > @@ -444,6 +444,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/um/kernel/trap.c
> > +++ b/arch/um/kernel/trap.c
> > @@ -80,6 +80,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM) {
> > goto out_of_memory;
> > + } else if (fault & VM_FAULT_SIGSEGV) {
> > + goto out;
> > } else if (fault & VM_FAULT_SIGBUS) {
> > err = -EACCES;
> > goto out;
> > --- a/arch/x86/mm/fault.c
> > +++ b/arch/x86/mm/fault.c
> > @@ -905,6 +905,8 @@ mm_fault_error(struct pt_regs *regs, uns
> > if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON|
> > VM_FAULT_HWPOISON_LARGE))
> > do_sigbus(regs, error_code, address, fault);
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + bad_area_nosemaphore(regs, error_code, address);
> > else
> > BUG();
> > }
> > --- a/arch/xtensa/mm/fault.c
> > +++ b/arch/xtensa/mm/fault.c
> > @@ -117,6 +117,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/drivers/staging/lustre/lustre/llite/vvp_io.c
> > +++ b/drivers/staging/lustre/lustre/llite/vvp_io.c
> > @@ -632,7 +632,7 @@ static int vvp_io_kernel_fault(struct vv
> > return 0;
> > }
> >
> > - if (cfio->fault.ft_flags & VM_FAULT_SIGBUS) {
> > + if (cfio->fault.ft_flags & (VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV)) {
> > CDEBUG(D_PAGE, "got addr %p - SIGBUS\n", vmf->virtual_address);
> > return -EFAULT;
> > }
> > --- a/include/linux/mm.h
> > +++ b/include/linux/mm.h
> > @@ -1054,6 +1054,7 @@ static inline int page_mapped(struct pag
> > #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */
> > #define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned small page */
> > #define VM_FAULT_HWPOISON_LARGE 0x0020 /* Hit poisoned large page. Index encoded in upper bits */
> > +#define VM_FAULT_SIGSEGV 0x0040
> >
> > #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */
> > #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */
> > @@ -1062,8 +1063,9 @@ static inline int page_mapped(struct pag
> >
> > #define VM_FAULT_HWPOISON_LARGE_MASK 0xf000 /* encodes hpage index for large hwpoison */
> >
> > -#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON | \
> > - VM_FAULT_FALLBACK | VM_FAULT_HWPOISON_LARGE)
> > +#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV | \
> > + VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_LARGE | \
> > + VM_FAULT_FALLBACK)
> >
> > /* Encode hstate index for a hwpoisoned large page */
> > #define VM_FAULT_SET_HINDEX(x) ((x) << 12)
> > --- a/mm/gup.c
> > +++ b/mm/gup.c
> > @@ -296,7 +296,7 @@ static int faultin_page(struct task_stru
> > return -ENOMEM;
> > if (ret & (VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_LARGE))
> > return *flags & FOLL_HWPOISON ? -EHWPOISON : -EFAULT;
> > - if (ret & VM_FAULT_SIGBUS)
> > + if (ret & (VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV))
> > return -EFAULT;
> > BUG();
> > }
> > @@ -571,7 +571,7 @@ int fixup_user_fault(struct task_struct
> > return -ENOMEM;
> > if (ret & (VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_LARGE))
> > return -EHWPOISON;
> > - if (ret & VM_FAULT_SIGBUS)
> > + if (ret & (VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV))
> > return -EFAULT;
> > BUG();
> > }
> > --- a/mm/ksm.c
> > +++ b/mm/ksm.c
> > @@ -376,7 +376,7 @@ static int break_ksm(struct vm_area_stru
> > else
> > ret = VM_FAULT_WRITE;
> > put_page(page);
> > - } while (!(ret & (VM_FAULT_WRITE | VM_FAULT_SIGBUS | VM_FAULT_OOM)));
> > + } while (!(ret & (VM_FAULT_WRITE | VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV | VM_FAULT_OOM)));
> > /*
> > * We must loop because handle_mm_fault() may back out if there's
> > * any difficulty e.g. if pte accessed bit gets updated concurrently.
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Luis Henriques <luis.henriques@canonical.com>
To: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Stable <stable@vger.kernel.org>, Jan Engelhardt <jengelh@inai.de>,
linux-arch@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [PATCH 3.18 04/57] vm: add VM_FAULT_SIGSEGV handling support
Date: Mon, 16 Feb 2015 09:50:07 +0000 [thread overview]
Message-ID: <20150216095007.GA2129@charon> (raw)
In-Reply-To: <CALYGNiPVvgxMFyDTSFv4mUhkq-5Q+Gp2UEY5W9G0gEc8YajipQ@mail.gmail.com>
On Tue, Feb 10, 2015 at 12:22:41PM +0400, Konstantin Khlebnikov wrote:
> I've found regression:
>
> [ 257.139907] ================================================
> [ 257.139909] [ BUG: lock held when returning to user space! ]
> [ 257.139912] 3.18.6-debug+ #161 Tainted: G U
> [ 257.139914] ------------------------------------------------
> [ 257.139916] python/22843 is leaving the kernel with locks still held!
> [ 257.139918] 1 lock held by python/22843:
> [ 257.139920] #0: (&mm->mmap_sem){++++++}, at: [<ffffffff8104e4c2>]
> __do_page_fault+0x162/0x570
>
> upstream commit 7fb08eca45270d0ae86e1ad9d39c40b7a55d0190 must be backported too.
>
I guess the same regression can be found in the 3.16 kernel as it also
includes a backport of 33692f27597f ("vm: add VM_FAULT_SIGSEGV
handling support"). I'll queue 7fb08eca4527 ("x86: mm: move mmap_sem
unlock from mm_fault_error() to caller") as well.
Cheers,
--
Luis
> On Wed, Feb 4, 2015 at 2:13 AM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > 3.18-stable review patch. If anyone has any objections, please let me know.
> >
> > ------------------
> >
> > From: Linus Torvalds <torvalds@linux-foundation.org>
> >
> > commit 33692f27597fcab536d7cbbcc8f52905133e4aa7 upstream.
> >
> > The core VM already knows about VM_FAULT_SIGBUS, but cannot return a
> > "you should SIGSEGV" error, because the SIGSEGV case was generally
> > handled by the caller - usually the architecture fault handler.
> >
> > That results in lots of duplication - all the architecture fault
> > handlers end up doing very similar "look up vma, check permissions, do
> > retries etc" - but it generally works. However, there are cases where
> > the VM actually wants to SIGSEGV, and applications _expect_ SIGSEGV.
> >
> > In particular, when accessing the stack guard page, libsigsegv expects a
> > SIGSEGV. And it usually got one, because the stack growth is handled by
> > that duplicated architecture fault handler.
> >
> > However, when the generic VM layer started propagating the error return
> > from the stack expansion in commit fee7e49d4514 ("mm: propagate error
> > from stack expansion even for guard page"), that now exposed the
> > existing VM_FAULT_SIGBUS result to user space. And user space really
> > expected SIGSEGV, not SIGBUS.
> >
> > To fix that case, we need to add a VM_FAULT_SIGSEGV, and teach all those
> > duplicate architecture fault handlers about it. They all already have
> > the code to handle SIGSEGV, so it's about just tying that new return
> > value to the existing code, but it's all a bit annoying.
> >
> > This is the mindless minimal patch to do this. A more extensive patch
> > would be to try to gather up the mostly shared fault handling logic into
> > one generic helper routine, and long-term we really should do that
> > cleanup.
> >
> > Just from this patch, you can generally see that most architectures just
> > copied (directly or indirectly) the old x86 way of doing things, but in
> > the meantime that original x86 model has been improved to hold the VM
> > semaphore for shorter times etc and to handle VM_FAULT_RETRY and other
> > "newer" things, so it would be a good idea to bring all those
> > improvements to the generic case and teach other architectures about
> > them too.
> >
> > Reported-and-tested-by: Takashi Iwai <tiwai@suse.de>
> > Tested-by: Jan Engelhardt <jengelh@inai.de>
> > Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> # "s390 still compiles and boots"
> > Cc: linux-arch@vger.kernel.org
> > Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >
> > ---
> > arch/alpha/mm/fault.c | 2 ++
> > arch/arc/mm/fault.c | 2 ++
> > arch/avr32/mm/fault.c | 2 ++
> > arch/cris/mm/fault.c | 2 ++
> > arch/frv/mm/fault.c | 2 ++
> > arch/ia64/mm/fault.c | 2 ++
> > arch/m32r/mm/fault.c | 2 ++
> > arch/m68k/mm/fault.c | 2 ++
> > arch/metag/mm/fault.c | 2 ++
> > arch/microblaze/mm/fault.c | 2 ++
> > arch/mips/mm/fault.c | 2 ++
> > arch/mn10300/mm/fault.c | 2 ++
> > arch/openrisc/mm/fault.c | 2 ++
> > arch/parisc/mm/fault.c | 2 ++
> > arch/powerpc/mm/copro_fault.c | 2 +-
> > arch/powerpc/mm/fault.c | 2 ++
> > arch/s390/mm/fault.c | 6 ++++++
> > arch/score/mm/fault.c | 2 ++
> > arch/sh/mm/fault.c | 2 ++
> > arch/sparc/mm/fault_32.c | 2 ++
> > arch/sparc/mm/fault_64.c | 2 ++
> > arch/tile/mm/fault.c | 2 ++
> > arch/um/kernel/trap.c | 2 ++
> > arch/x86/mm/fault.c | 2 ++
> > arch/xtensa/mm/fault.c | 2 ++
> > drivers/staging/lustre/lustre/llite/vvp_io.c | 2 +-
> > include/linux/mm.h | 6 ++++--
> > mm/gup.c | 4 ++--
> > mm/ksm.c | 2 +-
> > 29 files changed, 61 insertions(+), 7 deletions(-)
> >
> > --- a/arch/alpha/mm/fault.c
> > +++ b/arch/alpha/mm/fault.c
> > @@ -156,6 +156,8 @@ retry:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/arc/mm/fault.c
> > +++ b/arch/arc/mm/fault.c
> > @@ -161,6 +161,8 @@ good_area:
> >
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> >
> > --- a/arch/avr32/mm/fault.c
> > +++ b/arch/avr32/mm/fault.c
> > @@ -142,6 +142,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/cris/mm/fault.c
> > +++ b/arch/cris/mm/fault.c
> > @@ -176,6 +176,8 @@ retry:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/frv/mm/fault.c
> > +++ b/arch/frv/mm/fault.c
> > @@ -168,6 +168,8 @@ asmlinkage void do_page_fault(int datamm
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/ia64/mm/fault.c
> > +++ b/arch/ia64/mm/fault.c
> > @@ -172,6 +172,8 @@ retry:
> > */
> > if (fault & VM_FAULT_OOM) {
> > goto out_of_memory;
> > + } else if (fault & VM_FAULT_SIGSEGV) {
> > + goto bad_area;
> > } else if (fault & VM_FAULT_SIGBUS) {
> > signal = SIGBUS;
> > goto bad_area;
> > --- a/arch/m32r/mm/fault.c
> > +++ b/arch/m32r/mm/fault.c
> > @@ -200,6 +200,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/m68k/mm/fault.c
> > +++ b/arch/m68k/mm/fault.c
> > @@ -145,6 +145,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto map_err;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto bus_err;
> > BUG();
> > --- a/arch/metag/mm/fault.c
> > +++ b/arch/metag/mm/fault.c
> > @@ -141,6 +141,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/microblaze/mm/fault.c
> > +++ b/arch/microblaze/mm/fault.c
> > @@ -224,6 +224,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/mips/mm/fault.c
> > +++ b/arch/mips/mm/fault.c
> > @@ -158,6 +158,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/mn10300/mm/fault.c
> > +++ b/arch/mn10300/mm/fault.c
> > @@ -262,6 +262,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/openrisc/mm/fault.c
> > +++ b/arch/openrisc/mm/fault.c
> > @@ -171,6 +171,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/parisc/mm/fault.c
> > +++ b/arch/parisc/mm/fault.c
> > @@ -256,6 +256,8 @@ good_area:
> > */
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto bad_area;
> > BUG();
> > --- a/arch/powerpc/mm/copro_fault.c
> > +++ b/arch/powerpc/mm/copro_fault.c
> > @@ -76,7 +76,7 @@ int copro_handle_mm_fault(struct mm_stru
> > if (*flt & VM_FAULT_OOM) {
> > ret = -ENOMEM;
> > goto out_unlock;
> > - } else if (*flt & VM_FAULT_SIGBUS) {
> > + } else if (*flt & (VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV)) {
> > ret = -EFAULT;
> > goto out_unlock;
> > }
> > --- a/arch/powerpc/mm/fault.c
> > +++ b/arch/powerpc/mm/fault.c
> > @@ -444,6 +444,8 @@ good_area:
> > */
> > fault = handle_mm_fault(mm, vma, address, flags);
> > if (unlikely(fault & (VM_FAULT_RETRY|VM_FAULT_ERROR))) {
> > + if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > rc = mm_fault_error(regs, address, fault);
> > if (rc >= MM_FAULT_RETURN)
> > goto bail;
> > --- a/arch/s390/mm/fault.c
> > +++ b/arch/s390/mm/fault.c
> > @@ -374,6 +374,12 @@ static noinline void do_fault_error(stru
> > do_no_context(regs);
> > else
> > pagefault_out_of_memory();
> > + } else if (fault & VM_FAULT_SIGSEGV) {
> > + /* Kernel mode? Handle exceptions or die */
> > + if (!user_mode(regs))
> > + do_no_context(regs);
> > + else
> > + do_sigsegv(regs, SEGV_MAPERR);
> > } else if (fault & VM_FAULT_SIGBUS) {
> > /* Kernel mode? Handle exceptions or die */
> > if (!user_mode(regs))
> > --- a/arch/score/mm/fault.c
> > +++ b/arch/score/mm/fault.c
> > @@ -114,6 +114,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/sh/mm/fault.c
> > +++ b/arch/sh/mm/fault.c
> > @@ -353,6 +353,8 @@ mm_fault_error(struct pt_regs *regs, uns
> > } else {
> > if (fault & VM_FAULT_SIGBUS)
> > do_sigbus(regs, error_code, address);
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + bad_area(regs, error_code, address);
> > else
> > BUG();
> > }
> > --- a/arch/sparc/mm/fault_32.c
> > +++ b/arch/sparc/mm/fault_32.c
> > @@ -249,6 +249,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/sparc/mm/fault_64.c
> > +++ b/arch/sparc/mm/fault_64.c
> > @@ -446,6 +446,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/tile/mm/fault.c
> > +++ b/arch/tile/mm/fault.c
> > @@ -444,6 +444,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/um/kernel/trap.c
> > +++ b/arch/um/kernel/trap.c
> > @@ -80,6 +80,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM) {
> > goto out_of_memory;
> > + } else if (fault & VM_FAULT_SIGSEGV) {
> > + goto out;
> > } else if (fault & VM_FAULT_SIGBUS) {
> > err = -EACCES;
> > goto out;
> > --- a/arch/x86/mm/fault.c
> > +++ b/arch/x86/mm/fault.c
> > @@ -905,6 +905,8 @@ mm_fault_error(struct pt_regs *regs, uns
> > if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON|
> > VM_FAULT_HWPOISON_LARGE))
> > do_sigbus(regs, error_code, address, fault);
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + bad_area_nosemaphore(regs, error_code, address);
> > else
> > BUG();
> > }
> > --- a/arch/xtensa/mm/fault.c
> > +++ b/arch/xtensa/mm/fault.c
> > @@ -117,6 +117,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/drivers/staging/lustre/lustre/llite/vvp_io.c
> > +++ b/drivers/staging/lustre/lustre/llite/vvp_io.c
> > @@ -632,7 +632,7 @@ static int vvp_io_kernel_fault(struct vv
> > return 0;
> > }
> >
> > - if (cfio->fault.ft_flags & VM_FAULT_SIGBUS) {
> > + if (cfio->fault.ft_flags & (VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV)) {
> > CDEBUG(D_PAGE, "got addr %p - SIGBUS\n", vmf->virtual_address);
> > return -EFAULT;
> > }
> > --- a/include/linux/mm.h
> > +++ b/include/linux/mm.h
> > @@ -1054,6 +1054,7 @@ static inline int page_mapped(struct pag
> > #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */
> > #define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned small page */
> > #define VM_FAULT_HWPOISON_LARGE 0x0020 /* Hit poisoned large page. Index encoded in upper bits */
> > +#define VM_FAULT_SIGSEGV 0x0040
> >
> > #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */
> > #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */
> > @@ -1062,8 +1063,9 @@ static inline int page_mapped(struct pag
> >
> > #define VM_FAULT_HWPOISON_LARGE_MASK 0xf000 /* encodes hpage index for large hwpoison */
> >
> > -#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON | \
> > - VM_FAULT_FALLBACK | VM_FAULT_HWPOISON_LARGE)
> > +#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV | \
> > + VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_LARGE | \
> > + VM_FAULT_FALLBACK)
> >
> > /* Encode hstate index for a hwpoisoned large page */
> > #define VM_FAULT_SET_HINDEX(x) ((x) << 12)
> > --- a/mm/gup.c
> > +++ b/mm/gup.c
> > @@ -296,7 +296,7 @@ static int faultin_page(struct task_stru
> > return -ENOMEM;
> > if (ret & (VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_LARGE))
> > return *flags & FOLL_HWPOISON ? -EHWPOISON : -EFAULT;
> > - if (ret & VM_FAULT_SIGBUS)
> > + if (ret & (VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV))
> > return -EFAULT;
> > BUG();
> > }
> > @@ -571,7 +571,7 @@ int fixup_user_fault(struct task_struct
> > return -ENOMEM;
> > if (ret & (VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_LARGE))
> > return -EHWPOISON;
> > - if (ret & VM_FAULT_SIGBUS)
> > + if (ret & (VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV))
> > return -EFAULT;
> > BUG();
> > }
> > --- a/mm/ksm.c
> > +++ b/mm/ksm.c
> > @@ -376,7 +376,7 @@ static int break_ksm(struct vm_area_stru
> > else
> > ret = VM_FAULT_WRITE;
> > put_page(page);
> > - } while (!(ret & (VM_FAULT_WRITE | VM_FAULT_SIGBUS | VM_FAULT_OOM)));
> > + } while (!(ret & (VM_FAULT_WRITE | VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV | VM_FAULT_OOM)));
> > /*
> > * We must loop because handle_mm_fault() may back out if there's
> > * any difficulty e.g. if pte accessed bit gets updated concurrently.
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Luis Henriques <luis.henriques@canonical.com>
To: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Stable <stable@vger.kernel.org>, Jan Engelhardt <jengelh@inai.de>,
linux-arch@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [PATCH 3.18 04/57] vm: add VM_FAULT_SIGSEGV handling support
Date: Mon, 16 Feb 2015 09:50:07 +0000 [thread overview]
Message-ID: <20150216095007.GA2129@charon> (raw)
In-Reply-To: <CALYGNiPVvgxMFyDTSFv4mUhkq-5Q+Gp2UEY5W9G0gEc8YajipQ@mail.gmail.com>
On Tue, Feb 10, 2015 at 12:22:41PM +0400, Konstantin Khlebnikov wrote:
> I've found regression:
>
> [ 257.139907] ================================================
> [ 257.139909] [ BUG: lock held when returning to user space! ]
> [ 257.139912] 3.18.6-debug+ #161 Tainted: G U
> [ 257.139914] ------------------------------------------------
> [ 257.139916] python/22843 is leaving the kernel with locks still held!
> [ 257.139918] 1 lock held by python/22843:
> [ 257.139920] #0: (&mm->mmap_sem){++++++}, at: [<ffffffff8104e4c2>]
> __do_page_fault+0x162/0x570
>
> upstream commit 7fb08eca45270d0ae86e1ad9d39c40b7a55d0190 must be backported too.
>
I guess the same regression can be found in the 3.16 kernel as it also
includes a backport of 33692f27597f ("vm: add VM_FAULT_SIGSEGV
handling support"). I'll queue 7fb08eca4527 ("x86: mm: move mmap_sem
unlock from mm_fault_error() to caller") as well.
Cheers,
--
Lu�s
> On Wed, Feb 4, 2015 at 2:13 AM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > 3.18-stable review patch. If anyone has any objections, please let me know.
> >
> > ------------------
> >
> > From: Linus Torvalds <torvalds@linux-foundation.org>
> >
> > commit 33692f27597fcab536d7cbbcc8f52905133e4aa7 upstream.
> >
> > The core VM already knows about VM_FAULT_SIGBUS, but cannot return a
> > "you should SIGSEGV" error, because the SIGSEGV case was generally
> > handled by the caller - usually the architecture fault handler.
> >
> > That results in lots of duplication - all the architecture fault
> > handlers end up doing very similar "look up vma, check permissions, do
> > retries etc" - but it generally works. However, there are cases where
> > the VM actually wants to SIGSEGV, and applications _expect_ SIGSEGV.
> >
> > In particular, when accessing the stack guard page, libsigsegv expects a
> > SIGSEGV. And it usually got one, because the stack growth is handled by
> > that duplicated architecture fault handler.
> >
> > However, when the generic VM layer started propagating the error return
> > from the stack expansion in commit fee7e49d4514 ("mm: propagate error
> > from stack expansion even for guard page"), that now exposed the
> > existing VM_FAULT_SIGBUS result to user space. And user space really
> > expected SIGSEGV, not SIGBUS.
> >
> > To fix that case, we need to add a VM_FAULT_SIGSEGV, and teach all those
> > duplicate architecture fault handlers about it. They all already have
> > the code to handle SIGSEGV, so it's about just tying that new return
> > value to the existing code, but it's all a bit annoying.
> >
> > This is the mindless minimal patch to do this. A more extensive patch
> > would be to try to gather up the mostly shared fault handling logic into
> > one generic helper routine, and long-term we really should do that
> > cleanup.
> >
> > Just from this patch, you can generally see that most architectures just
> > copied (directly or indirectly) the old x86 way of doing things, but in
> > the meantime that original x86 model has been improved to hold the VM
> > semaphore for shorter times etc and to handle VM_FAULT_RETRY and other
> > "newer" things, so it would be a good idea to bring all those
> > improvements to the generic case and teach other architectures about
> > them too.
> >
> > Reported-and-tested-by: Takashi Iwai <tiwai@suse.de>
> > Tested-by: Jan Engelhardt <jengelh@inai.de>
> > Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> # "s390 still compiles and boots"
> > Cc: linux-arch@vger.kernel.org
> > Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >
> > ---
> > arch/alpha/mm/fault.c | 2 ++
> > arch/arc/mm/fault.c | 2 ++
> > arch/avr32/mm/fault.c | 2 ++
> > arch/cris/mm/fault.c | 2 ++
> > arch/frv/mm/fault.c | 2 ++
> > arch/ia64/mm/fault.c | 2 ++
> > arch/m32r/mm/fault.c | 2 ++
> > arch/m68k/mm/fault.c | 2 ++
> > arch/metag/mm/fault.c | 2 ++
> > arch/microblaze/mm/fault.c | 2 ++
> > arch/mips/mm/fault.c | 2 ++
> > arch/mn10300/mm/fault.c | 2 ++
> > arch/openrisc/mm/fault.c | 2 ++
> > arch/parisc/mm/fault.c | 2 ++
> > arch/powerpc/mm/copro_fault.c | 2 +-
> > arch/powerpc/mm/fault.c | 2 ++
> > arch/s390/mm/fault.c | 6 ++++++
> > arch/score/mm/fault.c | 2 ++
> > arch/sh/mm/fault.c | 2 ++
> > arch/sparc/mm/fault_32.c | 2 ++
> > arch/sparc/mm/fault_64.c | 2 ++
> > arch/tile/mm/fault.c | 2 ++
> > arch/um/kernel/trap.c | 2 ++
> > arch/x86/mm/fault.c | 2 ++
> > arch/xtensa/mm/fault.c | 2 ++
> > drivers/staging/lustre/lustre/llite/vvp_io.c | 2 +-
> > include/linux/mm.h | 6 ++++--
> > mm/gup.c | 4 ++--
> > mm/ksm.c | 2 +-
> > 29 files changed, 61 insertions(+), 7 deletions(-)
> >
> > --- a/arch/alpha/mm/fault.c
> > +++ b/arch/alpha/mm/fault.c
> > @@ -156,6 +156,8 @@ retry:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/arc/mm/fault.c
> > +++ b/arch/arc/mm/fault.c
> > @@ -161,6 +161,8 @@ good_area:
> >
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> >
> > --- a/arch/avr32/mm/fault.c
> > +++ b/arch/avr32/mm/fault.c
> > @@ -142,6 +142,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/cris/mm/fault.c
> > +++ b/arch/cris/mm/fault.c
> > @@ -176,6 +176,8 @@ retry:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/frv/mm/fault.c
> > +++ b/arch/frv/mm/fault.c
> > @@ -168,6 +168,8 @@ asmlinkage void do_page_fault(int datamm
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/ia64/mm/fault.c
> > +++ b/arch/ia64/mm/fault.c
> > @@ -172,6 +172,8 @@ retry:
> > */
> > if (fault & VM_FAULT_OOM) {
> > goto out_of_memory;
> > + } else if (fault & VM_FAULT_SIGSEGV) {
> > + goto bad_area;
> > } else if (fault & VM_FAULT_SIGBUS) {
> > signal = SIGBUS;
> > goto bad_area;
> > --- a/arch/m32r/mm/fault.c
> > +++ b/arch/m32r/mm/fault.c
> > @@ -200,6 +200,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/m68k/mm/fault.c
> > +++ b/arch/m68k/mm/fault.c
> > @@ -145,6 +145,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto map_err;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto bus_err;
> > BUG();
> > --- a/arch/metag/mm/fault.c
> > +++ b/arch/metag/mm/fault.c
> > @@ -141,6 +141,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/microblaze/mm/fault.c
> > +++ b/arch/microblaze/mm/fault.c
> > @@ -224,6 +224,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/mips/mm/fault.c
> > +++ b/arch/mips/mm/fault.c
> > @@ -158,6 +158,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/mn10300/mm/fault.c
> > +++ b/arch/mn10300/mm/fault.c
> > @@ -262,6 +262,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/openrisc/mm/fault.c
> > +++ b/arch/openrisc/mm/fault.c
> > @@ -171,6 +171,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/parisc/mm/fault.c
> > +++ b/arch/parisc/mm/fault.c
> > @@ -256,6 +256,8 @@ good_area:
> > */
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto bad_area;
> > BUG();
> > --- a/arch/powerpc/mm/copro_fault.c
> > +++ b/arch/powerpc/mm/copro_fault.c
> > @@ -76,7 +76,7 @@ int copro_handle_mm_fault(struct mm_stru
> > if (*flt & VM_FAULT_OOM) {
> > ret = -ENOMEM;
> > goto out_unlock;
> > - } else if (*flt & VM_FAULT_SIGBUS) {
> > + } else if (*flt & (VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV)) {
> > ret = -EFAULT;
> > goto out_unlock;
> > }
> > --- a/arch/powerpc/mm/fault.c
> > +++ b/arch/powerpc/mm/fault.c
> > @@ -444,6 +444,8 @@ good_area:
> > */
> > fault = handle_mm_fault(mm, vma, address, flags);
> > if (unlikely(fault & (VM_FAULT_RETRY|VM_FAULT_ERROR))) {
> > + if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > rc = mm_fault_error(regs, address, fault);
> > if (rc >= MM_FAULT_RETURN)
> > goto bail;
> > --- a/arch/s390/mm/fault.c
> > +++ b/arch/s390/mm/fault.c
> > @@ -374,6 +374,12 @@ static noinline void do_fault_error(stru
> > do_no_context(regs);
> > else
> > pagefault_out_of_memory();
> > + } else if (fault & VM_FAULT_SIGSEGV) {
> > + /* Kernel mode? Handle exceptions or die */
> > + if (!user_mode(regs))
> > + do_no_context(regs);
> > + else
> > + do_sigsegv(regs, SEGV_MAPERR);
> > } else if (fault & VM_FAULT_SIGBUS) {
> > /* Kernel mode? Handle exceptions or die */
> > if (!user_mode(regs))
> > --- a/arch/score/mm/fault.c
> > +++ b/arch/score/mm/fault.c
> > @@ -114,6 +114,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/sh/mm/fault.c
> > +++ b/arch/sh/mm/fault.c
> > @@ -353,6 +353,8 @@ mm_fault_error(struct pt_regs *regs, uns
> > } else {
> > if (fault & VM_FAULT_SIGBUS)
> > do_sigbus(regs, error_code, address);
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + bad_area(regs, error_code, address);
> > else
> > BUG();
> > }
> > --- a/arch/sparc/mm/fault_32.c
> > +++ b/arch/sparc/mm/fault_32.c
> > @@ -249,6 +249,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/sparc/mm/fault_64.c
> > +++ b/arch/sparc/mm/fault_64.c
> > @@ -446,6 +446,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/tile/mm/fault.c
> > +++ b/arch/tile/mm/fault.c
> > @@ -444,6 +444,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/arch/um/kernel/trap.c
> > +++ b/arch/um/kernel/trap.c
> > @@ -80,6 +80,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM) {
> > goto out_of_memory;
> > + } else if (fault & VM_FAULT_SIGSEGV) {
> > + goto out;
> > } else if (fault & VM_FAULT_SIGBUS) {
> > err = -EACCES;
> > goto out;
> > --- a/arch/x86/mm/fault.c
> > +++ b/arch/x86/mm/fault.c
> > @@ -905,6 +905,8 @@ mm_fault_error(struct pt_regs *regs, uns
> > if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON|
> > VM_FAULT_HWPOISON_LARGE))
> > do_sigbus(regs, error_code, address, fault);
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + bad_area_nosemaphore(regs, error_code, address);
> > else
> > BUG();
> > }
> > --- a/arch/xtensa/mm/fault.c
> > +++ b/arch/xtensa/mm/fault.c
> > @@ -117,6 +117,8 @@ good_area:
> > if (unlikely(fault & VM_FAULT_ERROR)) {
> > if (fault & VM_FAULT_OOM)
> > goto out_of_memory;
> > + else if (fault & VM_FAULT_SIGSEGV)
> > + goto bad_area;
> > else if (fault & VM_FAULT_SIGBUS)
> > goto do_sigbus;
> > BUG();
> > --- a/drivers/staging/lustre/lustre/llite/vvp_io.c
> > +++ b/drivers/staging/lustre/lustre/llite/vvp_io.c
> > @@ -632,7 +632,7 @@ static int vvp_io_kernel_fault(struct vv
> > return 0;
> > }
> >
> > - if (cfio->fault.ft_flags & VM_FAULT_SIGBUS) {
> > + if (cfio->fault.ft_flags & (VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV)) {
> > CDEBUG(D_PAGE, "got addr %p - SIGBUS\n", vmf->virtual_address);
> > return -EFAULT;
> > }
> > --- a/include/linux/mm.h
> > +++ b/include/linux/mm.h
> > @@ -1054,6 +1054,7 @@ static inline int page_mapped(struct pag
> > #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */
> > #define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned small page */
> > #define VM_FAULT_HWPOISON_LARGE 0x0020 /* Hit poisoned large page. Index encoded in upper bits */
> > +#define VM_FAULT_SIGSEGV 0x0040
> >
> > #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */
> > #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */
> > @@ -1062,8 +1063,9 @@ static inline int page_mapped(struct pag
> >
> > #define VM_FAULT_HWPOISON_LARGE_MASK 0xf000 /* encodes hpage index for large hwpoison */
> >
> > -#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON | \
> > - VM_FAULT_FALLBACK | VM_FAULT_HWPOISON_LARGE)
> > +#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV | \
> > + VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_LARGE | \
> > + VM_FAULT_FALLBACK)
> >
> > /* Encode hstate index for a hwpoisoned large page */
> > #define VM_FAULT_SET_HINDEX(x) ((x) << 12)
> > --- a/mm/gup.c
> > +++ b/mm/gup.c
> > @@ -296,7 +296,7 @@ static int faultin_page(struct task_stru
> > return -ENOMEM;
> > if (ret & (VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_LARGE))
> > return *flags & FOLL_HWPOISON ? -EHWPOISON : -EFAULT;
> > - if (ret & VM_FAULT_SIGBUS)
> > + if (ret & (VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV))
> > return -EFAULT;
> > BUG();
> > }
> > @@ -571,7 +571,7 @@ int fixup_user_fault(struct task_struct
> > return -ENOMEM;
> > if (ret & (VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_LARGE))
> > return -EHWPOISON;
> > - if (ret & VM_FAULT_SIGBUS)
> > + if (ret & (VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV))
> > return -EFAULT;
> > BUG();
> > }
> > --- a/mm/ksm.c
> > +++ b/mm/ksm.c
> > @@ -376,7 +376,7 @@ static int break_ksm(struct vm_area_stru
> > else
> > ret = VM_FAULT_WRITE;
> > put_page(page);
> > - } while (!(ret & (VM_FAULT_WRITE | VM_FAULT_SIGBUS | VM_FAULT_OOM)));
> > + } while (!(ret & (VM_FAULT_WRITE | VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV | VM_FAULT_OOM)));
> > /*
> > * We must loop because handle_mm_fault() may back out if there's
> > * any difficulty e.g. if pte accessed bit gets updated concurrently.
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-02-16 9:49 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-03 23:13 [PATCH 3.18 00/57] 3.18.6-stable review Greg Kroah-Hartman
2015-02-03 23:13 ` [PATCH 3.18 01/57] x86, build: replace Perl script with Shell script Greg Kroah-Hartman
2015-02-03 23:13 ` [PATCH 3.18 02/57] spi: dw: Fix detecting FIFO depth Greg Kroah-Hartman
2015-02-03 23:13 ` [PATCH 3.18 03/57] spi: dw-mid: fix FIFO size Greg Kroah-Hartman
2015-02-03 23:13 ` [PATCH 3.18 04/57] vm: add VM_FAULT_SIGSEGV handling support Greg Kroah-Hartman
2015-02-10 8:22 ` Konstantin Khlebnikov
2015-02-10 8:22 ` Konstantin Khlebnikov
2015-02-11 3:43 ` Greg Kroah-Hartman
2015-02-11 3:43 ` Greg Kroah-Hartman
2015-02-11 3:49 ` Linus Torvalds
2015-02-11 3:49 ` Linus Torvalds
2015-02-11 4:16 ` Greg Kroah-Hartman
2015-02-11 4:16 ` Greg Kroah-Hartman
2015-02-11 5:34 ` Konstantin Khlebnikov
2015-02-11 5:34 ` Konstantin Khlebnikov
2015-02-16 9:50 ` Luis Henriques [this message]
2015-02-16 9:50 ` Luis Henriques
2015-02-16 9:50 ` Luis Henriques
2015-02-03 23:13 ` [PATCH 3.18 05/57] arc: mm: Fix build failure Greg Kroah-Hartman
2015-02-03 23:13 ` [PATCH 3.18 06/57] vm: make stack guard page errors return VM_FAULT_SIGSEGV rather than SIGBUS Greg Kroah-Hartman
2015-02-03 23:13 ` [PATCH 3.18 07/57] ASoC: wm8960: Fix capture sample rate from 11250 to 11025 Greg Kroah-Hartman
2015-02-03 23:13 ` [PATCH 3.18 08/57] ASoC: pcm512x: Fix DSP program selection Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 09/57] ASoC: fsl_esai: Fix incorrect xDC field width of xCCR registers Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 10/57] ASoC: soc-compress.c: fix NULL dereference Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 11/57] ASoC: simple-card: Fix crash in asoc_simple_card_unref() Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 12/57] ASoC: omap-mcbsp: Correct CBM_CFS dai format configuration Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 13/57] udf: Release preallocation on last writeable close Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 14/57] can: kvaser_usb: Do not sleep in atomic context Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 15/57] can: kvaser_usb: Send correct context to URB completion Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 16/57] can: kvaser_usb: Retry the first bulk transfer on -ETIMEDOUT Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 17/57] can: kvaser_usb: Fix state handling upon BUS_ERROR events Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 18/57] powerpc/xmon: Fix another endiannes issue in RTAS call from xmon Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 19/57] ALSA: seq-dummy: remove deadlock-causing events on close Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 20/57] rbd: drop parent_ref in rbd_dev_unprobe() unconditionally Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 21/57] rbd: fix rbd_dev_parent_get() when parent_overlap == 0 Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 22/57] USB: Add OTG PET device to TPL Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 23/57] usb-storage/SCSI: blacklist FUA on JMicron 152d:2566 USB-SATA controller Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 24/57] uas: Add no-report-opcodes quirk for Simpletech devices with id 4971:8017 Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 25/57] i2c: s3c2410: fix ABBA deadlock by keeping clock prepared Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 26/57] Input: synaptics - adjust min/max for Lenovo ThinkPad X1 Carbon 2nd Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 27/57] Input: elantech - add more Fujtisu notebooks to force crc_enabled Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 28/57] Input: i8042 - add noloop quirk for Medion Akoya E7225 (MD98857) Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 29/57] nfs: fix dio deadlock when O_DIRECT flag is flipped Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 30/57] NFSv4.1: Fix an Oops in nfs41_walk_client_list Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 31/57] mac80211: properly set CCK flag in radiotap Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 32/57] mac80211: only roll back station states for WDS when suspending Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 33/57] nl80211: fix per-station group key get/del and memory leak Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 34/57] pinctrl: at91: allow to have disabled gpio bank Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 35/57] ARM: mvebu: dont set the PL310 in I/O coherency mode when I/O coherency is disabled Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 36/57] dm thin: dont allow messages to be sent to a pool target in READ_ONLY or FAIL mode Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 37/57] dm cache: fix missing ERR_PTR returns and handling Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 38/57] drm/vmwgfx: Replace the hw mutex with a hw spinlock Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 41/57] spi/pxa2xx: Clear cur_chip pointer before starting next message Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 42/57] drivers/rtc/rtc-s5m.c: terminate s5m_rtc_id array with empty element Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 43/57] regulator: core: fix race condition in regulator_put() Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 44/57] drivers: net: cpsw: discard dual emac default vlan configuration Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 45/57] drm: fix fb-helper vs MST dangling connector ptrs (v2) Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 46/57] drm/i915: Only fence tiled region of object Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 47/57] drm/i915: BDW Fix Halo PCI IDs marked as ULT Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 48/57] drm/i915: Init PPGTT before context enable Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 49/57] drm/i915: fix inconsistent brightness after resume Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 50/57] quota: Switch ->get_dqblk() and ->set_dqblk() to use bytes as space units Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 51/57] memcg: remove extra newlines from memcg oom kill log Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 52/57] perf/x86/intel: Add model number for Airmont Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 53/57] perf/rapl: Fix crash in rapl_scale() Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 54/57] HID: rmi: Check for additional ACM registers appended to F11 data report Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 55/57] can: c_can: end pending transmission on network stop (ifdown) Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 56/57] clocksource: arch_timer: Only use the virtual counter (CNTVCT) on arm64 Greg Kroah-Hartman
2015-02-03 23:14 ` [PATCH 3.18 57/57] xen/arm/arm64: introduce xen_arch_need_swiotlb Greg Kroah-Hartman
2015-02-04 14:03 ` [PATCH 3.18 00/57] 3.18.6-stable review Guenter Roeck
2015-02-04 19:22 ` Greg Kroah-Hartman
2015-02-04 17:30 ` Shuah Khan
2015-02-04 19:22 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150216095007.GA2129@charon \
--to=luis.henriques@canonical.com \
--cc=gregkh@linuxfoundation.org \
--cc=jengelh@inai.de \
--cc=koct9i@gmail.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.