Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1628475ybb; Sun, 29 Mar 2020 09:23:00 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv6WgVGFfQ2jdXlDOcqJkn/DGFXk+xmPygG8p+N43bkjRGCsLhZuWzY6lWeXmp2QvUBPjzT X-Received: by 2002:a05:6830:1610:: with SMTP id g16mr6087698otr.358.1585498980339; Sun, 29 Mar 2020 09:23:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585498980; cv=none; d=google.com; s=arc-20160816; b=pyaQCIiUI6m3DXOC+i1WLewRX0Qb5l7Fw+CGXe0kdffJI6e4yMWtG0KdyslrSgmHAo boMa1+zi3568WP+AjLNhGtjUN/kM/aEwIg/sI5pdse0PjZ1+/9FRdqSVUzSSZAsYuOsL dtWMGV36+jJH5q60PIlRyriZdy5Gl9Za+c1C8l9SVbfOqo1SMliNDdU69te3ASvgQMnt GRvRuhFemiXqkrVhlhrf0s7rPfBzz03xjKu/CELlP//oP6rbPn15fNBAcl3pQiaBsWkX TolYhURi3FJwKy3r+NMZNEX2i/kbI62h6begPy5cXEY+5t8o0vul2DVAJDm6Op/GqUkc a3EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=GNc+X9HG8DT1u4IwAU5h9IVe5ck8+kmkOpD7yEqvcF8=; b=zzqHI/JHlDuaIu9cOqXSxs5Y8SlV8sVmn/GBk3fVC/dj39Ot0bMlAV2Oc6QlLBczd9 9ppg8DSTZjnBHuzxGhTOReXK0WY4HWA1ggny0Vt5sTR6AoStydSa+G08xkIsqNoNskbq IOrtGCh61FdGBl58GsONF+s9rIwyXTGoAxCp0RxlDJQdLp4oNlqn6x2z4Qnwy+GCM9J1 YRRf4SGAmADMo36ve3zANnyuGjPC16m6ZFwLQDVNBoLYV/LHnxraGbDmqIU1XR7Hen6u kdjlGdr9ThhodEh3gHEzVOL+4r9H7nyBs+X+7CpB2AzBKdyK992koZW5aU/PB/oL0Qro tiQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=huAPFZ1x; 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 f6si3262847oom.58.2020.03.29.09.22.46; Sun, 29 Mar 2020 09:23:00 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=huAPFZ1x; 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 S1728269AbgC2QOR (ORCPT + 99 others); Sun, 29 Mar 2020 12:14:17 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:49064 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727903AbgC2QOQ (ORCPT ); Sun, 29 Mar 2020 12:14:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=GNc+X9HG8DT1u4IwAU5h9IVe5ck8+kmkOpD7yEqvcF8=; b=huAPFZ1xjY8kKAIg+736p7/fDf Yttw2uKzcijq5GyBpzzSlaAjIxjt2fKfpSxp8NdpUsm6Ri7ej3vy9oFrFET0ZfcniaBeT5F5qK4OP 7cH5Is1OwylJzfSk9ZH7vWLBgjFrAJBCgUVufaBYh4h5fQwsLpKuzQ60pjWTFm4wx087noN1Ob7Qq y945LL2rvKRtQ5Cogetxf8xU6QscT9ix4Z78xAuKutTMxZbk382siwp0XbTFw07DnM3w6iJBpAte5 UPiV5Zjc9u/quuIjR9B39HfK8FzxtjhUO3hN3VNpLMxBtZ8hDT/Bv6aGTqFKlqcjciXzi/nTkjFAu yQLipO3Q==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jIaZe-0000S1-E4; Sun, 29 Mar 2020 16:14:10 +0000 Date: Sun, 29 Mar 2020 09:14:10 -0700 From: Matthew Wilcox To: Jaewon Kim Cc: walken@google.com, bp@suse.de, akpm@linux-foundation.org, srostedt@vmware.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, jaewon31.kim@gmail.com Subject: Re: [PATCH v3 2/2] mm: mmap: add trace point of vm_unmapped_area Message-ID: <20200329161410.GW22483@bombadil.infradead.org> References: <20200320055823.27089-1-jaewon31.kim@samsung.com> <20200320055823.27089-3-jaewon31.kim@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200320055823.27089-3-jaewon31.kim@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 20, 2020 at 02:58:23PM +0900, Jaewon Kim wrote: > + TP_printk("addr=%lx err=%ld total_vm=0x%lx flags=0x%lx len=0x%lx lo=0x%lx hi=0x%lx mask=0x%lx ofs=0x%lx\n", > + IS_ERR_VALUE(__entry->addr) ? 0 : __entry->addr, > + IS_ERR_VALUE(__entry->addr) ? __entry->addr : 0, I didn't see the IS_ERR_VALUE problem that Vlastimil mentioned get resolved? I might suggest ... +++ b/include/linux/err.h @@ -19,7 +19,8 @@ #ifndef __ASSEMBLY__ -#define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) +#define __IS_ERR_VALUE(x) ((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) +#define IS_ERR_VALUE(x) unlikely(__IS_ERR_VALUE(x)) static inline void * __must_check ERR_PTR(long error) { and then you can use __IS_ERR_VALUE() which removes the unlikely() problem.