Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp63500lqh; Thu, 30 May 2024 14:13:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVhH2lgT9lzg68J2v0wbpJbi0fZKdae4GNSSv291W8QNquFznB1+PS5LzqDTCFqoes6rwiSsTxhwc/dqkAYDWN3nHb4boraAu3OcyH9BA== X-Google-Smtp-Source: AGHT+IH+qzmPBG4juJ/xn8XzqbCeXFWrrA2lEONsXijli8Yj27OQVHBqEITLTUQWd4QShrSuaRps X-Received: by 2002:a05:6358:7e03:b0:193:f809:9d46 with SMTP id e5c5f4694b2df-19b48ad6c12mr20703055d.2.1717103611942; Thu, 30 May 2024 14:13:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717103611; cv=pass; d=google.com; s=arc-20160816; b=XT77gJ7rvq08kcch2hECmpbWt4C7ZR12/AKE6RiZ8z7pWoFxqFuAOZZsNDWMYS+1FM feIUiBXGyZPdT3Lz+SntlXzd9J3vbYa3hYpmBZRr+9YYbrllyOWkGfV5toezL9A6ujtM gY8rsWVWcIeUmV404DVIgY8hDGSjXRMJPjh0IxllmR2+bL5W2oUTtPH/0Jzms9SA//VL qFXCrDAiOxozN6x1ZuH6A1QGjL4j0S9Arw80fptxxETb74i9eR0NQ6Z1aBXCc9cEIWIQ gJfRY+8wFs0IMXsqfjmI/O+Q9fnNq1oS1x1snU9AL5R2iuCWTRjA++pK4i3G+/LqgSQ+ T4QA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:date:message-id:from:subject :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=nZLQv9J62sWk0fmXAsVJuSscoNuzZmI3Rdo6kffqvjA=; fh=txXB16B1kAPmyHSDEaiN1QDDhIqV2b16kpbrE8Inm+Y=; b=Hx+AChWVEoVuosm4ilx2RTW+3DZ9LiFEAZxDBWxbMHi+Ru8DTdvexKADfkF5Kb7u1b Q+OI4WtJjXG81sJmFpIqQQ0Ips5rOpNmYPvRHj1BIyRAKt2sUdEPYWr1eJulybHc4NWc fYfJmiZ4DbT+8WK0h5tNI8Wy5knmTzpU2RYc8alEbPm9RD9OsireMx0UukoopLJ+s7eW d9Cvy4WYzDUXxGnmgD9bGMQQnG4kQH1/kYm86v6oaB0fKhORQj7mow/scjr63aUU4WFa 0yfwMq/7n6qU2RvBBq3NhFH4XGdOh03SeIheGuhLQpM9xAyU9jq48eRpfCOQVqDMYoHF puDQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=J8qVyjrL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-195922-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195922-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c35c181cbesi279570a12.625.2024.05.30.14.13.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 14:13:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195922-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=J8qVyjrL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-195922-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195922-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 87978282411 for ; Thu, 30 May 2024 21:13:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 071C618628C; Thu, 30 May 2024 21:10:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="J8qVyjrL" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 259B9183994 for ; Thu, 30 May 2024 21:10:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717103431; cv=none; b=tKSU+RCLF8uC8K1s3balsbLoPHPW3RGXRapooeETtVpX+Xw+KOWuPh5kH4OwnGPBLly9eWPDjOd7W6mKiHfhXhTW4R/AXa2g4TeNvyohSxIV5uehhuNCu3V9ZuJyDLPYfDNggtzIVIOT+NYsoUoRR47872GF8VsxYBJ3bWdKrtg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717103431; c=relaxed/simple; bh=WDI7R5NJdDXyrncOhY5G4sEPOR0dtgD/wFPdOrwQ2Jc=; h=Content-Type:MIME-Version:Subject:From:Message-Id:Date:References: In-Reply-To:To:Cc; b=tlE4yJXX4AhtYixtgLGzZybF8Jitc9FZ4DKzC9W1FmI1qxHetz2ze7aZHpKiVOQAjTEFp7gShGRAypqh2v8T/xZp09xso0DiV2WB+aR6xF2N3O9WJ6RKd/PJhZcDVAqFJquiCJ2mfZC+O1hTHytzYU/yHo04vnH6Byp1abT/PN4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=J8qVyjrL; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id ABA7EC32789; Thu, 30 May 2024 21:10:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717103430; bh=WDI7R5NJdDXyrncOhY5G4sEPOR0dtgD/wFPdOrwQ2Jc=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=J8qVyjrLdh8Q1jInXVtPiyhTcwYtv2jp8pMeZcJRddTeZoag1o4PUdAqrei0JnHfI sVgJqhQ3GlSBDPeZeuSyPTtILhJc/U1aSK48BasZVCWSs8gzyTWFBd9U1EhbcRFSeL otjVa4AjMy5eVh1dLKH0FRQu+jMt8NvjMfwuIT7qiZARwiQ2l7kqkhpBoy2ADhDnFe urw1brJJXf0GM+/KUsfFWvJbCM2yG3Z+6kCteGT0JF3Rg6DZK6ZnwOpQ+aAryeJcKM xZtp13xXQW7o9EXG/H90f6SHVuENtWMsaaCx8OWaQs96+mGlHXdsnWbfDsO76N5RN1 7U2y/M3Ib0oCQ== Received: from aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (localhost.localdomain [127.0.0.1]) by aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (Postfix) with ESMTP id 94B38D84BCD; Thu, 30 May 2024 21:10:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH v2] riscv: prevent pt_regs corruption for secondary idle threads From: patchwork-bot+linux-riscv@kernel.org Message-Id: <171710343060.6624.5427985016791432886.git-patchwork-notify@kernel.org> Date: Thu, 30 May 2024 21:10:30 +0000 References: <20240523084327.2013211-1-geomatsi@gmail.com> In-Reply-To: <20240523084327.2013211-1-geomatsi@gmail.com> To: Sergey Matyukevich Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, anup@brainfault.org, atishp@rivosinc.com, palmer@dabbelt.com, paul.walmsley@sifive.com, aou@eecs.berkeley.edu, samuel.holland@sifive.com, alexghiti@rivosinc.com, conor.dooley@microchip.com, sergey.matyukevich@syntacore.com Hello: This patch was applied to riscv/linux.git (fixes) by Palmer Dabbelt : On Thu, 23 May 2024 11:43:23 +0300 you wrote: > From: Sergey Matyukevich > > Top of the kernel thread stack should be reserved for pt_regs. However > this is not the case for the idle threads of the secondary boot harts. > Their stacks overlap with their pt_regs, so both may get corrupted. > > Similar issue has been fixed for the primary hart, see c7cdd96eca28 > ("riscv: prevent stack corruption by reserving task_pt_regs(p) early"). > However that fix was not propagated to the secondary harts. The problem > has been noticed in some CPU hotplug tests with V enabled. The function > smp_callin stored several registers on stack, corrupting top of pt_regs > structure including status field. As a result, kernel attempted to save > or restore inexistent V context. > > [...] Here is the summary with links: - [v2] riscv: prevent pt_regs corruption for secondary idle threads https://git.kernel.org/riscv/c/a638b0461b58 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html