Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp784704pxb; Tue, 5 Apr 2022 23:12:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDg/qRSeayCMS/rMNvb6JDtlEveOOCO942Q59e/AL57ciTlrysTPsZpBe0atkk3okjjkrE X-Received: by 2002:a05:6a00:a02:b0:4fd:f9dd:5494 with SMTP id p2-20020a056a000a0200b004fdf9dd5494mr7453023pfh.68.1649225562910; Tue, 05 Apr 2022 23:12:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649225562; cv=none; d=google.com; s=arc-20160816; b=gW20z7qYIWbsITD8GZuGbOspf7cQtxaJVGi2nMcaPO4l/z1TX3FOxEqQIEG6+FwsT1 F0SqMqSxalK1Qti8OE7a0FlA75q4j5PkqwtBmz35v64Ak+ctRBP5ZIUtYRCunrpVomSY gggB/cFjZ4kdCYqovhsW61pJmBv0sxTsPVkppNip3IDN2Ixy0S8reoZHZvZ6YYeI9eY1 ahianOTHROx1YBLBGRYIuF6FopXhuirCjpJC6Cty6ZITjlfQVsCE2GNgMFNZD7neJHfW 9AEHmkAQyFr9A10Bh5Yi5BnyxALqPICyjseOIa873ysTndKZJTa2T2tDK/JGy/oj8fnA P8Ow== 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=50LjCY4Gu90wvsCqHGLKB0c4Pe7frZuzPXzlbmgDuec=; b=iBCl9I0PED0YVOltT7TWPl3q1eJhviPzvQOkSi18lwAq0rgw4oRw/NVb4UHSQ8lXKA 9Xc12EJVI4R7N5VN+hISTxPhbTyJc1Hjmfvgaf0xpYjp19qcxAydgmFRlcOXNS3rbht1 ggDWlYy/tpTDkj40muRT3QUAQNOHlTB6ToaPrh6dxma3gOF/vNVppWHAflWHOkzn8zVT YdN3RiRJjVnCuvVAxD+A6MkHv8keR8zOlKN+FhQAwISW0UwV1JVHfgudBDXu35DQn6MI wTWMMw2nIrrwwU1ypIZTl6/6cu5jPSGE3KC1qMLRqczwPjnrVOtGlP8F8wZuIIckbnvH D0uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SVJ5vJ+m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k25-20020a63ba19000000b0039905ccd353si10264686pgf.468.2022.04.05.23.12.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 23:12:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SVJ5vJ+m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 61B214C1BEB; Tue, 5 Apr 2022 23:00:08 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1582212AbiDEXmZ (ORCPT + 99 others); Tue, 5 Apr 2022 19:42:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1572911AbiDERTe (ORCPT ); Tue, 5 Apr 2022 13:19:34 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B581C25DA; Tue, 5 Apr 2022 10:17:35 -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 ams.source.kernel.org (Postfix) with ESMTPS id 58F7CB81EB9; Tue, 5 Apr 2022 17:17:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 145E0C385A5; Tue, 5 Apr 2022 17:17:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649179053; bh=3hpZgI8DwU3o+PMi946nSnlTTAPscob69R04+gbt/ns=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=SVJ5vJ+m8lV9VPlHGpavrEtDnV/jLFdGsRXcA9iQliJZKo+Sw+4zlkdeEvisoeMQP k8tU/+T7sIX7AroAjZfOaZKYotzjz76OYUGapslQO4TuMoKx6l48aSqhjez3H/qU6U 6Ue7pQycxI91rbxJMNMtBp6meWF6AFz5qo0unI7R2t4sC/+nZY7RMngIGM1jDM3QQA OMxHJ+pK8FZYgstG8roHzofPs7E3xPbbazGbjnrbUqfsQzTWjP8CkPbefd/8fUOGHS Rnndrd1OSlBdlroBLieW4wYLOvV7tSBLgV7YFvGogt2rAaegHmNzMkJrFDq7rxDlS/ rKoHkjZHOs6Mg== Received: by mail-oa1-f48.google.com with SMTP id 586e51a60fabf-df02f7e2c9so46978fac.10; Tue, 05 Apr 2022 10:17:32 -0700 (PDT) X-Gm-Message-State: AOAM531lTOGWWWuRW3kbk+jlZySTwfTDXIvoebFbRnPImOvFMNx8XlWg zOFmyPjmc7Zzu18AjSXI+vkwsFEJspOWi9JzHdI= X-Received: by 2002:a05:6870:eaa5:b0:da:b3f:2b45 with SMTP id s37-20020a056870eaa500b000da0b3f2b45mr2133837oap.228.1649179052186; Tue, 05 Apr 2022 10:17:32 -0700 (PDT) MIME-Version: 1.0 References: <20220405070339.801210740@linuxfoundation.org> <20220405070402.195698649@linuxfoundation.org> In-Reply-To: From: Ard Biesheuvel Date: Tue, 5 Apr 2022 19:17:21 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 5.15 746/913] ARM: ftrace: avoid redundant loads or clobbering IP To: Greg Kroah-Hartman Cc: Linux Kernel Mailing List , "# 3.4.x" , "Steven Rostedt (Google)" , Sasha Levin Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,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, 5 Apr 2022 at 18:52, Greg Kroah-Hartman wrote: > > On Tue, Apr 05, 2022 at 12:01:19PM +0200, Ard Biesheuvel wrote: > > On Tue, 5 Apr 2022 at 11:54, Greg Kroah-Hartman > > wrote: > > > > > > From: Ard Biesheuvel > > > > > > [ Upstream commit d11967870815b5ab89843980e35aab616c97c463 ] > > > > > > Tweak the ftrace return paths to avoid redundant loads of SP, as well as > > > unnecessary clobbering of IP. > > > > > > This also fixes the inconsistency of using MOV to perform a function > > > return, which is sub-optimal on recent micro-architectures but more > > > importantly, does not perform an interworking return, unlike compiler > > > generated function returns in Thumb2 builds. > > > > > > Let's fix this by popping PC from the stack like most ordinary code > > > does. > > > > > > Signed-off-by: Ard Biesheuvel > > > Reviewed-by: Steven Rostedt (Google) > > > Signed-off-by: Sasha Levin > > > > Please drop all the 32-bit ARM patches authored by me from the stable > > queues except the ones that have fixes tags. These are highly likely > > to cause an explosion of regressions, and they should have never been > > selected, as I don't remember anyone proposing these for stable. > > From what I can tell, that is only this commit. I'll go drop it from > all trees, thanks. > Ah ok, that's not so bad then. But still better to avoid it.