Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1535137pxb; Tue, 8 Feb 2022 21:26:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJwmM6g74OPQ+AadxlBinIKd+iY37ejRxfHRpBnJ/qo3sm+m2B+Mx7eLFwp0r3EiRViAZZsD X-Received: by 2002:a63:5a41:: with SMTP id k1mr604766pgm.294.1644384376372; Tue, 08 Feb 2022 21:26:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644384376; cv=none; d=google.com; s=arc-20160816; b=etnsBbkGqGZYzAce1LQvW6CNa9jGgKAES2AkFzOnuxDXEXPoV/NhE4L3U/9Vkhi7rx W6PChTg4XZ7FlrYCqDV0xv8Tw1sUd80TbeShUYzj1B9dQCl2SoHlxFZK8rxyUBzh1aok GtrOC1dITXIgt3aIfiuqo7plkqWN1cEWhxb2zrHPs71GbYvSstI56z+iY4r37EYQ8xhK i1GlOJBVe/zYC5XVPnwxkGGSwcb5jjMHofEYiGWkSgm/C3hRK+/XBTUxvqz4jPSeGY6w PXfTHeShnacSRkRVRiUAsrF0gWUirKNYO13SUSEu8gv3PY7JzQ/KgcCosbSLUqjeIvPX dEXQ== 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=T/7E7Mp6XNXqXhtlqv1x1MYPkswrBrA6+UdeF1obBS4=; b=O2s7iqh/D7KpcJeOdrxWK97fJusotc240p1TOVCg/QkjvSIDir7vvkqGebBcHgJrBp L77ugslF6ccHXxNUy99Qobf45Hvi/LdsXZDIvfR8WVe2K410n5d2Mepyqzqgt7oVQWcH weacQP3j69hF2b/eEgyTKS6n2YEj/L2GOlyVOswID2pYN4kFH/2r/4Bjq2vBZ40905sR UxGY2hvGAVeVeQf6jUQdw+POtUjQ83xEHMrhYoOZIs61hlY2WsxZWyyYHsIlWBkAhgzK Gdc5ehwU3Ob83StfYfUEoQwkDoxX6RlqbG/74EMIjWFTjSAVFPPHjYF/rQ8zZ346eZbJ i2aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="LhhMh/QK"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b16si171467pgs.772.2022.02.08.21.26.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 21:26:16 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="LhhMh/QK"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 66F09C0302D0; Tue, 8 Feb 2022 21:25:49 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239471AbiBIEL7 (ORCPT + 99 others); Tue, 8 Feb 2022 23:11:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238754AbiBIEFt (ORCPT ); Tue, 8 Feb 2022 23:05:49 -0500 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31CFBC061578 for ; Tue, 8 Feb 2022 20:05:48 -0800 (PST) Received: by mail-pl1-x631.google.com with SMTP id c3so1141268pls.5 for ; Tue, 08 Feb 2022 20:05:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=T/7E7Mp6XNXqXhtlqv1x1MYPkswrBrA6+UdeF1obBS4=; b=LhhMh/QKAlG2POJv0ZfzUP5W8E7pnK30Hb6+s1H0+gZroVOfdcD2dWyMTlhY2fBoKm CE6I3mJt2iEmtOfdFnpJWyj95G8qFPl+SpqKrpwMbNdgSz8CXcqy514uSwRdO/lGjisG caDa9FzfI0KVEqNqIgwAy/ImzqZpuPIRBIJ0Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=T/7E7Mp6XNXqXhtlqv1x1MYPkswrBrA6+UdeF1obBS4=; b=RENCq1ghh+olu5pDTn1wHOD43ASogYzPURauseosTzjHoz49L4X37fSH+JbsSeyypE qiGzBlSgmGAlYdV8cGDuwB8ILqxxUZ++gqqVKDNrQhUEMWIt3UrZTqjyQCH2resV0UDM +gLLMasyiPCjgDjCnkegxCBVxfDqpE5iASIRbRRPpql2qXA0w01CRb6rxVwprLEI19dF ko+kBAsm4JVdRKvn18w2iNaBVe/hRSEkmDIeI+N2ymzFDEhRJ81PDdqdrtdPPANqk0Ir yhYcwgr5sJs9lOsikWKurGNZNLu06Iuf0nkFs03ogG4KSp30MMdt4YgE7/mz47APzSQP vPxg== X-Gm-Message-State: AOAM532lHRg/e9xoprv9zayvCOCm1AwSdB+5+lN6Iguq21pEft5UfEZK hPvsYJNioBf9gsUZLUGE8vaWEQ== X-Received: by 2002:a17:902:ce8a:: with SMTP id f10mr328461plg.35.1644379547675; Tue, 08 Feb 2022 20:05:47 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id s10sm18098462pfu.186.2022.02.08.20.05.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 20:05:47 -0800 (PST) Date: Tue, 8 Feb 2022 20:05:46 -0800 From: Kees Cook To: Joao Moreira Cc: Peter Zijlstra , x86@kernel.org, hjl.tools@gmail.com, jpoimboe@redhat.com, andrew.cooper3@citrix.com, linux-kernel@vger.kernel.org, ndesaulniers@google.com, samitolvanen@google.com, llvm@lists.linux.dev Subject: Re: [RFC][PATCH 6/6] objtool: Add IBT validation / fixups Message-ID: <202202082003.FA77867@keescook> References: <20211122170301.764232470@infradead.org> <20211122170805.338489412@infradead.org> <6ebb0ab131c522f20c094294d49091fc@overdrivepizza.com> <202202081541.900F9E1B@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 08, 2022 at 06:21:16PM -0800, Joao Moreira wrote: > > > Note: This feature was already submitted for upstreaming with the > > > llvm-project: https://reviews.llvm.org/D116070 > > > > Ah nice; I see this has been committed now. > > Yes, but then some front-end changes also required this fix > https://reviews.llvm.org/D118052, which is currently under review (posting > this here in case someone is trying this out). > > > > > Given that IBT will need to work with both Clang and gcc, I suspect the > > objtool approach will still end up needing to do all the verification. > > > > (And as you say, it has limited visibility into assembly.) > > Agreed that at this point objtool provides more coverage. Yet, besides being > an attempt to relief objtool and improve a bit the compiler support as > mentioned in the series cover letter, it is still nice to reduce the > left-over nops and fixups which end-up scattered all around. > > FWIIW, https://reviews.llvm.org/D118438 and https://reviews.llvm.org/D118355 > are also being cooked. Comments and ideas for new approaches or improvements > in the compiler support for this are very welcome :) Ah, excellent, thanks for the pointers. There's also this in the works: https://reviews.llvm.org/D119296 (a new CFI mode, designed to play nice to objtool, IBT, etc.) -- Kees Cook