From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7973C433E1 for ; Mon, 13 Jul 2020 03:51:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A8EF72068F for ; Mon, 13 Jul 2020 03:51:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="JZ6Y3SBE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A8EF72068F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2E8168D0003; Sun, 12 Jul 2020 23:51:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 29B628D0002; Sun, 12 Jul 2020 23:51:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1AF2F8D0003; Sun, 12 Jul 2020 23:51:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0109.hostedemail.com [216.40.44.109]) by kanga.kvack.org (Postfix) with ESMTP id 05C278D0002 for ; Sun, 12 Jul 2020 23:51:48 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id A31C4180AD81F for ; Mon, 13 Jul 2020 03:51:47 +0000 (UTC) X-FDA: 77031678654.30.boats47_071541b26ee5 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id 6B6D6180B3C83 for ; Mon, 13 Jul 2020 03:51:47 +0000 (UTC) X-HE-Tag: boats47_071541b26ee5 X-Filterd-Recvd-Size: 5447 Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) by imf46.hostedemail.com (Postfix) with ESMTP for ; Mon, 13 Jul 2020 03:51:46 +0000 (UTC) Received: by mail-lf1-f66.google.com with SMTP id y13so7439873lfe.9 for ; Sun, 12 Jul 2020 20:51:46 -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=PXZYm8YjUP841mdR1yGtgQbyBqro7EalxNIZG50LFuM=; b=JZ6Y3SBEjypR0Q/yrJj53ldh8gpnRfjQF/RT1b64yjpHydiLr0yIS3u64B/OW5XJ4/ tBqykrHxUwjAHq0UxLcdms0xudmr7CC4BSdN8v+rXw8M+XyIrWJaQmCLkL9Q4eyPIlNw tfry+uqmdsBjisvh7Qv+FSefQ995KqX6/6xdY= 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=PXZYm8YjUP841mdR1yGtgQbyBqro7EalxNIZG50LFuM=; b=X80rjFcNqDBKer5yZlFcIlhDOdaBKFPd7xbmZlrlpok/AotCYO+ys/iuzk6+lBDxa0 xtRL+eFsWCLaqhUXs+CC6jMIm/wWdZIw5DEaKXUxzuKtyZS/KR2JVthn87Fv2/z39DO7 7dyCXtGxHMMB0LEuzTxMZA789aQzNM3wfrp736t05GctXWkAcxKb4SAEXlsi9ZWVHAIK laXA5uXhyNjOs76fasF/7Rmt/hjTO+8GiKnTC6NgRFOcReY+mwaG0GNBmHQOERatoDj+ eLiG9F1lq6VVJcO/bKh9VPTE0xN4lNJTo5hFRtWePNxho1nHTMMnWvD3pmJI8P6iJ7XL hP4w== X-Gm-Message-State: AOAM532gT7gp3sDcWFhiOr8aUcOXPW+gM2eCHCqKwNo81TJUP6sPhcAd M1zn4IzaodkE7h3Tq5aX9DgLhrz4Ve4= X-Google-Smtp-Source: ABdhPJxAGUrsa6Rxpe/VqopAyMac12PNPyudknPL6/j+YRi/UHgiyaHLaE4r6a7r7R4cIq0uluGdlw== X-Received: by 2002:a19:c64e:: with SMTP id w75mr51370784lff.64.1594612304866; Sun, 12 Jul 2020 20:51:44 -0700 (PDT) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com. [209.85.167.41]) by smtp.gmail.com with ESMTPSA id u19sm5314490ljk.0.2020.07.12.20.51.43 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Jul 2020 20:51:43 -0700 (PDT) Received: by mail-lf1-f41.google.com with SMTP id c11so7449482lfh.8 for ; Sun, 12 Jul 2020 20:51:43 -0700 (PDT) X-Received: by 2002:ac2:5a5e:: with SMTP id r30mr51926816lfn.30.1594612302784; Sun, 12 Jul 2020 20:51:42 -0700 (PDT) MIME-Version: 1.0 References: <20200712215041.GA3644504@google.com> <20200713025354.GB3644504@google.com> In-Reply-To: <20200713025354.GB3644504@google.com> From: Linus Torvalds Date: Sun, 12 Jul 2020 20:51:26 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: WARNING: at mm/mremap.c:211 move_page_tables in i386 To: Joel Fernandes Cc: Naresh Kamboju , linux- stable , open list , linux-mm , Arnd Bergmann , Andrew Morton , Roman Gushchin , Michal Hocko , lkft-triage@lists.linaro.org, Chris Down , Michel Lespinasse , Fan Yang , Brian Geffon , Anshuman Khandual , Will Deacon , Catalin Marinas , pugaowei@gmail.com, Jerome Glisse , Greg Kroah-Hartman , Mel Gorman , Hugh Dickins , Al Viro , Tejun Heo , Sasha Levin Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 6B6D6180B3C83 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sun, Jul 12, 2020 at 7:53 PM Joel Fernandes wrote: > > > But I do feel like you figured out why the bug happened, now we're > > just discussing whether the patch is the right thing to do. > > Yes. > > > Maybe saying "doing the pmd copies for the initial stack isn't > > important, so let's just note this as a special case and get rid of > > the WARN_ON()" might be an alternative solution. > > Personally, I feel it is better to keep the warning just so in the future we > can detect any bugs. I don't disagree, the warning didn't happen to find a bug now, but it did fine a case we might be able to do better. So now that I feel we understand the issue, and it's not a horrible problem, just a (very hard to trigger) warning, I don't think there's any huge hurry. I think think I will - for now - change the WARN_ON() to WARN_ON_ONCE() (so that it doesn't floow the logs if somebody triggers this odd special case this malisiously), and add a note about how this happens to the code for posterito. And if/when you figure out a better way to fix it, we can update the note. Ok? Linus