Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756426AbaKTAbS (ORCPT ); Wed, 19 Nov 2014 19:31:18 -0500 Received: from mail-lb0-f171.google.com ([209.85.217.171]:59931 "EHLO mail-lb0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755968AbaKTAbR (ORCPT ); Wed, 19 Nov 2014 19:31:17 -0500 MIME-Version: 1.0 In-Reply-To: References: <20141118145234.GA7487@redhat.com> <20141118215540.GD35311@redhat.com> <20141119021902.GA14216@redhat.com> <20141119145902.GA13387@redhat.com> <20141119190215.GA10796@lerouge> <20141119225615.GA11386@lerouge> From: Andy Lutomirski Date: Wed, 19 Nov 2014 16:30:55 -0800 Message-ID: Subject: Re: frequent lockups in 3.18rc4 To: Thomas Gleixner Cc: "linux-kernel@vger.kernel.org" , Arnaldo Carvalho de Melo , Peter Zijlstra , Linus Torvalds , Frederic Weisbecker , Don Zickus , Dave Jones , "the arch/x86 maintainers" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Nov 19, 2014 4:00 PM, "Thomas Gleixner" wrote: > > On Wed, 19 Nov 2014, Andy Lutomirski wrote: > > On Wed, Nov 19, 2014 at 3:09 PM, Thomas Gleixner wrote: > > > Sorry, I can't follow your argumentation here. > > > > > > pcpu_alloc() > > > .... > > > area_found: > > > .... > > > > > > /* clear the areas and return address relative to base address */ > > > for_each_possible_cpu(cpu) > > > memset((void *)pcpu_chunk_addr(chunk, cpu, 0) + off, 0, size); > > > > > > How would that memset fail to establish the mapping, which is > > > btw. already established via: > > > > > > pcpu_populate_chunk() > > > > > > already before that memset? > > > > I think that this will map them into init_mm->pgd and > > current->active_mm->pgd, but it won't necessarily map them into the > > rest of the pgds. > > And why would mapping them into the kernel mapping, i.e. init_mm not > be sufficient? Because the kernel can run with any pgd loaded into cr3, and we rely on vmalloc_fault to lazily populate pgds in all the non-init pgds as needed. But this only happens if the first TLB-missing reference to the pgd in question with any given cr3 value happens from a safe context. This is why I think that the grsec kernels will crash on very large memory systems. They don't seem to get this right for the kernel stack, and a page fault trying to access the stack is a big no-no. --Andy > > We are talking about kernel memory and not some random user space > mapping. > > Thanks, > > tglx -- 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/