Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9781244rwd; Wed, 21 Jun 2023 11:46:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4zVkhFuHu8IgNfX7pAPIhIsB8qzJz/r5/E0jtINt1+NdSVpksuxoecNLXFCOeKQU5p+cP/ X-Received: by 2002:a05:6a20:7355:b0:110:9210:f6b8 with SMTP id v21-20020a056a20735500b001109210f6b8mr20304466pzc.35.1687373168044; Wed, 21 Jun 2023 11:46:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687373168; cv=none; d=google.com; s=arc-20160816; b=Zvs7jlnIvTZGJeyXL6w+OjPQt0bpNPRqKR5wPPcUAvybtV9BsPlQvYz5bRsVZ/gQxZ MHfFj/CtjgcPJzQX77B4+uh7xOgSthfY9mMsTidNxJD+z6eaKnxuaQ6+NTccH5gpg3LT kZbXFSiVeL7hNeczt0Hd/JA75SFyfax3OQh6ACeq8XN9euwbEFoUP8yd4llFFXMYt/Rv kmgtTr8IFPfENA9G24bea9mhH89ms3FM02z4IkeayMS77qspTlvx+fqr4qTRQO+/A7jG ivM8B6JPG1vo6BmGDPZ0OdNAEEsDVIVlhFvzRYHsk0/QdKU/iSW1sLymSjZkUR045xEa HipQ== 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=FdCR98/sLzhZlnfNo3T8ChItiaTji7caPofyJONKP+o=; b=ZmYXuAAtCPG+oEeHZAd3+bM6B0c80hNSMpJOzT2ZyZGUL8QrWbLwFtwUyPgwoRaptR QGD0rswk0LTcSjkAl1E+wkCQ/EcKP+UHNx/y8Bd7dnfPB5mg9vuKGCQuyK+N76qPUh/d +ySE7S8eFRB+hbXyL/JTeSqgwoFjISUTmJcF1OLlifAPSOUcOqnYzWrUG+OLubrjI9tf NV4f2v7xKXTWv+798yD1X2JdLkonXsK2u2LqzbpGMzR07B4hYYgKHtDaCIF96TKH5e9y gOxKL8G2jW6qfmRLcokW3yd0JaUTIk62nnPTpkzgQBY0655Z3Z97lDRxJtTfpmNcqH8D Bu6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=MyjD0UzC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a29-20020aa794bd000000b00660d2553147si4406260pfl.212.2023.06.21.11.45.49; Wed, 21 Jun 2023 11:46:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=MyjD0UzC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231166AbjFUSRe (ORCPT + 99 others); Wed, 21 Jun 2023 14:17:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230481AbjFUSRN (ORCPT ); Wed, 21 Jun 2023 14:17:13 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B47E199B for ; Wed, 21 Jun 2023 11:17:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=FdCR98/sLzhZlnfNo3T8ChItiaTji7caPofyJONKP+o=; b=MyjD0UzCs4xmOkHQWgjjDUNOyb RoOS2d/J0gDsTrR/B+RNXxMe3S1/mntR1WJrxcO25tngcLuGdQmfYYv3QViSPoKsuW1YN2EINyta5 j796ih7zGgDJrI4Mek0S1i4akHgTvcmVE5Th/o+VS6djpJocMrOfQM19Z9CJn+9IrNAm1jfxsTNTg pIjl77ecKk4+aixdNZY82yJVQKColQj9eLzJ8UcCjqxUQUwkAtBb/LxHFrTUhifa53/yYfln3PFJJ LHzLD87yFxHn5e1AuHkUIcOS5QRuOOtZQ6tigLO5GUnV/LihaLF/RW/IiMhL90uKYRbbW7CQbnO+S 5Jx7N94w==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qC2O5-0002M7-0f; Wed, 21 Jun 2023 18:17:01 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 996333002A9; Wed, 21 Jun 2023 20:16:59 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 7F7B22130B3BB; Wed, 21 Jun 2023 20:16:59 +0200 (CEST) Date: Wed, 21 Jun 2023 20:16:59 +0200 From: Peter Zijlstra To: Kees Cook Cc: x86@kernel.org, alyssa.milburn@linux.intel.com, linux-kernel@vger.kernel.org, samitolvanen@google.com, jpoimboe@kernel.org, joao@overdrivepizza.com, tim.c.chen@linux.intel.com Subject: Re: [PATCH 1/2] x86/cfi: Fix ret_from_fork indirect calls Message-ID: <20230621181659.GB4253@hirez.programming.kicks-ass.net> References: <20230615193546.949657149@infradead.org> <20230615193722.127844423@infradead.org> <202306201455.AF16F617A@keescook> <20230621085217.GI2046280@hirez.programming.kicks-ass.net> <20230621092759.GJ2046280@hirez.programming.kicks-ass.net> <202306211107.4D529222C@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202306211107.4D529222C@keescook> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 Wed, Jun 21, 2023 at 11:08:46AM -0700, Kees Cook wrote: > Ah yeah, it should be direct-called only. I keep forgetting about the > endbr removal pass. > > > I can't seem to manage to have it clobber it's __cfi hash value. Ideally > > we'd have an attribute to force the thing to 0 or something. > > Doesn't objtool have logic to figure out this is only ever > direct-called? It does; let me also use that same thing to clobber the kCFI hashes for these functions.