From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8A89CC19F2A for ; Mon, 8 Aug 2022 01:33:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FMe3ZQwRpEvZo6CheLw6HBV7QMkZNbWq8IQmKAd8dZQ=; b=fNBhfLmSHcXeC0 r7tYEjimwc1WJtchr89B758mSzBbYbmHQbyz95mUw5ee1uTbW8gDnnJhJtz94UNBgU6et9DXavhk3 mvvLFhMQvNCwDTgD9WKqBLayVQJOFqsOH4L61/M6FqgKsyUs5QRQLrgxRFZMfRs9G2RILE2zq49xA b0EAMIZTMqNmJja5ShRqznp6q6iZkDSp7CsqJYUSljlNp+jTFVKmvO06Rej8jvQ90rKO6y8BP0nbY qXnuDEJyGqUAVpMBcaBoLYBwPo3WAL8fIuWzLFEaik1PftQlN6D7oIeGXEBkrIO9keEjpogHlOgN6 SNV6PxY6wFVF1TFFAk+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oKrcQ-007bNN-Jw; Mon, 08 Aug 2022 01:31:46 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oKrcJ-007bLi-OW for linux-arm-kernel@lists.infradead.org; Mon, 08 Aug 2022 01:31:41 +0000 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 558B3B80E06; Mon, 8 Aug 2022 01:31:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7ED3AC433D6; Mon, 8 Aug 2022 01:31:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659922297; bh=v+8BW4sU+DYYuLIMxucs4tnKqWv7E/wqEuADuGahClE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pBuII1XvyD43H3GdTzmpcNaPi1tI0Oz0oqtTEg+Qq4/XlC+pHuoFxWEVv/sPSrSoA GuW1eQHDKUKoSTABX8xl8wNE0XHr8oMZ/vQlwHFSQ8yJOQPI0Uno/tIbsUReilho7W zX/gm9k/Um1MxrMMZSjJoliV1+M0dTXwCTUYmXOxBj4QTUkad/NC2exj8GwLytaFWu W+v5TD/Jhz2f4ULBgD74Pqu0gWgJTDod2j7V+pLGDWidWXUBTTSZL3RW9Af42St4wn fHquOUu8u+0rnasxBNEZgOxCZzlOkBBtC2z2XJ1sKcDuRKZeMUn+t1jOdPZMmtwnVM cxULgFbee+PjQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Andrey Konovalov , Mark Rutland , Will Deacon , Sasha Levin , catalin.marinas@arm.com, broonie@kernel.org, kaleshsingh@google.com, madvenka@linux.microsoft.com, mhiramat@kernel.org, andreyknvl@gmail.com, maz@kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.19 04/58] arm64: stacktrace: use non-atomic __set_bit Date: Sun, 7 Aug 2022 21:30:22 -0400 Message-Id: <20220808013118.313965-4-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220808013118.313965-1-sashal@kernel.org> References: <20220808013118.313965-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220807_183140_015976_C840CAB3 X-CRM114-Status: GOOD ( 13.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel