Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp772435pxb; Fri, 15 Oct 2021 16:02:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz90tuGyr5dAPG4n6ygHbqAaHjSydNREO1Da7hg3CvDSPfhaLX6GRs2MMle5MCcjGMDOTze X-Received: by 2002:a50:e08a:: with SMTP id f10mr21380558edl.319.1634338944909; Fri, 15 Oct 2021 16:02:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634338944; cv=none; d=google.com; s=arc-20160816; b=NDSWFEbJeXQlu327OA2iXgxjheDq/rCXQvqvJCpt8Ae1SxKK+P477hbi2URIIbUjmR swnNMNqG2lDGimAOR+FhCUWX6TusOS27BgyUV1cgdc+YETNck3aD2JvEqu3Bw+9R/N6v X+KpkeM3Di2lTxcoZHR/rBhFXxKOmWim6nDv9d7jGJ3Z0raKztONol95yITvFw8o0N7m w4Vj7wiuKf2ZRiS1yaXGCYI10CrSx8o5bMEWsh/uWtmQur7WzFqITNOAcgUGq5kFFzxS 5DpYVionuJqds0GbIclZkAXllTDPErTf9fBNowS4S8JF0wcQRt7DXB0XOg4pzilcRdLe POUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=OBCobx1elChS3S72aWgPkS35OCuA3QaSZD8Frtc45ag=; b=GKS4hdIrl3V11t8buyOFnjAKcf1rwrU3jjHoSpMHnma8RlpE+mvcW3tLuWMoihjVLZ m97tInUVDinBRT4CQiOoMaHWJvwnN3fwTqUn/jG19g1XGUF/Uxt+sTTh5DFvIk8vUeM9 CWCqON92RCtaSOha5jy4CqHH7FGU4Rx4FrPKNSq5AmItXMfW+gSgMchoe06UO92oyxVJ JzSBqZ8GyDB92QW8/MyjrSC3h/PI4dYYf51tvNOLnjuYJ4CaFy8LwK6m7k2kBhtHqRWq SCUV5zCIbGN1Yks54zKdDmlyc5D97SpnMCGkGJLV4o7vH8D8o3O/SHUme2Svr0gQtxpU eRjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=iJTMVr8H; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 14si9349917ejj.313.2021.10.15.16.02.01; Fri, 15 Oct 2021 16:02:24 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=iJTMVr8H; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235833AbhJOMjU (ORCPT + 99 others); Fri, 15 Oct 2021 08:39:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235537AbhJOMjO (ORCPT ); Fri, 15 Oct 2021 08:39:14 -0400 Received: from mail-il1-x130.google.com (mail-il1-x130.google.com [IPv6:2607:f8b0:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27E65C061764 for ; Fri, 15 Oct 2021 05:37:08 -0700 (PDT) Received: by mail-il1-x130.google.com with SMTP id j8so6933050ila.11 for ; Fri, 15 Oct 2021 05:37:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OBCobx1elChS3S72aWgPkS35OCuA3QaSZD8Frtc45ag=; b=iJTMVr8H9Pc1mfOZ3QaqwqH7z0uikzveNVHw3RlNcVIO4ADVpV26rzeDIpkQyb3Xin bOMAyTKd8pebx+gbZO51dAmO6ur/GHab1k25f/GHBfUBmbgNkwoiIDnDaCbLWlmMaWR5 ohmjzl5q0NHxwOPkAFojgY8uwWcwJ1t6a5z42UnNYkEgitm/43iz88WfL9CbC/pB7dVY gRhjuGrgocpww19juqupsYVoTGAngXYV3WyAlOolzz26L6Pe7/MQANlEY75dWARdjhgU QxMCD3H498TL3YOPUFzN2RK5urlwBRfkFYBmM/Gs7b6vg4+7ikucU1WyNq6xq6spH5RC hDKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OBCobx1elChS3S72aWgPkS35OCuA3QaSZD8Frtc45ag=; b=3nZh4OtsoB2McQ73hzaPtoWaDFZwm7k/Z7Y24+X08Poce2Jn6iiFRTD1MLsAkgOHvE h85jXFnljYsEcQKLLfkiaEW2d7KLXgToalMMKO20TIFlnsQ6RXaUqkvGncQd59pXCZHg zKLHTlcbUdf+XO8RuvX3shm+K82xnwrMo7NriGL477QSpTNBWRBBY1e4JV3z4129CsCZ FcC39608nLniXT0mJr+JO5cSHWGenDda5xuwxHTYmx2RmVrC6s/ZRBqOXM5/VxOdS55h Uf8jOHnVPrVoBMeDzqSiZBuIpl2JikFNszjyTSWxgh5Yq9IrW4Y6dR9iokcWbkAn10DZ 7jXw== X-Gm-Message-State: AOAM530n0xd9/Kpthe179NKT8poqCYeN7QLpwOgbt2pABj/+BYkyckdO 8AMi2Z7ISE+r0TlV5xWTSCNYUafo1UWwfMZADOw= X-Received: by 2002:a05:6e02:1688:: with SMTP id f8mr3667088ila.72.1634301427629; Fri, 15 Oct 2021 05:37:07 -0700 (PDT) MIME-Version: 1.0 References: <20211014132331.GA4811@kernel.org> In-Reply-To: From: Miguel Ojeda Date: Fri, 15 Oct 2021 14:36:56 +0200 Message-ID: Subject: Re: [PATCH] compiler_types: mark __compiletime_assert failure as __noreturn To: Rasmus Villemoes Cc: Nick Desaulniers , Peter Zijlstra , Miguel Ojeda , Nathan Chancellor , Kees Cook , linux-kernel , llvm@lists.linux.dev, Linus Torvalds Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 15, 2021 at 10:11 AM Rasmus Villemoes wrote: > > A yakshave that would be worthwhile is to kill off the macro > compiletime_assert() completely - three is a crowd. It sounds like it > would be implemented in terms of _Static_assert, but it's actually > __attribute__(error). We can fold the definition of compiletime_assert > into BUILD_BUG_ON_MSG. Agreed, two should be enough. > Why do we even have a no-op version if !__OPTIMIZE__? AFAIK there's no > CONFIG_O0 option, and such a build wouldn't be interesting at all - it > can't be expected to boot, and it would likely throw warnings left and > right. Yeah, I don't think it would compile as it is anyway. Perhaps it is there for some kind of tooling? For a static analyzer or something like sparse (if it didn't have its own define)... But yeah, every use of it should have a comment explaining why it is there, like crypto/jitterentropy.c does. There are a couple without it. Cheers, Miguel