Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp3685654rwp; Sat, 15 Jul 2023 07:30:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlFWtSyJ+JA8TpSh2l2+Pyq3EcW2gY6hvX/Fc101T6rdkOTCVKqGQxexFD3e42DMLVF7boH5 X-Received: by 2002:a17:906:54:b0:993:f349:c989 with SMTP id 20-20020a170906005400b00993f349c989mr5812600ejg.7.1689431431140; Sat, 15 Jul 2023 07:30:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689431431; cv=none; d=google.com; s=arc-20160816; b=T2JbZ86hr00JeveWRXWlRtURPlvDvMR2Oc5pEAg9QVYMvwNv2rU2IG0nAfuiKDH67O m5QKISPVOJuEFr2GoY5bKKkhzVnCNFsJ28Z0SSK4H03Y3hNHF8Gp5cuGncQ6GgyjoiRd 1AgVaC9wdzdN9KGKj/5gqxNzixcw4nc0p0PuqiSCSnCK5nZkWkNwSmgL7dub7ksRa5UP hg+kseOLx1v+pB1OeOYew8FvWGU3cDx2JifST2uimBaDiw3owRYenDvW1Pyhkc78MJyu vYWurjWyF0Ks+IBdDXxIBajpzbnFY3PY5PYRZ5DTi2Cpykgk7CqGQ47Ii2AKVoU0aGqT KHtg== 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:date:subject:cc:to:from :dkim-signature; bh=mkw/sWUCTUeVqIiGeF9dtQ+N2gFHsEtDYBtcLVzZgRg=; fh=uKQNkDNGEjgoOgJohgoIcWSeHNL9bR/V2EX+gA7xVIA=; b=RTn5Nu1Yq5Qg5yKvEJBIRaVQNYlZV5rxSLk3qmbE5KMEcQ+z1PLkVM0nIh2DIq7yzG x156bwdqXnPphV2qCyjj3eAa5P0eUEV+xBkhgYI2qBJG1GQ1ZJxmZZtUDIhGXxPO2uZR N8AfDVrpOkeZeHxD14rJiLV38MrHGO1WUUFMV1vgERdhpyjqbpbCR9U0nyqfSh9RdWXv Dzeg5jdUByB71AJom7xG3EExfe3mwPJszye3LsBJiKAgGj86NZPil8/e4yKkmSoaZGi9 l7LDDoMTleuL6QxQKnpzpMiunpgXOTnPkrCJGvpUt8n1ymuxJzwRt+zMxLB0D9oJciQs A/jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fm0oc6lW; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u12-20020a1709064acc00b00992e26642ddsi10431646ejt.251.2023.07.15.07.30.07; Sat, 15 Jul 2023 07:30:31 -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=@kernel.org header.s=k20201202 header.b=Fm0oc6lW; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230092AbjGONqK (ORCPT + 99 others); Sat, 15 Jul 2023 09:46:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230085AbjGONqI (ORCPT ); Sat, 15 Jul 2023 09:46:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8494F272E; Sat, 15 Jul 2023 06:46:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 22FDE60B90; Sat, 15 Jul 2023 13:46:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 599C9C433C8; Sat, 15 Jul 2023 13:46:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689428766; bh=5Cj0j9UWyUaETtgL5LyQbqXPc4UA8/eObpiQ76X05+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fm0oc6lWCT5MelpphlfjhdZRrCN5+d4LlZp1oQisAglJQ/GOzE3y3raTn0CObGvUv PM3P+w8GGiGg+RJjCdzEOAaeIdBFTgVBt0Q2lZHq4PRBZcujhOrs1Kviq+oj28H0Bm 9V3uKgTVL4HLQCzsw+gqYCrWuzcGBZkDwiFDT/KzBQ/xF+v8KHgY5kPA0IRqmsY2r0 VSzTS9t3ov/D1UxzyinJKA0sXCkzilbu78Y1f8Jzsu+9LEvwblOHzIOh/n59pkZkv0 EpvGrThNK/ZRus8wqr5XBY+XfSm6vH87T90iWmP6wYi28RFqP6UUmpGc7RNxaqN53D LMYS+cM6p6hUQ== From: guoren@kernel.org To: guoren@kernel.org, palmer@rivosinc.com, paul.walmsley@sifive.com, falcon@tinylab.org, bjorn@kernel.org, conor.dooley@microchip.com Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, stable@vger.kernel.org, Guo Ren Subject: [PATCH 2/2] riscv: stack: Fixup independent softirq stack for CONFIG_FRAME_POINTER=n Date: Sat, 15 Jul 2023 09:45:52 -0400 Message-Id: <20230715134552.3437933-3-guoren@kernel.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20230715134552.3437933-1-guoren@kernel.org> References: <20230715134552.3437933-1-guoren@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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: Guo Ren The independent softirq stack uses s0 to save & restore sp, but s0 would be corrupted when CONFIG_FRAME_POINTER=n. So add s0 in the clobber list to fix the problem. Fixes: dd69d07a5a6c ("riscv: stack: Support HAVE_SOFTIRQ_ON_OWN_STACK") Reported-by: Zhangjin Wu Signed-off-by: Guo Ren Signed-off-by: Guo Ren --- arch/riscv/kernel/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/kernel/irq.c b/arch/riscv/kernel/irq.c index d0577cc6a081..0b58720109db 100644 --- a/arch/riscv/kernel/irq.c +++ b/arch/riscv/kernel/irq.c @@ -83,7 +83,7 @@ void do_softirq_own_stack(void) : : [sp] "r" (sp) : "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", - "t0", "t1", "t2", "t3", "t4", "t5", "t6", + "t0", "t1", "t2", "t3", "t4", "t5", "t6", "s0", "memory"); } else #endif -- 2.36.1