Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2547382imu; Thu, 29 Nov 2018 06:42:59 -0800 (PST) X-Google-Smtp-Source: AFSGD/WzkozJTszSlNy/R5yArOz44H9+WCiqHcHj5ufQaOBrXwQAZy38LJTSGFYyz/GalDgTp7Iy X-Received: by 2002:a17:902:bd0a:: with SMTP id p10mr1675466pls.322.1543502579746; Thu, 29 Nov 2018 06:42:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543502579; cv=none; d=google.com; s=arc-20160816; b=ph7H0h7zJGCIseGS5G2wLFKTfL91GzXuw14e1AI/FQRUiVboGrq0WJDcMYRt0Sl4nX Scg8yUKEXN01GNzdOyTS5xvHiz/65e3/sgHFNj3zoasttWJAz0fTHRxT3NlaY5lv4no+ FW/KSw5CsJBiWWWnCRCgd/Cp+tasWZDKHvM1KiQByDsx+OafzeV/ztWU7kAnQO0/jrFD BPatSvtsPcB6sPqgTvIg391fOnkodDzcsLBkd8YxxQNGX4CGCYODwns3mFG9+gER/KDQ aHy8T/G3oJ7Yan2mN/oExEFpTnU7+o+WsflQ1CRCkuLku24XGmrBATUEVjRoI4vUh/wd PvPw== 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=AccJRzLtCKcxIoRg8Vh18+ckV1KDQ/s6GFVsC7RmOaY=; b=e9wB9wUSHJryOX0+X6PDPBVaVoH0vpwQmJuhTvuqj1dGhwoMtnt8pVZrcpLlPUGlst KUYafIwwzpTUWS99AtaXXiGTxs1R8jOPweQvp+LULDQtI/pYhDld/hI4RY3Vsyx+GOT2 dTOFFvTqcuWlh0DI6/tJwGvA1pcmAGOMaEDFnf8rpE8CTZhWOSG+GZzI1XG8NAcIgmyK dVVGtVq2EbDVYjmncsX2jdQg397p07EJBbtoPVEcyJS6W/zAtIjGkKGYf6sS7XXb1y9K i3Ar2yhap+6k4zP3LNqRP81SqXOQ8qqXHuRsWStRGM+kJrVnhbO72HmPZyk7PiC+DG9C jseQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eolR8L6W; 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 cb1si2612462plb.37.2018.11.29.06.42.44; Thu, 29 Nov 2018 06:42:59 -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=@kernel.org header.s=default header.b=eolR8L6W; 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 S2388010AbeK3Bds (ORCPT + 99 others); Thu, 29 Nov 2018 20:33:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:34622 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731925AbeK3Bds (ORCPT ); Thu, 29 Nov 2018 20:33:48 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 D17382145D; Thu, 29 Nov 2018 14:28:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543501695; bh=ONtAe6aUfrZ7Zr2CyZPEHSkDvC8UE5LuBhFAMeQiEus=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eolR8L6Wa1KwcdECbfzvSHEk3TLWCsL8fFjwrpYDEjK8ZnBY5fJ6fsYVNlWgW+m7U 0mmfKi3VvKSXHAF1xV6dNs7BhCwM5I0AKGCqUSqGxe2RFU3B2maxubJ8L6xfsp3eUH ZOqZKBLJbcc0xMFipNrzWQOeuHiscSeYuYTi8ADc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sebastien Boisvert , Dan Williams , "Steven Rostedt (VMware)" , Arnaldo Carvalho de Melo , "Tzvetomir Stoyanov (VMware)" , Namhyung Kim , Ross Zwisler , Elenie Godzaridis , stable@vger.kerenl.org, Andrew Morton , Linus Torvalds Subject: [PATCH 4.14 088/100] include/linux/pfn_t.h: force ~ to be parsed as an unary operator Date: Thu, 29 Nov 2018 15:12:58 +0100 Message-Id: <20181129140106.419461294@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129140058.768942700@linuxfoundation.org> References: <20181129140058.768942700@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sebastien Boisvert commit 4d54954a197175c0dcb3c82af0c0740d0c5f827a upstream. Tracing the event "fs_dax:dax_pmd_insert_mapping" with perf produces this warning: [fs_dax:dax_pmd_insert_mapping] unknown op '~' It is printed in process_op (tools/lib/traceevent/event-parse.c) because '~' is parsed as a binary operator. perf reads the format of fs_dax:dax_pmd_insert_mapping ("print fmt") from /sys/kernel/debug/tracing/events/fs_dax/dax_pmd_insert_mapping/format . The format contains: ~(((u64) ~(~(((1UL) << 12)-1))) ^ \ interpreted as a binary operator by process_op(). This part is generated in the declaration of the event class dax_pmd_insert_mapping_class in include/trace/events/fs_dax.h : __print_flags_u64(__entry->pfn_val & PFN_FLAGS_MASK, "|", PFN_FLAGS_TRACE), This patch adds a pair of parentheses in the declaration of PFN_FLAGS_MASK to make sure that '~' is parsed as a unary operator by perf. The part of the format that was problematic is now: ~(((u64) (~(~(((1UL) << 12)-1)))) Now, all the '~' are parsed as unary operators. Link: http://lkml.kernel.org/r/20181021145939.8760-1-sebhtml@videotron.qc.ca Signed-off-by: Sebastien Boisvert Acked-by: Dan Williams Cc: "Steven Rostedt (VMware)" Cc: Arnaldo Carvalho de Melo Cc: "Tzvetomir Stoyanov (VMware)" Cc: Namhyung Kim Cc: Ross Zwisler Cc: Elenie Godzaridis Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- include/linux/pfn_t.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/linux/pfn_t.h +++ b/include/linux/pfn_t.h @@ -10,7 +10,7 @@ * PFN_DEV - pfn is not covered by system memmap by default * PFN_MAP - pfn has a dynamic page mapping established by a device driver */ -#define PFN_FLAGS_MASK (((u64) ~PAGE_MASK) << (BITS_PER_LONG_LONG - PAGE_SHIFT)) +#define PFN_FLAGS_MASK (((u64) (~PAGE_MASK)) << (BITS_PER_LONG_LONG - PAGE_SHIFT)) #define PFN_SG_CHAIN (1ULL << (BITS_PER_LONG_LONG - 1)) #define PFN_SG_LAST (1ULL << (BITS_PER_LONG_LONG - 2)) #define PFN_DEV (1ULL << (BITS_PER_LONG_LONG - 3))