Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1666022pxj; Wed, 19 May 2021 11:00:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpynJwurd/j5yg+1YGcn/H45Huc3rVUXLzH9Vv3OzmOCxhqc5QPFny7g0lyuY+u72zEBLC X-Received: by 2002:a17:906:1591:: with SMTP id k17mr342867ejd.401.1621447227595; Wed, 19 May 2021 11:00:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621447227; cv=none; d=google.com; s=arc-20160816; b=z+SDuaUOzTtF/l45aKU9oPn9gS3KRymPve+o7JM7gN052EByjS1LlCndJmeaNKQVXP VU+ti93jHQyswpkpgNHIRxEJTxcJvKRXg9UkC/cJ7S3eEUfAtXgrs7Yg6fvYcNqn3/63 z6vH47MxuII2Sp05BFtoHWPA35rBSPNzUNdKfkNYFY8WjaYhKp4nNlH+kgGaeS5EP6e+ pEyZY3uvCmrlbTNy22AyTue8lEu0J7Fy+EeOFdrXgPhbAzF9fdBnomK7v5x4NnzpSHmu RfZeoQCbW4uq3cNjJ+k1TqeBuzBNdPNOGDwCRVuFwGMDmRDKEcoiKhqJRJy6RPuJ+Fhj sh/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=BQaRZ+FOjbkQpBabvqh8shl/ifXjChCq11/0vOp964Q=; b=a6gFrSRcbnsF8yjM8RMRU2syY4HyuV5+thUZUTOyPngPdmuPe5ljrkxrgOwfIasevY XMFbipR6spcxUbNwjsK1sQ6Jr4tzqFfixB9hcj1wOlFCJbh7P+7VYUjISzAPJRU1EKab UhD7tZpxStxxKj+6FK5FUo/zF4k8WNOtlU80kjAYNBqnuJ85/Pm73E5CWqlh8q19pIMn VUv8NV6z2nCLsoK9CmXt8tse5K3k6DcMxOtjsrIBc4qpYXtpcz3moPQelW54wZVf4zvR gBJvTWwc9dq1qlDNpez+XszgPNpkGCK6OmMw1N+XOaUUj2/oDH7E7KZz9W22V1r5q2J9 pTwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dh5si1647832edb.241.2021.05.19.11.00.04; Wed, 19 May 2021 11:00:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241107AbhERLf3 (ORCPT + 99 others); Tue, 18 May 2021 07:35:29 -0400 Received: from mx2.suse.de ([195.135.220.15]:60304 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240092AbhERLf2 (ORCPT ); Tue, 18 May 2021 07:35:28 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 8D915ABC2; Tue, 18 May 2021 11:34:09 +0000 (UTC) Subject: Re: [PATCH v3] mm, slub: change run-time assertion in kmalloc_index() to compile-time To: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Nathan Chancellor , akpm@linux-foundation.org, iamjoonsoo.kim@lge.com, rientjes@google.com, penberg@kernel.org, cl@linux.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, naresh.kamboju@linaro.org, clang-built-linux@googlegroups.com, linux-next@vger.kernel.org, ndesaulniers@google.com, lkft-triage@lists.linaro.org, sfr@canb.auug.org.au, arnd@arndb.de, Marco Elver References: <20210511173448.GA54466@hyeyoo> <20210515210950.GA52841@hyeyoo> <41c65455-a35b-3ad3-54f9-49ca7105bfa9@suse.cz> <20210518003859.GC80297@hyeyoo> <71416382-2e4c-5e03-df9c-265fda41c2de@suse.cz> <20210518111814.GA114501@hyeyoo> From: Vlastimil Babka Message-ID: Date: Tue, 18 May 2021 13:34:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210518111814.GA114501@hyeyoo> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/18/21 1:18 PM, Hyeonggon Yoo wrote: > On Tue, May 18, 2021 at 11:28:17AM +0200, Vlastimil Babka wrote: >> On 5/18/21 2:43 AM, Nathan Chancellor wrote: >> > On 5/17/2021 5:38 PM, Hyeonggon Yoo wrote: >> >> On Sat, May 15, 2021 at 11:34:49PM -0700, Nathan Chancellor wrote: >> >>> This should work I think: >> >> >> >> compiled well with clang-10.0.1, clang-11.0.0, >> >> and gcc-10.2.0 with x86_64 default config. >> >> >> >> is the condition CONFIG_CLANG_VERSION > 110000, >> >> not including 110000 it self? >> >> Good spot. > > Thanks! > >> > Ah sorry, that should definitely be >= :( >> > >> > That is what I get for writing an email that late... in reality, it probably >> > won't matter due to the availability of 11.0.1 and 11.1.0 but it should >> > absolutely be changed. >> > >> > I have not given Nick's patch a go yet but would something like this be >> > acceptable? >> >> Yes. > > You mean Nick's patch to added with Nathan's code? No, I thought Nathan was asking about his own proposal. I don't think Nick's patch that adds 26 index solves the issue. Nathan's proposal fixed with '>=' is OK. > I'm not sure we need this, but will add it if you can accept it. > > I'll send fixup patch soon. tell me if I can improve > anything on it. > > Thanks, > Hyeonggon >