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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 AD11EC31E5B for ; Tue, 18 Jun 2019 16:28:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8759020673 for ; Tue, 18 Jun 2019 16:28:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729991AbfFRQ2F (ORCPT ); Tue, 18 Jun 2019 12:28:05 -0400 Received: from relay.sw.ru ([185.231.240.75]:56162 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729295AbfFRQ2F (ORCPT ); Tue, 18 Jun 2019 12:28:05 -0400 Received: from [172.16.25.12] by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hdGxk-0002qE-CF; Tue, 18 Jun 2019 19:28:00 +0300 Subject: Re: [PATCH] [v2] page flags: prioritize kasan bits over last-cpuid To: Arnd Bergmann Cc: Andrew Morton , Alexander Potapenko , Dmitry Vyukov , kasan-dev , Linux-MM , Andrey Konovalov , Will Deacon , Christoph Lameter , Mark Rutland , Linus Torvalds , Linux Kernel Mailing List References: <20190618095347.3850490-1-arnd@arndb.de> <5ac26e68-8b75-1b06-eecd-950987550451@virtuozzo.com> From: Andrey Ryabinin Message-ID: Date: Tue, 18 Jun 2019 19:28:10 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/18/19 6:30 PM, Arnd Bergmann wrote: > On Tue, Jun 18, 2019 at 4:30 PM Andrey Ryabinin wrote: >> On 6/18/19 12:53 PM, Arnd Bergmann wrote: >>> ARM64 randdconfig builds regularly run into a build error, especially >>> when NUMA_BALANCING and SPARSEMEM are enabled but not SPARSEMEM_VMEMMAP: >>> >>> #error "KASAN: not enough bits in page flags for tag" >>> >>> The last-cpuid bits are already contitional on the available space, >>> so the result of the calculation is a bit random on whether they >>> were already left out or not. >>> >>> Adding the kasan tag bits before last-cpuid makes it much more likely >>> to end up with a successful build here, and should be reliable for >>> randconfig at least, as long as that does not randomize NR_CPUS >>> or NODES_SHIFT but uses the defaults. >>> >>> In order for the modified check to not trigger in the x86 vdso32 code >>> where all constants are wrong (building with -m32), enclose all the >>> definitions with an #ifdef. >>> >> >> Why not keep "#error "KASAN: not enough bits in page flags for tag"" under "#ifdef CONFIG_KASAN_SW_TAGS" ? > > I think I had meant the #error to leave out the mention of KASAN, as there > might be other reasons for using up all the bits, but then I did not change > it in the end. > > Should I remove the "KASAN" word or add the #ifdef when resending? It seems like changing the error message is a better choice. Don't forget to remove "for tag" as well.