Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1557260pxb; Fri, 20 Nov 2020 12:31:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJy46JwiV4V6MbnQydEY/PqVt6bUGIPt3yVHNLE01MlSd7LGW3g4txPKX2ni8IAqFdtt9FmF X-Received: by 2002:a05:6402:12c8:: with SMTP id k8mr17328152edx.192.1605904287920; Fri, 20 Nov 2020 12:31:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605904287; cv=none; d=google.com; s=arc-20160816; b=MWracEyW6D8x0q1GsGV0Jjz6qcBJyMqUCApBaFIOvOpQnGTZti+wg3lrhxaQu4PMaf vcaihTfSlJJUK1bC+q1m5Ds0jlrlDdBGRv6d38nmdPLXLTvWTxsS38ax4S3SX3/omQMR x85OAkdoYKJrS4/x4hdDLgskWS0a9EPvo2ywObiYKbdyi/GC58kD2fJCha7JacANmoL6 k+XqmiGwH8ME0csLAtJbDXSYwTmYDKD3g8A4vb1Xypz9Aq+41E+Tp1snNMzfAC3CERzm hkMi8XE89Sy7tkB8Yv3QBr49JV5UuMhLP9SmqjwPHZGeCtQdgwVyYuk43e0SSiHMeSAB O+fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fWEyiKtLOwc5BKH8g+Q/g+4/sPbOaRfc0dXxralt2Mw=; b=wiuA1b8gHeGgIR1Lv+HRXvlJBb3k2Tp+j5UhVgxMlZviuUa2zCAFU2mZGROcIa1DrF W1YQHOWCQ2SukmAG2AUlNIOnlDYfJJwfmuHazVB1SJnEwelOnIrzlcORdsqbyg+oe4jD fLBgRIPAooMOPs6UQ/adgBJeYUKeVzjalR4O7Hy0YBP8IJycGeNioZcaqeHxkEFHKnw4 mot9WL8M9Ou0Cnw0v0BmelkCxbpIJbIpNTMgVII6mRJ6bSVqAZLq8sir3u/Je/8ppk0P 6ywaplDsfok+esWf3mnp7sAjdM6zPKgdy0+LW9bfPV5aqscfMW9dMVsjYRrNvyoJRr/o wpSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="slPQ//pe"; 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 d14si2344989edj.545.2020.11.20.12.31.05; Fri, 20 Nov 2020 12:31:27 -0800 (PST) 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=20161025 header.b="slPQ//pe"; 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 S1730937AbgKTU3k (ORCPT + 99 others); Fri, 20 Nov 2020 15:29:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730651AbgKTU3k (ORCPT ); Fri, 20 Nov 2020 15:29:40 -0500 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9761C0613CF; Fri, 20 Nov 2020 12:29:38 -0800 (PST) Received: by mail-qt1-x843.google.com with SMTP id t5so8112755qtp.2; Fri, 20 Nov 2020 12:29:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=fWEyiKtLOwc5BKH8g+Q/g+4/sPbOaRfc0dXxralt2Mw=; b=slPQ//pemKZh9f5kkjudlch0CBWhSXQy2VCSu7HRkD1RW0Ao5+0ftQM2E6UPD3hccj qjQNNmRuGGdK3qOvq5NYurgRaP3hJJuevD4jAH/fmKo+acNl1pILRNLqMDFd7QZ+2prZ tmcUlDky6roTiagY+1Ks0VwGJwggfgRDYhMNyjlvUprVonMn9YqbkCKWYuYbATXQn2JP H9tN2HQsAdXChUj0afdmZW/4fCcfq/VPLcHKF5jmoDMHeF6P0ZDz4TumaSvPvAlnmbSp 9HEAzto9pPBh3Vc65NGET29HWmFU7wMfbtObL4BW7Zce7yCYVt0G+SkyUa9ICW+0aIqa CMtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=fWEyiKtLOwc5BKH8g+Q/g+4/sPbOaRfc0dXxralt2Mw=; b=c4pVaR9D+CoUU7W6+5RJsHy6xekr8zhxscgYuRaG64gQ74mjIU2J1YnG/4XloCL4Do f8o90Bml3Ce/nyIqsK6sS+m8oSx4Z34a7MhigyGJyi7nYEURwOq2VGZ18r4x5F/KVrI2 yi5nkE38it1Pq9Ja4ClZnfdqefEYyIcyEbyeQP5/pbw5LjzMdrQgo7QFaUxRMHy5UVDW FroqbFARRjaHpwYwvN7S4+3MyvIi7EdNWkj7WJdzuRKAS8KJzptxNCs9M8MViwsMpojC FKEUgFg/3MxvMkqQ9v+o7/35wPifH4otpBw+1cs4ykHJEn+T78lvcHYv8dVaxB+fjMH4 1lrg== X-Gm-Message-State: AOAM533dD/CiJFobC4S8vncNo3dO0PzjSIayCbFSD7R+Zqj4TyKZRwe5 FEZWd0bsoMOtU0Ux5ifcpko= X-Received: by 2002:ac8:3496:: with SMTP id w22mr17736541qtb.222.1605904178000; Fri, 20 Nov 2020 12:29:38 -0800 (PST) Received: from ubuntu-m3-large-x86 ([2604:1380:45f1:1d00::1]) by smtp.gmail.com with ESMTPSA id v32sm2850385qtb.42.2020.11.20.12.29.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Nov 2020 12:29:36 -0800 (PST) Date: Fri, 20 Nov 2020 13:29:35 -0700 From: Nathan Chancellor To: Kees Cook Cc: Sami Tolvanen , Nick Desaulniers , Masahiro Yamada , Steven Rostedt , Will Deacon , Josh Poimboeuf , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , clang-built-linux , Kernel Hardening , linux-arch , Linux ARM , Linux Kbuild mailing list , LKML , linux-pci@vger.kernel.org Subject: Re: [PATCH v7 02/17] kbuild: add support for Clang LTO Message-ID: <20201120202935.GA1220359@ubuntu-m3-large-x86> References: <20201118220731.925424-1-samitolvanen@google.com> <20201118220731.925424-3-samitolvanen@google.com> <202011201144.3F2BB70C@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202011201144.3F2BB70C@keescook> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 20, 2020 at 11:47:21AM -0800, Kees Cook wrote: > On Fri, Nov 20, 2020 at 08:23:11AM -0800, Sami Tolvanen wrote: > > Changing the ThinLTO config to a choice and moving it after the main > > LTO config sounds like a good idea to me. I'll see if I can change > > this in v8. Thanks! > > Originally, I thought this might be a bit ugly once GCC LTO is added, > but this could be just a choice like we're done for the stack > initialization. Something like an "LTO" choice of NONE, CLANG_FULL, > CLANG_THIN, and in the future GCC, etc. Having two separate choices might be a little bit cleaner though? One for the compiler (LTO_CLANG versus LTO_GCC) and one for the type (THINLTO versus FULLLTO). The type one could just have a "depends on CC_IS_CLANG" to ensure it only showed up when needed. Cheers, Nathan