Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5327189ybe; Tue, 10 Sep 2019 01:51:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1ymUE0XlTA/o2iOeMD4zYYXUSzx2U9iS0Q6EHRrjgwrTBLNx8aWLljesK9FrQlPO1u5jI X-Received: by 2002:a50:e005:: with SMTP id e5mr28857354edl.279.1568105495626; Tue, 10 Sep 2019 01:51:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568105495; cv=none; d=google.com; s=arc-20160816; b=rqC8Qf36AP4XUoaQmddC5A6+moAqNrNRrW6n1rhMue993ueioocluoy8OXXbcC3lYc sclnJ3wa2Y/+iY0hq+7K+z2rAlj4ITGdn0DykgJadj47Bhv3pCzspiXDNYD0ZurhX/Fy cfU+2W5DgBRrAFp0mhmeXa3/vqu9yDm/+1fThMQdXryi4Q4tcWhrpqyqhBBWoZ0OWoMR NkZ4BBbGlwp5+A2dOnCAl1CjPNH/IRpcB5aueWkenXJEiiPFfMpr1hazwSOQHv4qR1Rr 2dfOpWulxSk8WrW5JwlvjG14h5nLMzCO4+Rs6M24kFcr2dYYarxIercFR0CYf45iS7Bg O8+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=hCEUuZTmH7JZSazgZauiNORQYEOZ09QkyRcwVeQ8pb8=; b=zWEJtJVp3dbgTuvGUnLESwXBZkzbKpSCVxfF0qrajy5P2W5TQgCyVefo/FqWd/7X5s Ow1wS2ZAVq26UptFZFovlWLeqB2DfEqNjg6hKJ9+TBPNvXaeRanebh0KNXeNDzD9aXiN TbzwMi2KxWl61SBHT1a+nsV9etIZihHq1+FpII80ZQhEJbSlARi7RSFTdEHiLIN8+WvG eErzATjw/EZsN5o/moyE0A6M92wtXlrQxEmj1UCfqdc+GjTPYJy0cUODY76kwGheyGuo V460FY5rOepUIR/qQlyQtO4lD2kOUaJpHMUBts1MlWJmxP/EjlafA8Oho3qKHPjGUnFm WNXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="lElCnuM/"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s3si10333860edx.427.2019.09.10.01.51.11; Tue, 10 Sep 2019 01:51:35 -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=@gmail.com header.s=20161025 header.b="lElCnuM/"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729458AbfIIQFq (ORCPT + 99 others); Mon, 9 Sep 2019 12:05:46 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:41569 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727495AbfIIQFo (ORCPT ); Mon, 9 Sep 2019 12:05:44 -0400 Received: by mail-pg1-f194.google.com with SMTP id x15so8078446pgg.8; Mon, 09 Sep 2019 09:05:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=hCEUuZTmH7JZSazgZauiNORQYEOZ09QkyRcwVeQ8pb8=; b=lElCnuM/yk8u5jMO6suEdZBYPmjwu8chy23l7E6HJm4jvZ1dFx8vmP7GAVOP5wKIBp WgliA0r1aKN4fNChItK6BSgX06QM0LLGrZt0TvdcmxRCkuNIzJYajKGxUSretj1tbHPb jtNhGSWvesra0WBCfz4+SQ0DT3AHDn2Ku0cHTHssk6Jxu1f5b2zGpzjHVFdo+Prpb8MG g+eJf2EPcrTpeKGIWgLWqe9KBpx8oMdRgxus0PF5vnoGeDO3l/ZHA2OBut0HTD1W3ToO C3d05bhLrhY20xyTj+tLb3R/mwsJEZHVc5w+JIeMTihLl2qBWj5jPs71+q9kdrtXRlpA CHwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=hCEUuZTmH7JZSazgZauiNORQYEOZ09QkyRcwVeQ8pb8=; b=UPQy4/GGbh9AvTZaRdckfLk7oX4FP/xQ5GbgmYM2JyCM/z7UWogueFer3Sfj6EVxe2 4oMaNkCB2KV/oxN/x4wXBKcDh/SS01mQb90Wh6pPHpPZt+NC2GJ81plD7EQXUQcXfVOH wFytcAYIfHE+kFg2++fAtJf4P8lZ9o2QQD/XTYGn9EUH6ovbz0AD+69+//D5TTjqMxXw bH84EzIE+aENIBqy1BXNdG2bZ6v87pxz2QHwGQyy56u+cjI5L0DMCKim7QEI7axn2Ivy VqorzoZp59VebOA4M0CBRVnGKdVcthvxBUrtvuDnqE5yk3rkV0DDP5VtaJwfyabVW76z 074w== X-Gm-Message-State: APjAAAXcKzYjqFCksz+j9yVh25ADZC4w61xFtjxYQRXRSNCB96r8W6L9 B440CSPzLROeVzg7IWnWgek= X-Received: by 2002:a17:90a:2243:: with SMTP id c61mr33978pje.39.1568045143137; Mon, 09 Sep 2019 09:05:43 -0700 (PDT) Received: from localhost ([121.137.63.184]) by smtp.gmail.com with ESMTPSA id x8sm14913863pfm.35.2019.09.09.09.05.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2019 09:05:42 -0700 (PDT) From: Sergey Senozhatsky X-Google-Original-From: Sergey Senozhatsky Date: Tue, 10 Sep 2019 01:05:39 +0900 To: 20190819234111.9019-8-keescook@chromium.org Cc: Andrew Morton , Christophe Leroy , Peter Zijlstra , Drew Davenport , Arnd Bergmann , "Steven Rostedt (VMware)" , Feng Tang , Petr Mladek , Mauro Carvalho Chehab , Borislav Petkov , YueHaibing , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 7/7] bug: Move WARN_ON() "cut here" into exception handler Message-ID: <20190909160539.GA989@tigerII.localdomain> References: <201908200943.601DD59DCE@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201908200943.601DD59DCE@keescook> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (08/20/19 09:47), Kees Cook wrote: [..] > @@ -181,6 +181,15 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs) > } > } > > + /* > + * BUG() and WARN_ON() families don't print a custom debug message > + * before triggering the exception handler, so we must add the > + * "cut here" line now. WARN() issues its own "cut here" before the > + * extra debugging message it writes before triggering the handler. > + */ > + if ((bug->flags & BUGFLAG_NO_CUT_HERE) == 0) > + printk(KERN_DEFAULT CUT_HERE); Shouldn't this be pr_warn() or pr_crit()? -ss