Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9940421ybi; Wed, 24 Jul 2019 12:42:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqyw/BUKljlXAthkaRT8jcOv+cjsQGlzZJbLvfAGGzpPlZQOhm/QVp2h56xFb0bieAoldUBF X-Received: by 2002:a17:90a:30aa:: with SMTP id h39mr89702576pjb.32.1563997376142; Wed, 24 Jul 2019 12:42:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563997376; cv=none; d=google.com; s=arc-20160816; b=JxQlTyLgC0DH6XblHVfKi/HW0qWFSmL0NDNtBYundV944hR/EP23RgG7+zDUF/GB91 50lqYqyh7AD983YAK61ozHdmOsQ6fNdLgWmm8k2taWj3DlU+/GSWkFJ8LFYexhlY6FTc k8ooRxh4MKpMj42V4NUe61E44FNXvBFFOv/FK1Y3qqpg1ngleX/dk5EKu27eA/jNqcFg WjmGFJVtpHBAi3yqhQ04AZgo6vS4MWI0UdQ4NyptzFWqvAmi9R/NkUuYvSWo9SNlc/Lj 0PL9BevWgTUA4MmB1mYTTjaLk48WAA5cH5Q+ASaKvCuNS2asDcGynMZivNPdZFhTw+L9 hccQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ejbPdvRW/zXdAXk3UNhG+1LgIZSMGFjiYEWbuJJqgKk=; b=ISHD7LSOiuoL9POVB/Zv2NN+7S521zcc/EGpuv+KpCCmjR6T9WhzEpIBn6WSSouD6C /VxAWPu9TWHNB/1iy5KpMIWaca0RjS4kqLbEenTtOgltmULvty4z8aF0CB6tq3lJgSrY AAV2sxvLRAMHui9Zf1RxXFn1MfV4dWP37Tox8BVzj3It7EFwHR8sPpYBJqujyrZK4vp6 FO1kIHT8WpVyvlbBpw/yhoMklAUTFSh0B4SGZ+Z6EVkv7JBmtMLQzIKSzf58ZH3Hf2qN HobCxVNltXFRG8NKltnXPQ+8x6P8rsezPxBhTcid5OCO8EC7fb2MAfkDaWaHvuqe9L+f uPiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=N1f5ajdp; 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 be3si15108918plb.383.2019.07.24.12.42.41; Wed, 24 Jul 2019 12:42:56 -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=@kernel.org header.s=default header.b=N1f5ajdp; 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 S2389930AbfGXTl2 (ORCPT + 99 others); Wed, 24 Jul 2019 15:41:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:42786 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390178AbfGXTlZ (ORCPT ); Wed, 24 Jul 2019 15:41:25 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 71F9B2083B; Wed, 24 Jul 2019 19:41:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563997284; bh=GxwN1mmkCycNO3fHNV+ZrdYXA6d6xmqH0Z4BO14KspE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N1f5ajdp93+UPKPK5tURNCa6L+3xEjZTQkd/Ptg/0IetZmDf+emOUtM95rOY93/i5 Vz/vriE30ZV+L8G9hKbNB3GMzuWnytOo3MIlok0+o0S07L4MuZyz/+9CggiOvsRjOd FLXYA0ASA2v/GCQKB1g+Z1E8vZkXHVshDymMxE/0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Drew Davenport , Kees Cook , Andrew Morton , Linus Torvalds Subject: [PATCH 5.2 381/413] include/asm-generic/bug.h: fix "cut here" for WARN_ON for __WARN_TAINT architectures Date: Wed, 24 Jul 2019 21:21:12 +0200 Message-Id: <20190724191802.355654185@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191735.096702571@linuxfoundation.org> References: <20190724191735.096702571@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Drew Davenport commit 6b15f678fb7d5ef54e089e6ace72f007fe6e9895 upstream. For architectures using __WARN_TAINT, the WARN_ON macro did not print out the "cut here" string. The other WARN_XXX macros would print "cut here" inside __warn_printk, which is not called for WARN_ON since it doesn't have a message to print. Link: http://lkml.kernel.org/r/20190624154831.163888-1-ddavenport@chromium.org Fixes: a7bed27af194 ("bug: fix "cut here" location for __WARN_TAINT architectures") Signed-off-by: Drew Davenport Acked-by: Kees Cook Tested-by: Kees Cook Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- include/asm-generic/bug.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h @@ -104,8 +104,10 @@ extern void warn_slowpath_null(const cha warn_slowpath_fmt_taint(__FILE__, __LINE__, taint, arg) #else extern __printf(1, 2) void __warn_printk(const char *fmt, ...); -#define __WARN() __WARN_TAINT(TAINT_WARN) -#define __WARN_printf(arg...) do { __warn_printk(arg); __WARN(); } while (0) +#define __WARN() do { \ + printk(KERN_WARNING CUT_HERE); __WARN_TAINT(TAINT_WARN); \ +} while (0) +#define __WARN_printf(arg...) __WARN_printf_taint(TAINT_WARN, arg) #define __WARN_printf_taint(taint, arg...) \ do { __warn_printk(arg); __WARN_TAINT(taint); } while (0) #endif