Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp981653ybl; Thu, 12 Dec 2019 07:55:59 -0800 (PST) X-Google-Smtp-Source: APXvYqyxrFOza4sDfttcEI8Wjy3lp7kOchcpKDH+cUahxWpwDGNWfFBULr7WpswCx4W/49RejcdY X-Received: by 2002:a9d:6084:: with SMTP id m4mr9335362otj.4.1576166159092; Thu, 12 Dec 2019 07:55:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576166159; cv=none; d=google.com; s=arc-20160816; b=K/tfgttGSJ3vEu7xV1dtvNZQgcUpjgLj6O3V6Pgsn2HV2H97BSHNpCH28ygvrfP2k+ jKxXDNYGTAxtj16Cvu4Z2SjNxP9N24LMlh+FqNAGU/ccKlZJCR4/I0jmd6bJ5J3O2cyQ JfO2ykEsXvc/VD+N/ZwH+nfLTjwSf5MlWvFPj0TWfoZsPSVhBIV685PGr/SasyFvCaDz gs1SVJPMU3vdcnD7NYFdDcXPvpg8ToWLKehe861rTklJi8Neiz8NT46/K+SNAaiUPuJa xTd5/SywJuuXuCFTJ6OgMxCZRzf9xRalG0Lc64/y2WmqC+XA5axSH35ttKchiRQimlOk GsRg== 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:to:subject:dkim-signature; bh=PJztFoqZeZST1HMzqILi2xyKFqgX3RxPFx1/4+TG/tk=; b=TwUTHCFDYfiPzHteIYlIpW8TewyRPdZRua+NXBo2nlUqU0Setyp+8WY30YMcH5QnWb b6ChFq1kNWtqQrC3/6WRO2lxxAp8lMhbsZsEGiFAEvUR7Q9qmPMGZ+6rk2kKUum+eI9X AoBb+f3UgZjn+2bVofJLEp2zuIeuts29dOPE1rmOpilhkj+rU7f2WRhMzDC163H55Qyy ENFiKSGg9bKZp3f7/9cXeOGhDfRxc/3FhMmOfjeVTNWqzJagqkd4341Q5Wo45pXSwaHV SCFtxlpxHK8NvdRjEu1Yn82jbFab+gjPdOBBOT86eQ/iKzVXnDXbUQ3vqtWUcPYxsyYr ZdcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=EfCot0cP; 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 y186si3466885oia.108.2019.12.12.07.55.46; Thu, 12 Dec 2019 07:55:59 -0800 (PST) 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=pass header.i=@c-s.fr header.s=mail header.b=EfCot0cP; 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 S1729608AbfLLPzO (ORCPT + 99 others); Thu, 12 Dec 2019 10:55:14 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:48925 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729509AbfLLPzO (ORCPT ); Thu, 12 Dec 2019 10:55:14 -0500 Received: from localhost (mailhub1-ext [192.168.12.233]) by localhost (Postfix) with ESMTP id 47Ydfl2H6MzB09ZV; Thu, 12 Dec 2019 16:55:11 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=EfCot0cP; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id D9rWWWTshkIZ; Thu, 12 Dec 2019 16:55:11 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 47Ydfl1CmQzB09ZT; Thu, 12 Dec 2019 16:55:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1576166111; bh=PJztFoqZeZST1HMzqILi2xyKFqgX3RxPFx1/4+TG/tk=; h=Subject:To:References:From:Date:In-Reply-To:From; b=EfCot0cPMLRcALyzGy3x1WzkPa0APIh0auRG5pNwxZo4b8aMF1/1AuW51bYPESZ9Y ziBgDeI5oE/4VJLWfQJzArHXiDhT/RM2jU9+Mlon2y9KpuYpFaPvE9JRTUFmP0hPUw SWOnTZe7prONi+zR7dyM5qmsxnh/nNhDVTJJhZm4= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id B10348B872; Thu, 12 Dec 2019 16:55:12 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id 9AsI8caOxSn5; Thu, 12 Dec 2019 16:55:12 +0100 (CET) Received: from [172.25.230.112] (po15451.idsi0.si.c-s.fr [172.25.230.112]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 935D68B860; Thu, 12 Dec 2019 16:55:12 +0100 (CET) Subject: Re: [PATCH v3 1/3] kasan: define and use MAX_PTRS_PER_* for early shadow tables To: Daniel Axtens , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, kasan-dev@googlegroups.com, aneesh.kumar@linux.ibm.com, bsingharora@gmail.com References: <20191212151656.26151-1-dja@axtens.net> <20191212151656.26151-2-dja@axtens.net> From: Christophe Leroy Message-ID: <65a52c58-4409-de89-6f5d-8797d0ebca74@c-s.fr> Date: Thu, 12 Dec 2019 16:55:12 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <20191212151656.26151-2-dja@axtens.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 12/12/2019 à 16:16, Daniel Axtens a écrit : > powerpc has a variable number of PTRS_PER_*, set at runtime based > on the MMU that the kernel is booted under. > > This means the PTRS_PER_* are no longer constants, and therefore > breaks the build. > > Define default MAX_PTRS_PER_*s in the same style as MAX_PTRS_PER_P4D. > As KASAN is the only user at the moment, just define them in the kasan > header, and have them default to PTRS_PER_* unless overridden in arch > code. > > Suggested-by: Christophe Leroy > Suggested-by: Balbir Singh > Signed-off-by: Daniel Axtens Reviewed-by: Christophe Leroy > --- > include/linux/kasan.h | 18 +++++++++++++++--- > mm/kasan/init.c | 6 +++--- > 2 files changed, 18 insertions(+), 6 deletions(-) > Christophe