Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5798655imw; Wed, 20 Jul 2022 12:47:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vZ9DY4JatfqCpdqP0h05HaaD8SPdDtGOu5/Fi5ylY8kBNUeH/ijCegHCKgfymHHkoH6+lc X-Received: by 2002:a63:2bc4:0:b0:419:7b8c:210a with SMTP id r187-20020a632bc4000000b004197b8c210amr35441157pgr.439.1658346469006; Wed, 20 Jul 2022 12:47:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658346469; cv=none; d=google.com; s=arc-20160816; b=x9yzPNdiG13OD4vAlvntLHBVwRHIpuqqvFHJ17o+xPTRPbJBY9Opc+fqYajIqoVSeN LyH9hbsOJG2gqjKiZXBDzu77NokoZZv+Cke/OFD8wsevutWk+joNrXswmoM6ANbTtEgE DcsAhFaLRHyF+pS5+9PUSASPSdWZBx4d/7rLyz+kED1DOxldB3QBwdqML8eibCi1Ghe4 JVLnlhhrVPrK8lkgzvpg1tRS5+EvciHWzWNQ/xjwLFxgIua1LlqfDrSCNB8BMdgZBgqR YuvmaCpz+GrDRacpR5Cknoas9Dlrf3L7NphULrWQfgdjPhLqacBnz+uZU43m7ZlHYxUb NApg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=ARsQSrHNcr3t6yXwIvfDK05CUBWWnCUH0VOj21Zj3no=; b=VIn49TefJlDZZ/f3CkmZD9wC4clTXFjVOQIoUx1dBsYwEAd3c7OfIKRc5NBsp5OJfW zqyvtYfmXhHKbhMcqlKOZaHqHPsAICm8pISEZb4zpkSco+RoKeTK5EVUfXLIsNNf3Jt3 5kva/MH4fuvusi4F/83Ttv0NYrzQ5/TVHDS3q+grCTmDNwwsZ647GxSehn66MmbtpEQ0 efQuWLtmBWbcM9KWYgCv7bgVchepH0XQjb/+R6M4iLkqqdnVXrEZOoczOBvX0JXQsQNQ ndCGMLq8PHuRnjF1lDAhy4ckTJQ6FUdJFsVHkVbW4o5RXCvh/DOuG8GeZacs7p8N/d8b /tJw== ARC-Authentication-Results: i=1; mx.google.com; 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 h28-20020a63385c000000b0040d22b45aadsi24098885pgn.459.2022.07.20.12.47.34; Wed, 20 Jul 2022 12:47:48 -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; 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 S237019AbiGTTnw (ORCPT + 99 others); Wed, 20 Jul 2022 15:43:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233619AbiGTTnu (ORCPT ); Wed, 20 Jul 2022 15:43:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4676B68DD4 for ; Wed, 20 Jul 2022 12:43:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E132461B0C for ; Wed, 20 Jul 2022 19:43:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3ABDAC3411E; Wed, 20 Jul 2022 19:43:46 +0000 (UTC) Date: Wed, 20 Jul 2022 15:43:44 -0400 From: Steven Rostedt To: Kees Cook Cc: Linus Torvalds , Peter Zijlstra , Thomas Gleixner , LKML , the arch/x86 maintainers , Tim Chen , Josh Poimboeuf , Andrew Cooper , Pawan Gupta , Johannes Wikner , Alyssa Milburn , Jann Horn , "H.J. Lu" , Joao Moreira , Joseph Nuzman , Juergen Gross , Masami Hiramatsu , Alexei Starovoitov , Daniel Borkmann Subject: Re: [patch 00/38] x86/retbleed: Call depth tracking mitigation Message-ID: <20220720154344.29cde32a@gandalf.local.home> In-Reply-To: <202207201219.8EA905372@keescook> References: <20220716230344.239749011@linutronix.de> <20220720125736.48164a14@gandalf.local.home> <20220720135016.3178ffc6@gandalf.local.home> <202207201219.8EA905372@keescook> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS 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, 20 Jul 2022 12:36:38 -0700 Kees Cook wrote: > I'd rather not remove it (or do it dynamically) since the point is to > test what has been generated by the toolchain/build process and stuffed > into the .rodata section. i.e. making sure gadgets there can't be > executed, that the boot-time section permission-setting works correctly, > etc. Before the retbleed mitigation, this test worked for all > architectures; I'd hate to regress it. :( If you haven't noticed my reply, I wasn't able to come up with a one line workaround, but I was able to come up with a two line workaround. Hopefully that will be good enough to keep your little feature. https://lore.kernel.org/all/20220720151123.0e5bf61e@gandalf.local.home/ I'm currently running it under my entire ftrace test suite. If it passes, I'll submit a formal patch. -- Steve