Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755998AbdIGUun (ORCPT ); Thu, 7 Sep 2017 16:50:43 -0400 Received: from mail-it0-f50.google.com ([209.85.214.50]:44699 "EHLO mail-it0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751829AbdIGUum (ORCPT ); Thu, 7 Sep 2017 16:50:42 -0400 X-Google-Smtp-Source: AOwi7QAJKgDJA4EajRcZu7VJ2lSOkWWzxMGDFpIVtpoQgMqm6Wk/lmZZlpLrj8JUgpPV7eyx1BCE9+/gSN/6o2iM9X8= MIME-Version: 1.0 In-Reply-To: <20170907070111.h2aj3gocvvdbgsyd@gmail.com> References: <20170907070111.h2aj3gocvvdbgsyd@gmail.com> From: Linus Torvalds Date: Thu, 7 Sep 2017 13:50:40 -0700 X-Google-Sender-Auth: ywNqMqnwLRCdfI-SbamX4xYVdgg Message-ID: Subject: Re: [PATCH] mm/debug: Change BUG_ON() crashes to survivable WARN_ON() warnings To: Ingo Molnar Cc: Andy Lutomirski , X86 ML , Borislav Petkov , "linux-kernel@vger.kernel.org" , Andrew Morton , Peter Zijlstra , Thomas Gleixner , "H. Peter Anvin" , Borislav Petkov Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 939 Lines: 21 On Thu, Sep 7, 2017 at 12:01 AM, Ingo Molnar wrote: > > On a related note, this bug could have been more debuggable I think. > Could we _please_ change VM_BUG_ON() to WARN_ON() or such? I think it should be WARN_ON_ONCE(), or at least rate-limited some way. Because once you have one of the VM bugs, they tend to repeat. (We had a discussion long ago about making the "ONCE" behavior actually be "once in a blue moon", and just mean that you warn at most once every five minutes or something like that. Because the "once" behavior has also resulted in people missing bugs, because the machine has been up a long time, and maybe you got a warning at boot time, but then five days later something fails silently again). Also, should you do a "dump_vma()" if you then don't give a call stack because you already did it earlier? So the rate limiting would need to cover that part too, methinks. Linus