Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3020756rwb; Mon, 15 Aug 2022 16:17:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR4IQAtY5fag1Bw1wwotB3nBeV3T/liSSqtiCWD8mvjgL48B1oAJpdnHhAfJ6YllZbqA6QRN X-Received: by 2002:a17:907:7b95:b0:72f:9c64:4061 with SMTP id ne21-20020a1709077b9500b0072f9c644061mr11641041ejc.351.1660605474111; Mon, 15 Aug 2022 16:17:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605474; cv=none; d=google.com; s=arc-20160816; b=ma1stiYbUNEQgy4RKV2bJibydfDHow8AuWfXSWL5Yl2aeber1cvx4ngZPLSIOlcm3a g5aQzcXgHGfLrn5im4zhzi7bo0OE+13sINqf0M3eMsqrMBJ7RvWMCTt4dpqs9QH18eFY JAD2lRBBHPHQGlhlJ3O3oYfvDLtDTdGAQ7++ZWqese4bpo9ME9OhXvg6a6jzEpHwAHHA A91kWzdngyA2CFNXaXHgUcwYeAhGKTLgCQuFmnkZGfVdujIP2T40hJ1JXYYkES5Mj5eY df7EF7smm6qAagMVxiELMl6r0UcPJoRe0x3e5nTZaqIf1PcNlVnvrLRKFJPj+AU4qIAJ JGGg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SFG/1849FHfVH1oBetTlaMh5PHfbhPLS6Z0PY670vK4=; b=NIscsS5NuzYrdolSQ0gVRwVfmCf2H1uoP9aS3R0CqbKAx1hZdIdioAHX7CGb4zVsSU xidB/gPRNg8Z1VIUhEG0UThfe70m8kotzMNdo7wrAhra2oXcLA3CoquDlBMoWVNgM3j6 ZpITYGLU8uVkQnvOaXiFqYg/e/741axq+sOzLsTE7ZDk17dQPIRQYfQ5UWjcVlI0nuUU CvFYwnxyWGiabj4/9PisqxwcHSjezz0t/bNTtyA9zgLcptSzDpYIU6Ec6lIxv/v88raD fR75TSa8CRh0X9Vh6X13qfdd3YB4GuDWO6f/2/5tgFnQtbJwu4BGQblZyJcQfvaHPN5V OqnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TsjIcO4L; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd5-20020a1709076e0500b007330a081f1fsi8537793ejc.679.2022.08.15.16.17.28; Mon, 15 Aug 2022 16:17:54 -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=@linuxfoundation.org header.s=korg header.b=TsjIcO4L; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350969AbiHOWhY (ORCPT + 99 others); Mon, 15 Aug 2022 18:37:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348982AbiHOWaP (ORCPT ); Mon, 15 Aug 2022 18:30:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E06B470E4B; Mon, 15 Aug 2022 12:48:10 -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 0274761269; Mon, 15 Aug 2022 19:48:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E77C9C433C1; Mon, 15 Aug 2022 19:48:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660592889; bh=v+8BW4sU+DYYuLIMxucs4tnKqWv7E/wqEuADuGahClE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TsjIcO4LyXuwSbDNaLBSTUOy2u5KgYZS0zI+u1Dj7GcdLKxEWXLOSEUmJ/JMwXgJ3 zsXxm85oTOBwf0IYrpav5R5RbizTm+bTLn2qeFGK/JXMBfmkvmRUjdXTaMqEXQ9CgP pIZAMAzcgzfJa9Py251u8+Ib5f7SCKYCquXiR8Tc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Rutland , Andrey Konovalov , Will Deacon , Sasha Levin Subject: [PATCH 5.19 0150/1157] arm64: stacktrace: use non-atomic __set_bit Date: Mon, 15 Aug 2022 19:51:46 +0200 Message-Id: <20220815180445.663554581@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Andrey Konovalov [ Upstream commit 446297b28a21244e4045026c4599d1b14a67e2ce ] Use the non-atomic version of set_bit() in arch/arm64/kernel/stacktrace.c, as there is no concurrent accesses to frame->prev_type. This speeds up stack trace collection and improves the boot time of Generic KASAN by 2-5%. Suggested-by: Mark Rutland Acked-by: Mark Rutland Signed-off-by: Andrey Konovalov Link: https://lore.kernel.org/r/23dfa36d1cc91e4a1059945b7834eac22fb9854d.1653317461.git.andreyknvl@google.com Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/kernel/stacktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/stacktrace.c b/arch/arm64/kernel/stacktrace.c index c246e8d9f95b..d6bef106e37e 100644 --- a/arch/arm64/kernel/stacktrace.c +++ b/arch/arm64/kernel/stacktrace.c @@ -117,7 +117,7 @@ static int notrace unwind_next(struct task_struct *tsk, if (fp <= state->prev_fp) return -EINVAL; } else { - set_bit(state->prev_type, state->stacks_done); + __set_bit(state->prev_type, state->stacks_done); } /* -- 2.35.1