Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1107365imm; Wed, 1 Aug 2018 10:17:47 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfbCAh6w4Fp/mLLNxR9U00XRJ8v0VQFJ1/n1OX7sF3fM+fWTqGHcbiemPqjlZkIOkwIZbAw X-Received: by 2002:a63:2263:: with SMTP id t35-v6mr9488045pgm.272.1533143866956; Wed, 01 Aug 2018 10:17:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533143866; cv=none; d=google.com; s=arc-20160816; b=l8NSf2FNfalISJqyw3+7Cqps9OQjoi/sHUjYAL9+4QVvJtOdJ75OiOObsgfcpimXrA k0vzyJFHxIwF799SnOd04e5gj1IB/QJxzGsxGA5doI3BnPE/wonm6bgTgWtM8JhXGJxi 3N+HxpyvKOCz6EoY2SwTcbk7xopS+WyKU6NnjfFLh/jJklNQiwMReWngP8nBSwPNL4ru T1cBYIJKV9lmH1sgJgKmgyrdEuKPuyKZFACHkUlWFbJMayhs1s3PHclQkva4t9PnBuu0 5Ok4goQMLvvz1Ns+XRoeKtNJC1QHZ0Fs5OQuxewbZgv3bCnrXTUK6cog8hsP7gnl+glt Kclg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=GAzllBxJyklrgLmXJjj6dSlAHYEyacwpyj8aShj8hFg=; b=CkHiS9+VxQ/m/4Gs2S0Y197OSnp2ADoCU+Fzjz1gNCP6XbQNR7bZpi52C7t+i3Xkn1 M/0gxZU8KUei22tXS4DBDl5sIZ/rBsl7cvs6n7mw/HCFFQX1MfuHx+6389kF5EFsVbuB savQWfda+HYaw4FA9nORQIGy3cJy1be0qnsZCV3gaTjRjwM3ecklw9teAK/Q+oDck7ma KguP7Jlj62BWTvKJ86KlYftrXFFuoTvehB7VDkgRVCPcKKMeR/6kgpIUrRaf5NsM1Y4p /Zz5dUBGJoZSKWaJDEcXuHbjJr08C6VwM7c0nKOIoYumM70Oze38CkeBSCCV30SQUg8R KaRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=MvXkAITy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3-v6si13654322plv.314.2018.08.01.10.17.32; Wed, 01 Aug 2018 10:17:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=MvXkAITy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404083AbeHATB4 (ORCPT + 99 others); Wed, 1 Aug 2018 15:01:56 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:36041 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403790AbeHATB4 (ORCPT ); Wed, 1 Aug 2018 15:01:56 -0400 Received: by mail-io0-f194.google.com with SMTP id r15-v6so16704483ioa.3 for ; Wed, 01 Aug 2018 10:15:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GAzllBxJyklrgLmXJjj6dSlAHYEyacwpyj8aShj8hFg=; b=MvXkAITyLBfrveFt4jp9XvpTAV+m6NmpDUPGe1Ks1y/eKwTRM02/hR+cdkgect7j/O Hxy6TBw8AgOlRvpWbDxGqiHhDLaI0pt2+/HJeOroYmugiNexUA8vZjTX9Z6idP/O6wyE TMTNdJOA5dHvL2pJqc+rc5eJRp7Ekbq7LDnSk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GAzllBxJyklrgLmXJjj6dSlAHYEyacwpyj8aShj8hFg=; b=oHsWjCgsJCjGu6VPSq0l4RFK2B5ospPc81CkfMYqxWZGUh2TEwHied3/nw5X+FPnbe Tskw4mUxD5G+RUG2oescTHX9khaMWTCt2HnIRoTGPNpD/O23H4CiRveSoF95vPL8iWGP lM7e0I2k7La5H54fLMSNGvRJzpp2YtSetpGnTk4T9QFT6baNa8vWT3jd6ACh57laSWYY FAgmUgR/qqvq8Hqkc1DjiS1AwPP1Qs5vsDZkUkIB0Xd2oFume4vBNR0/paqdlErbmUvm KiOhArjmAprnzP52DG8qfb79c103gaRVAEStWbCXWp8fKjxIdnrg+Z4Dj3kJb8TIsKNZ sJBA== X-Gm-Message-State: AOUpUlFdKYJZLuAZ+JnpRIoIXC7f7mz391Lc6mqkJ95ku54k1LYwcJVf lqUrXFwEkms+OMNGF/XOqSKoz523Vfx8VojJcis= X-Received: by 2002:a6b:fc0c:: with SMTP id r12-v6mr4360303ioh.203.1533143716507; Wed, 01 Aug 2018 10:15:16 -0700 (PDT) MIME-Version: 1.0 References: <20180730130134.yvn5tcmoavuxtwt5@kshutemo-mobl1> <20180731170328.ocb5oikwhwtkyzrj@kshutemo-mobl1> <20180731174349.GA12944@agluck-desk> In-Reply-To: <20180731174349.GA12944@agluck-desk> From: Linus Torvalds Date: Wed, 1 Aug 2018 10:15:05 -0700 Message-ID: Subject: Re: Linux 4.18-rc7 To: Tony Luck Cc: "Kirill A. Shutemov" , Amit Pundir , John Stultz , Hugh Dickins , Matthew Wilcox , "Kirill A. Shutemov" , Andrew Morton , Dmitry Vyukov , Oleg Nesterov , Andrea Arcangeli , Greg Kroah-Hartman , linux-mm , Linux Kernel Mailing List , youling 257 , Joel Fernandes , Colin Cross Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 31, 2018 at 10:43 AM Luck, Tony wrote: > > On Tue, Jul 31, 2018 at 08:03:28PM +0300, Kirill A. Shutemov wrote: > > But it's not the only issue unfortunately. Tony reported issue with > > booting ia64 with the patch. I have no clue why. I rechecked everything > > ia64-specific and looks fine to me. :-/ > > If I just revert bfd40eaff5ab ("mm: fix vma_is_anonymous() false-positives") > then ia64 boots again. Ok, I'd love to have more information about this, but I'm assuming that Tony isn't running some odd ia64 version of Android, so there's definitely something else than just the ashmem thing going on. Either it's some odd ia64-specific special vma, or it's just something triggered on an ia64 boot that nobody else noticed or cared about. And I was just going to do the final revert and started this email to say so, when I looked at the obvious candidate: the ia64_init_addr_space() function. Trivially fixed. But as I was doing that, I also noticed another problem with the vma series: the vma_init() conversion of automatic variables is buggy. Commit 2c4541e24c55 ("mm: use vma_init() to initialize VMAs on stack and data segments") is really bad, because it never grew the memset() that was discussed, and the patch that was applied was the original one - so vma_init() only initializes a couple of fields. As a result, doing things like this: - struct vm_area_struct vma = { .vm_mm = mm }; + struct vm_area_struct vma; + vma_init(&vma, mm); is just completely wrong, because it actually initializes much less than it used to, and leaves most of the vma filled with random stack garbage. In particular, it now fills with garbage the fields that TLB flushing really can care about: things like vm_flags that says "is this perhaps an executable-only mapping that only needs to flush the ITLB?" I don't actually believe that we should do vma_init() on those on-stack vma's anyway, since they aren't "real" vma's. They are literally crafted just for TLB flushing - filling in the vm_mm (and sometimes vm_flags) pointers so that the TLB flushing knows what to do. So using "vma_init()" on them is actively detrimental as things stand right now. The reason I looked at them was that I was trying to see who actually uses "vm_area_alloc()" and "vma_init()" right now that would be affected by that commit bfd40eaff5ab ("mm: fix vma_is_anonymous() false-positives") outside of actual honest-to-goodness device file mmaps. Anyway, the upshot of all this is that I think I know what the ia64 problem was, and John sent the patch for the ashmem case, and I'm going to hold off reverting that vma_is_anonymous() false-positives commit after all. I'm still unhappy about the vma_init() ones, and I have not decided how to go with those. Either the memset() in vma_init(), or just reverting the (imho unnecessary) commit 2c4541e24c55. Kirill, Andrew, comments? Tony, can you please double-check my commit ebad825cdd4e ("ia64: mark special ia64 memory areas anonymous") fixes things for you? I didn't even compile it, but it really looks so obvious that I just committed it directly. It's not pushed out yet (I'm doing the normal full build test because of the ashmem commit first), but it should be out in about 20 minutes when my testing has finished. I'd like to get this sorted out asap, although at this point I still think that I'll have to do an rc8 even though I feel like we may have caught everything. Linus