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.