Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7193208ybi; Mon, 22 Jul 2019 08:38:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwh/OeU50XYhNQdIg70eF2upKfa/OhT/dDq6YWHGx8Vlo2Pa339Qw0/UWXFT0ZhPNWDIuaV X-Received: by 2002:a65:6104:: with SMTP id z4mr35188548pgu.27.1563809908469; Mon, 22 Jul 2019 08:38:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563809908; cv=none; d=google.com; s=arc-20160816; b=t1RrxLQM+p7TxyU6JnyNrQ3jyrmJDtSWLwarLVPk5qQ4wSMGXNs3mppN2mBWQ2qLL7 wR00viqMOOfCsU0BBt69hciQJjqE7YtkL0/MUQTbtMlYpbFxqqcXWjrcTB3Hg6x0ieNt /dEN6RRPOPxAy/v2s0yyX+47UDbGFSuPEpM0+xFsrN5gkp3KWUJF9671oCgvmoxSlteb R0KDMv5xFCh3iXPOUNU0/P7pKqacZ+EoOnWtBJsZfkZC2PItaVZLszTviX9w7svVUIjF wBLRi9NzHi+Kx8R5Jt+rbeguuOMBp3S9NYoObzPCEwVoA8s6QKN03DD0HOTyyGvWeOdy GkKQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=XUPwcETiimzDB0q+O69HAFGT3ge/fTq3yA7rdhk4Ksc=; b=uyruLFHSmZkhtrnI8fy8h9yhxlZZ6owW+LvVS1heDRjXUq0TlK8K3UQ6rkdcUXDE8D FxKoFLR5Ltqf3nvWYqwLM1SOWzF2lgPr5Tlbe6A4I1kvem7BbRioq4oaNOjpqJzphkGR Yznds+nMwwmybu5fR/MaEr1wMHtk8/swUMOlU4KoARdQO4BnXcBFUsluFwE+PtDvulO9 vZFaDt+H+YQZqsoSPd12DNiY9xim/3aK2fViS7xwbB+XnqdS0UHv2zXYXOXMgx6r4r5e BVOOdulIswDIaZgBl3Z38n1Mxiodx6B5hK+/TC/qKQQwlqC9t/HkvR+Dorse/dodhdKp 7IzQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a9si10532703pfn.104.2019.07.22.08.38.12; Mon, 22 Jul 2019 08:38:28 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729008AbfGVM0H (ORCPT + 99 others); Mon, 22 Jul 2019 08:26:07 -0400 Received: from relay.sw.ru ([185.231.240.75]:41638 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727040AbfGVM0H (ORCPT ); Mon, 22 Jul 2019 08:26:07 -0400 Received: from [172.16.25.12] by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hpXOG-0001lV-Ct; Mon, 22 Jul 2019 15:26:04 +0300 Subject: Re: [PATCH] [v3] page flags: prioritize kasan bits over last-cpuid To: Arnd Bergmann Cc: Andrey Konovalov , Dmitry Vyukov , Will Deacon , Christoph Lameter , Mark Rutland , Andrew Morton , linux-kernel@vger.kernel.org References: <20190722115520.3743282-1-arnd@arndb.de> From: Andrey Ryabinin Message-ID: <40fa8d23-e53e-48c3-a2d9-1d1f8ecee0c1@virtuozzo.com> Date: Mon, 22 Jul 2019 15:26:07 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190722115520.3743282-1-arnd@arndb.de> 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 7/22/19 2:55 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. > > Fixes: 2813b9c02962 ("kasan, mm, arm64: tag non slab memory allocated via pagealloc") > Link: https://lore.kernel.org/lkml/20190618095347.3850490-1-arnd@arndb.de/ > Reviewed-by: Andrey Konovalov > Signed-off-by: Arnd Bergmann Reviewed-by: Andrey Ryabinin