From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anshuman Khandual Date: Fri, 25 Oct 2019 06:47:18 +0000 Subject: Re: [PATCH V7] mm/debug: Add tests validating architecture page table helpers Message-Id: <5ce5a76c-ea89-c2a1-6665-7d75bce5fb87@arm.com> List-Id: References: <69256008-2235-4AF1-A3BA-0146C82CCB93@lca.pw> In-Reply-To: <69256008-2235-4AF1-A3BA-0146C82CCB93@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: Qian Cai Cc: Mark Rutland , linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, Peter Zijlstra , James Hogan , Tetsuo Handa , Heiko Carstens , Michal Hocko , linux-mm@kvack.org, Dave Hansen , Paul Mackerras , sparclinux@vger.kernel.org, Thomas Gleixner , linux-s390@vger.kernel.org, Michael Ellerman , x86@kernel.org, Russell King - ARM Linux , Matthew Wilcox , Steven Price , Jason Gunthorpe , Gerald Schaefer , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Ingo Molnar , Kees Cook , Masahiro Yamada , Mark Brown , "Kirill A . Shutemov" , Dan Williams , Vlastimil Babka , Christophe Leroy , Sri Krishna chowdary , Ard Biesheuvel , Greg Kroah-Hartman , linux-mips@vger.kernel.org, Ralf Baechle , linux-kernel@vger.kernel.org, Paul Burton , Mike Rapoport , Vineet Gupta , Martin Schwidefsky , Andrew Morton , linuxppc-dev@lists.ozlabs.org, "David S. Miller" , Mike Kravetz On 10/25/2019 11:22 AM, Qian Cai wrote: > > >> On Oct 24, 2019, at 11:45 PM, Anshuman Khandual wrote: >> >> Nothing specific. But just tested this with x86 defconfig with relevant configs >> which are required for this test. Not sure if it involved W=1. > > No, it will not. It needs to run like, > > make W=1 -j 64 2>/tmp/warns Ahh, so we explicitly ask for it. Unfortunately compiler still flags it as an warning. Just wondering why this is still a problem if the second condition for an OR expression is always false. Because evaluation still needs to be performed for the first condition anyways, before arriving at the result. DESCEND objtool CALL scripts/atomic/check-atomics.sh CALL scripts/checksyscalls.sh CHK include/generated/compile.h CC mm/debug_vm_pgtable.o In file included from ./arch/x86/include/asm/bug.h:83:0, from ./include/linux/bug.h:5, from ./include/linux/mmdebug.h:5, from ./include/linux/gfp.h:5, from mm/debug_vm_pgtable.c:13: mm/debug_vm_pgtable.c: In function ‘get_random_vaddr’: mm/debug_vm_pgtable.c:314:17: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] (random_vaddr < FIRST_USER_ADDRESS)); ^ ./include/asm-generic/bug.h:113:25: note: in definition of macro ‘WARN_ON’ int __ret_warn_on = !!(condition); \ ^~~~~~~~~ As you mentioned GCC is quite stubborn here. Anyways, lets keep it unchanged. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BA2CCA9EBC for ; Fri, 25 Oct 2019 06:35:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4A078222BE for ; Fri, 25 Oct 2019 06:35:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391649AbfJYGfA (ORCPT ); Fri, 25 Oct 2019 02:35:00 -0400 Received: from foss.arm.com ([217.140.110.172]:35572 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388289AbfJYGfA (ORCPT ); Fri, 25 Oct 2019 02:35:00 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BB71328; Thu, 24 Oct 2019 23:34:58 -0700 (PDT) Received: from [10.162.41.137] (p8cg001049571a15.blr.arm.com [10.162.41.137]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2DD333F718; Thu, 24 Oct 2019 23:37:36 -0700 (PDT) Subject: Re: [PATCH V7] mm/debug: Add tests validating architecture page table helpers To: Qian Cai Cc: linux-mm@kvack.org, Andrew Morton , Vlastimil Babka , Greg Kroah-Hartman , Thomas Gleixner , Mike Rapoport , Jason Gunthorpe , Dan Williams , Peter Zijlstra , Michal Hocko , Mark Rutland , Mark Brown , Steven Price , Ard Biesheuvel , Masahiro Yamada , Kees Cook , Tetsuo Handa , Matthew Wilcox , Sri Krishna chowdary , Dave Hansen , Russell King - ARM Linux , Michael Ellerman , Paul Mackerras , Martin Schwidefsky , Heiko Carstens , "David S. Miller" , Vineet Gupta , James Hogan , Paul Burton , Ralf Baechle , "Kirill A . Shutemov" , Gerald Schaefer , Christophe Leroy , Mike Kravetz , Ingo Molnar , linux-snps-arc@lists.infradead.org, linux-mips@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org References: <69256008-2235-4AF1-A3BA-0146C82CCB93@lca.pw> From: Anshuman Khandual Message-ID: <5ce5a76c-ea89-c2a1-6665-7d75bce5fb87@arm.com> Date: Fri, 25 Oct 2019 12:05:18 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <69256008-2235-4AF1-A3BA-0146C82CCB93@lca.pw> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org On 10/25/2019 11:22 AM, Qian Cai wrote: > > >> On Oct 24, 2019, at 11:45 PM, Anshuman Khandual wrote: >> >> Nothing specific. But just tested this with x86 defconfig with relevant configs >> which are required for this test. Not sure if it involved W=1. > > No, it will not. It needs to run like, > > make W=1 -j 64 2>/tmp/warns Ahh, so we explicitly ask for it. Unfortunately compiler still flags it as an warning. Just wondering why this is still a problem if the second condition for an OR expression is always false. Because evaluation still needs to be performed for the first condition anyways, before arriving at the result. DESCEND objtool CALL scripts/atomic/check-atomics.sh CALL scripts/checksyscalls.sh CHK include/generated/compile.h CC mm/debug_vm_pgtable.o In file included from ./arch/x86/include/asm/bug.h:83:0, from ./include/linux/bug.h:5, from ./include/linux/mmdebug.h:5, from ./include/linux/gfp.h:5, from mm/debug_vm_pgtable.c:13: mm/debug_vm_pgtable.c: In function ‘get_random_vaddr’: mm/debug_vm_pgtable.c:314:17: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] (random_vaddr < FIRST_USER_ADDRESS)); ^ ./include/asm-generic/bug.h:113:25: note: in definition of macro ‘WARN_ON’ int __ret_warn_on = !!(condition); \ ^~~~~~~~~ As you mentioned GCC is quite stubborn here. Anyways, lets keep it unchanged. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 066D4CA9EA0 for ; Fri, 25 Oct 2019 06:35:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 97D7A2070B for ; Fri, 25 Oct 2019 06:35:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TGF+d8U6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 97D7A2070B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IKdl4intdSoxvtrZSmYt8mFoK6YxlBZ9DhtSGmy/ZEo=; b=TGF+d8U6yEjXcw okO65/ezKP0WynXTaW1EsM9S7gmRQX3GutqGgcCSPm26eeUB8EAHCuuegzkP+/NoZC4VyTUCD/ojo SmFucvbni/uh5gBdTt+62/JdFFGmI9Ot7A1oRJifVKdC1zutcXPF7JF4rqZCIPji2dPf/PvfHGsW0 rcPUAoS9sox6pSt0pYS5CYJuqKhtXlFT+99X0QDvyw6KIV268X80DPQqszC+tCO8w5nf8/3kK7P7N jO5vTu2fVxt/J+DQv2KWiERpIthjKxOy/16kjHxXwEm5XToKsrjQrLhmJYtYzPuh/e37hF1SfKhzt mx9UpT4+f7UtnukGYEcQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNtC1-0001iX-QS; Fri, 25 Oct 2019 06:35:25 +0000 Received: from [217.140.110.172] (helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNtBn-0000HI-L1; Fri, 25 Oct 2019 06:35:13 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BB71328; Thu, 24 Oct 2019 23:34:58 -0700 (PDT) Received: from [10.162.41.137] (p8cg001049571a15.blr.arm.com [10.162.41.137]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2DD333F718; Thu, 24 Oct 2019 23:37:36 -0700 (PDT) Subject: Re: [PATCH V7] mm/debug: Add tests validating architecture page table helpers To: Qian Cai References: <69256008-2235-4AF1-A3BA-0146C82CCB93@lca.pw> From: Anshuman Khandual Message-ID: <5ce5a76c-ea89-c2a1-6665-7d75bce5fb87@arm.com> Date: Fri, 25 Oct 2019 12:05:18 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <69256008-2235-4AF1-A3BA-0146C82CCB93@lca.pw> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191024_233511_782235_359DB586 X-CRM114-Status: GOOD ( 14.68 ) X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, Peter Zijlstra , James Hogan , Tetsuo Handa , Heiko Carstens , Michal Hocko , linux-mm@kvack.org, Dave Hansen , Paul Mackerras , sparclinux@vger.kernel.org, Thomas Gleixner , linux-s390@vger.kernel.org, Michael Ellerman , x86@kernel.org, Russell King - ARM Linux , Matthew Wilcox , Steven Price , Jason Gunthorpe , Gerald Schaefer , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Ingo Molnar , Kees Cook , Masahiro Yamada , Mark Brown , "Kirill A . Shutemov" , Dan Williams , Vlastimil Babka , Christophe Leroy , Sri Krishna chowdary , Ard Biesheuvel , Greg Kroah-Hartman , linux-mips@vger.kernel.org, Ralf Baechle , linux-kernel@vger.kernel.org, Paul Burton , Mike Rapoport , Vineet Gupta , Martin Schwidefsky , Andrew Morton , linuxppc-dev@lists.ozlabs.org, "David S. Miller" , Mike Kravetz Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org CgpPbiAxMC8yNS8yMDE5IDExOjIyIEFNLCBRaWFuIENhaSB3cm90ZToKPiAKPiAKPj4gT24gT2N0 IDI0LCAyMDE5LCBhdCAxMTo0NSBQTSwgQW5zaHVtYW4gS2hhbmR1YWwgPEFuc2h1bWFuLktoYW5k dWFsQGFybS5jb20+IHdyb3RlOgo+Pgo+PiBOb3RoaW5nIHNwZWNpZmljLiBCdXQganVzdCB0ZXN0 ZWQgdGhpcyB3aXRoIHg4NiBkZWZjb25maWcgd2l0aCByZWxldmFudCBjb25maWdzCj4+IHdoaWNo IGFyZSByZXF1aXJlZCBmb3IgdGhpcyB0ZXN0LiBOb3Qgc3VyZSBpZiBpdCBpbnZvbHZlZCBXPTEu Cj4gCj4gTm8sIGl0IHdpbGwgbm90LiBJdCBuZWVkcyB0byBydW4gbGlrZSwKPiAKPiBtYWtlIFc9 MSAtaiA2NCAyPi90bXAvd2FybnMKCkFoaCwgc28gd2UgZXhwbGljaXRseSBhc2sgZm9yIGl0LgoK VW5mb3J0dW5hdGVseSBjb21waWxlciBzdGlsbCBmbGFncyBpdCBhcyBhbiB3YXJuaW5nLiBKdXN0 IHdvbmRlcmluZyB3aHkgdGhpcwppcyBzdGlsb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ICAgICAgICAgICAgICAg XgouL2luY2x1ZGUvYXNtLWdlbmVyaWMvYnVnLmg6MTEzOjI1OiBub3RlOiBpbiBkZWZpbml0aW9u IG9mIG1hY3JvIOKAmFdBUk5fT07igJkKICBpbnQgX19yZXRfd2Fybl9vbiA9ICEhKGNvbmRpdGlv bik7ICAgIFwKICAgICAgICAgICAgICAgICAgICAgICAgIF5+fn5+fn5+fgoKQXMgeW91IG1lbnRp b25lZCBHQ0MgaXMgcXVpdGUgc3R1YmJvcm4gaGVyZS4gQW55d2F5cywgbGV0cyBrZWVwIGl0IHVu Y2hhbmdlZC4KCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f CmxpbnV4LXNucHMtYXJjIG1haWxpbmcgbGlzdApsaW51eC1zbnBzLWFyY0BsaXN0cy5pbmZyYWRl YWQub3JnCmh0dHA6Ly9saXN0cy5pbmZyYWRlYWQub3JnL21haWxtYW4vbGlzdGluZm8vbGludXgt c25wcy1hcmMK From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87E59CA9EA0 for ; Fri, 25 Oct 2019 06:37:18 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E008F20659 for ; Fri, 25 Oct 2019 06:37:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E008F20659 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46zvY73yhMzDqcP for ; Fri, 25 Oct 2019 17:37:15 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=arm.com (client-ip=217.140.110.172; helo=foss.arm.com; envelope-from=anshuman.khandual@arm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lists.ozlabs.org (Postfix) with ESMTP id 46zvVb5ZYszDqfj for ; Fri, 25 Oct 2019 17:35:00 +1100 (AEDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BB71328; Thu, 24 Oct 2019 23:34:58 -0700 (PDT) Received: from [10.162.41.137] (p8cg001049571a15.blr.arm.com [10.162.41.137]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2DD333F718; Thu, 24 Oct 2019 23:37:36 -0700 (PDT) Subject: Re: [PATCH V7] mm/debug: Add tests validating architecture page table helpers To: Qian Cai References: <69256008-2235-4AF1-A3BA-0146C82CCB93@lca.pw> From: Anshuman Khandual Message-ID: <5ce5a76c-ea89-c2a1-6665-7d75bce5fb87@arm.com> Date: Fri, 25 Oct 2019 12:05:18 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <69256008-2235-4AF1-A3BA-0146C82CCB93@lca.pw> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, Peter Zijlstra , James Hogan , Tetsuo Handa , Heiko Carstens , Michal Hocko , linux-mm@kvack.org, Dave Hansen , Paul Mackerras , sparclinux@vger.kernel.org, Thomas Gleixner , linux-s390@vger.kernel.org, x86@kernel.org, Russell King - ARM Linux , Matthew Wilcox , Steven Price , Jason Gunthorpe , Gerald Schaefer , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Ingo Molnar , Kees Cook , Masahiro Yamada , Mark Brown , "Kirill A . Shutemov" , Dan Williams , Vlastimil Babka , Sri Krishna chowdary , Ard Biesheuvel , Greg Kroah-Hartman , linux-mips@vger.kernel.org, Ralf Baechle , linux-kernel@vger.kernel.org, Paul Burton , Mike Rapoport , Vineet Gupta , Martin Schwidefsky , Andrew Morton , linuxppc-dev@lists.ozlabs.org, "David S. Miller" , Mike Kravetz Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 10/25/2019 11:22 AM, Qian Cai wrote: > > >> On Oct 24, 2019, at 11:45 PM, Anshuman Khandual wrote: >> >> Nothing specific. But just tested this with x86 defconfig with relevant configs >> which are required for this test. Not sure if it involved W=1. > > No, it will not. It needs to run like, > > make W=1 -j 64 2>/tmp/warns Ahh, so we explicitly ask for it. Unfortunately compiler still flags it as an warning. Just wondering why this is still a problem if the second condition for an OR expression is always false. Because evaluation still needs to be performed for the first condition anyways, before arriving at the result. DESCEND objtool CALL scripts/atomic/check-atomics.sh CALL scripts/checksyscalls.sh CHK include/generated/compile.h CC mm/debug_vm_pgtable.o In file included from ./arch/x86/include/asm/bug.h:83:0, from ./include/linux/bug.h:5, from ./include/linux/mmdebug.h:5, from ./include/linux/gfp.h:5, from mm/debug_vm_pgtable.c:13: mm/debug_vm_pgtable.c: In function ‘get_random_vaddr’: mm/debug_vm_pgtable.c:314:17: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] (random_vaddr < FIRST_USER_ADDRESS)); ^ ./include/asm-generic/bug.h:113:25: note: in definition of macro ‘WARN_ON’ int __ret_warn_on = !!(condition); \ ^~~~~~~~~ As you mentioned GCC is quite stubborn here. Anyways, lets keep it unchanged. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9810BCA9EA0 for ; Fri, 25 Oct 2019 06:35:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 463922070B for ; Fri, 25 Oct 2019 06:35:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jl1nRm+0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 463922070B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EzrWuKXblXWcWR+2CfZn2NSheb8IhHJ0iQOEpr1bAI4=; b=jl1nRm+0ILbjBx cfmEOq1dgI6JDe1jXPCwBSefj5f93RzWU4Cxg16EYPVw9wduFYK6SDy8NSAPm1o8o+11CIBhofckh 7GSilKYR2crVeOBX8Xg+/ZjKm6mp86XSktgsvsA7LJQ3C9QncaE2ZvKt1aMWdR4lLt+lHNU5tH+KO hfCDf4MN0lK/eY1xTWjmoCN5ns0PQD7RJgQG3+RhlLpCVw1PwZjC5joEVh4Ywqa3Psrd7f1qr6naW EYCWmoxjZ6lJqNSr5fYoQYt2sEVjjaqsIVc+tF7/3c/C/ETErdbsyQtj7euy/1dxWyI7xEDX5UQU6 UrnjE9uNrZBQYf/JBHDg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNtBq-0001Xe-H9; Fri, 25 Oct 2019 06:35:14 +0000 Received: from [217.140.110.172] (helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNtBn-0000HI-L1; Fri, 25 Oct 2019 06:35:13 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BB71328; Thu, 24 Oct 2019 23:34:58 -0700 (PDT) Received: from [10.162.41.137] (p8cg001049571a15.blr.arm.com [10.162.41.137]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2DD333F718; Thu, 24 Oct 2019 23:37:36 -0700 (PDT) Subject: Re: [PATCH V7] mm/debug: Add tests validating architecture page table helpers To: Qian Cai References: <69256008-2235-4AF1-A3BA-0146C82CCB93@lca.pw> From: Anshuman Khandual Message-ID: <5ce5a76c-ea89-c2a1-6665-7d75bce5fb87@arm.com> Date: Fri, 25 Oct 2019 12:05:18 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <69256008-2235-4AF1-A3BA-0146C82CCB93@lca.pw> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191024_233511_782235_359DB586 X-CRM114-Status: GOOD ( 14.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, Peter Zijlstra , James Hogan , Tetsuo Handa , Heiko Carstens , Michal Hocko , linux-mm@kvack.org, Dave Hansen , Paul Mackerras , sparclinux@vger.kernel.org, Thomas Gleixner , linux-s390@vger.kernel.org, Michael Ellerman , x86@kernel.org, Russell King - ARM Linux , Matthew Wilcox , Steven Price , Jason Gunthorpe , Gerald Schaefer , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Ingo Molnar , Kees Cook , Masahiro Yamada , Mark Brown , "Kirill A . Shutemov" , Dan Williams , Vlastimil Babka , Christophe Leroy , Sri Krishna chowdary , Ard Biesheuvel , Greg Kroah-Hartman , linux-mips@vger.kernel.org, Ralf Baechle , linux-kernel@vger.kernel.org, Paul Burton , Mike Rapoport , Vineet Gupta , Martin Schwidefsky , Andrew Morton , linuxppc-dev@lists.ozlabs.org, "David S. Miller" , Mike Kravetz Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-ar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