Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2230170ybv; Fri, 21 Feb 2020 11:21:30 -0800 (PST) X-Google-Smtp-Source: APXvYqxKojkNJjbvPF/sRiYG/zLkim/7F8emlX8LFRLwRG1RODGsYv5CimyPZFOZiwaiNDuw+kmm X-Received: by 2002:aca:2b04:: with SMTP id i4mr3284924oik.21.1582312889882; Fri, 21 Feb 2020 11:21:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582312889; cv=none; d=google.com; s=arc-20160816; b=0qRR4jMyvtVxhbUhp47Uow2ulpXOl3Yy5EaXoYg4BUfpHITJPaqxvOOmStjb9QF+VV 3bLSeQwSIGDX2yGj97GsTZBKpFErLf+IwktUAJ/6QXSkmt7qvA+jveBGwVVneRqNLyRv JDT1OD3a3kX8/oB0p/42oIQzJfM7IBb1GwNxuRyhXOUh0kfTTmzwp7WLTe0Mh8QSydr4 slOrU9OrhgzA1V25jLn64dsqay51nDZvVMd55xnLzAZXUhFdqKXQ/vs3umA091E79Vrb SXE0NpIYj9SzxS+IOKzaei7OyHiu3+AnQh1SDVYxC1S+EOMjvzahxPfoAUrXZwrhPwD6 mT4g== 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; bh=fFUjPnLNK/wofno2JMZpXV7vXMx2oIijpSJUiltCnRQ=; b=uYJCpECWn9baFwDQlZ67U6X6KmSV2DBQ/NYSvmyjDu2X8iByUALO5kgiegU/4NCALw 1w8RSeodjJirmTff+TLRqPL7JlcOmTpjlcnnhmkJ0PmlM3MEiM5dpfPpOPbIA53XA8Gn geKySYRRNSykQg9MWSn9qVRejB4h2MdTtYK2fWSr1iVMkM6MlYwGBjcP2yeA8L3cHZAY +eS+7b8ybj8BtgWiP4tBuSQMvyG7Ym28pFTBvAxVrObuDJwp+QU9zUYcm6IkMqJtvjUO zlPn/19KiewGKop58Edy1Beeim6QYxMTck4RB4yzGkJQV+RzyAmSuqsCmT35tYjGexBt layA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=B3G2KKEU; 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 j9si1746501otl.153.2020.02.21.11.21.17; Fri, 21 Feb 2020 11:21:29 -0800 (PST) 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=B3G2KKEU; 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 S1729751AbgBUTTl (ORCPT + 99 others); Fri, 21 Feb 2020 14:19:41 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:45586 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729648AbgBUTTl (ORCPT ); Fri, 21 Feb 2020 14:19:41 -0500 Received: by mail-lf1-f68.google.com with SMTP id z5so2249961lfd.12 for ; Fri, 21 Feb 2020 11:19:40 -0800 (PST) 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=fFUjPnLNK/wofno2JMZpXV7vXMx2oIijpSJUiltCnRQ=; b=B3G2KKEUhlVgVK344fmGjze/ZrUx1gRELcUjzX2MZk6dt5sHBy9TVpnr6DOZcTqRzr 2b4WojyPXm2dR1cT/troSmXekZ+1QzSmhIlwp+EKOYuEQbWpMFC3phurjv1HKDUFX9Bk Um8J439MwjhswJRC48fABzZqJqvUhocgFGCf8= 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=fFUjPnLNK/wofno2JMZpXV7vXMx2oIijpSJUiltCnRQ=; b=ipFstfwyCEzTEnDi+Y8iXYHxwfXAfmfxj7F/LA2CK/Rw21W8UpF/i97huJyx432SU1 35xV3tuEpe5l5pmPiWA9S9XyGJUkG3FAgyThsrKePuC1w2DJck8xHRWEQJW9tZdQq7hi JSl4t9+axfRlDnd2U+KgfaUfHd+qcqWZ9G+dK8surN03Z3JP0lmP1WE5+wDohZpYT80g hD/vRMAlJ6DCYUjtbm53VpSLc1bCPcy0D7S0PZe1swZrMFZD32qOz2o/b5Sj8OviEQRb OPTnK6NBGLvUZLJnaxL/uHkbWk5FALnPY18iPqhjUAtNzQVeZ6jiK2o/qaU/yZWZ3WCP EHbg== X-Gm-Message-State: APjAAAVOY17EDSMuat5Dekb3BHu0Jj9NSopl4vBVB2cV8OOvCmJR2mNl GVRAwWetANN6tbE7Nlz0ijJlFV4s7ok= X-Received: by 2002:a19:7b0a:: with SMTP id w10mr20691195lfc.90.1582312779259; Fri, 21 Feb 2020 11:19:39 -0800 (PST) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com. [209.85.208.172]) by smtp.gmail.com with ESMTPSA id 23sm2167322ljw.31.2020.02.21.11.19.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Feb 2020 11:19:38 -0800 (PST) Received: by mail-lj1-f172.google.com with SMTP id q8so3310083ljj.11 for ; Fri, 21 Feb 2020 11:19:38 -0800 (PST) X-Received: by 2002:a2e:461a:: with SMTP id t26mr22705661lja.204.1582312777962; Fri, 21 Feb 2020 11:19:37 -0800 (PST) MIME-Version: 1.0 References: <20200221111138.GX14897@hirez.programming.kicks-ass.net> In-Reply-To: <20200221111138.GX14897@hirez.programming.kicks-ass.net> From: Linus Torvalds Date: Fri, 21 Feb 2020 11:19:22 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] mm/tlb: Fix use_mm() vs TLB invalidate To: Peter Zijlstra Cc: Andrew Morton , Linux Kernel Mailing List , Andy Lutomirski , Jens Axboe , Kees Cook , Jann Horn , Will Deacon 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 Fri, Feb 21, 2020 at 3:11 AM Peter Zijlstra wrote: > > + BUG_ON(!(tsk->flags & PF_KTHREAD)); > + BUG_ON(tsk->mm != NULL); Stop this craziness. There is absolutely ZERO excuse for this kind of garbage. Making this a BUG_ON() will just cause all the possible debugging info to be thrown away and lost, and you often have a dead machine. For absolutely no good reason. Make it a WARN_ON_ONCE(). If it triggers, everything works the way it always did, but we get notified. Stop with the stupid crazy BUG_ON() crap already. It is actively _bad_ for debugging. Linus