Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp230601rdb; Fri, 6 Oct 2023 01:28:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/zIQ+kq3oHb3UgCW20WtlhNJqLcrCeQyCkKvdZ7SpAd/6SmKfkuQbAgw6MnXq9vEUx3W0 X-Received: by 2002:a05:6a21:78aa:b0:16b:9886:7eda with SMTP id bf42-20020a056a2178aa00b0016b98867edamr1440245pzc.35.1696580914165; Fri, 06 Oct 2023 01:28:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696580914; cv=none; d=google.com; s=arc-20160816; b=a5BibBmhb4VMLsXxpBAoYmsj6LRbWlKTxYPVjmi5eK2D/oMoBLKxYZCJZWSHQjngOA tCPUrG6HR2e8r2kjF6gGhv/XXjZpfQ03YL8x0f09njYjhcVo1iip7deqLj05G6ssb6f8 SyUyjts3BEHtMtiw2WFm4HafSzG0tTwh1tb1LLHhwbgij/9NAzqrOysIouXIJQuOOYbp v2ZgS/cds58Wnsd4wCH5n3EmBo0GS2aVFbQdPHPzAj+VRH/kJuUWByoMcflWmgACGXG7 V3C8Cj618V0M2/rd0DdcKgrbETOM+U42MmiGr4NXHbQ4p15kGorTwy4ZUaKihtrNKaM3 WsBw== 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 :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=WS3aMPsKQGvwJWCmMn0C9+DFBj7sbSKqCORn36dZhXU=; fh=G3M67iQG9WRt+PqHbrIkTHXHAXxXHp5M5aHUXzdV4W4=; b=DRcqBKNMiFkvlBTpSZkZDBNfcKMpQ5KzoI+f6TyDTKg8lNuibX8XnJKvXBCZLyZl0G Gu/zW3Yaf1Lf8ust9TIKhb7pn0acqH4PV0IREE7mO8XG/273uzBJvIEiu2N7Wdxlegu6 XRzTS7Aw4rTE/JnvchNA53/re77i9yJp1f4LutTZRrBnfJZqRHC5UuEeMBGk1mBZy/C8 AmfaHVBigJ8Z1OrmYN6GxQD0Eu1Q9psrUD0H7opZk5y4Xtfwssptb1vcP4Sm0X7oj6vY PMSMCkrLPIU7H+uwwGNitdPLIxqSlKt1NBNNR1/NUhoonI10Fb8rHI47+kXLKxpbr5n8 nc5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id l133-20020a633e8b000000b0054fdfd26dffsi3411583pga.337.2023.10.06.01.28.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 01:28:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id E98DC808A358; Fri, 6 Oct 2023 01:28:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231176AbjJFI2S convert rfc822-to-8bit (ORCPT + 99 others); Fri, 6 Oct 2023 04:28:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231247AbjJFI2L (ORCPT ); Fri, 6 Oct 2023 04:28:11 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5721CDE for ; Fri, 6 Oct 2023 01:28:07 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-170-uSPFK65kPNWIoiEJ1iteNg-1; Fri, 06 Oct 2023 09:28:05 +0100 X-MC-Unique: uSPFK65kPNWIoiEJ1iteNg-1 Received: from AcuMS.Aculab.com (10.202.163.4) by AcuMS.aculab.com (10.202.163.4) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Fri, 6 Oct 2023 09:28:04 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Fri, 6 Oct 2023 09:28:04 +0100 From: David Laight To: 'Kees Cook' CC: "linux-kernel@vger.kernel.org" , "'linux@rasmusvillemoes.dk'" , 'Steven Rostedt' , "'bvanassche@acm.org'" , "torvalds@linux-foundation.org" , "Nathan Chancellor" , Nick Desaulniers , Arnd Bergmann , "akpm@linux-foundation.org" Subject: RE: [PATCH v2 next] compiler.h: Move __is_constexpr() to compiler.h. Thread-Topic: [PATCH v2 next] compiler.h: Move __is_constexpr() to compiler.h. Thread-Index: AQHZ96gTRq31SBDNvUGrpdwig3TLHLA8axEg Date: Fri, 6 Oct 2023 08:28:04 +0000 Message-ID: References: <2a6680bbe2e84459816a113730426782@AcuMS.aculab.com> <202310050921.F0B15702D4@keescook> In-Reply-To: <202310050921.F0B15702D4@keescook> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 06 Oct 2023 01:28:30 -0700 (PDT) From: Kees Cook > Sent: 05 October 2023 17:22 > > On Thu, Oct 05, 2023 at 11:39:54AM +0000, David Laight wrote: > > Prior to f747e6667ebb2 __is_constexpr() was in its only user minmax.h. > > That commit moved it to const.h - but that file just defines ULL(x) and > > UL(x) so that constants can be defined for .S and .c files. > > So apart from the word 'const' it wasn't really a good location. > > Instead move the definition to compiler.h just before the similar > > is_signed_type() and is_unsigned_type(). > > This may not be a good long-term home, but the three definitions > > belong together. > > > > Signed-off-by: David Laight > > Yeah, this is what I'd expect (a duplicate move in tools/). Thanks! I did try to run something that might have built 'perf'. But it complained about a lot of stuff not being installed. I do wonder if a better home for all these is_xxx() and __is_xxx() would be at the top of build_bug.h. While they can be used on their own (eg with __builtin_choose_expr()) they are typically used with the compile-time asserts (or at least with code that is also doing asserts.) So there might only be a few places that need the extra #include. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)