Message ID | 20220921214439.1491510-14-stillson@rivosinc.com |
---|---|
State | Changes Requested |
Headers | show
Return-Path: <kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=biMMxDha; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rivosinc-com.20210112.gappssmtp.com header.i=@rivosinc-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=RhfYoTnr; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MXsdD5DTzz1ypX for <incoming@patchwork.ozlabs.org>; Thu, 22 Sep 2022 07:54:24 +1000 (AEST) 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=mryWvJovzq9y5YFqYStNf6pCCrl7Zn5G5TnbA5GBDDs=; b=biMMxDhak6NoOy S6+Dazr629F5YhpQ2B6NpFqKsZBgy5ZdRSFUqR+yPF+J7ew/xVdp5RlvFRlWu/v9xGoeHL1UjE7x9 UepHbZNAhJLXZts+/l5ziWdfVUtYPlhJjs9Uv6ByJ72lSpgys/HuO6cElEmoyIzadc/t94sSAu64d 9AXtyGJdeIiqUud6fNiCcBBEzIfAjWWZUhvnanr7TxCFr5UXsGVX49azCFAAVabiwo7RLsKshS4tU Wym9UH9jm8cBksjTAHLSCKus6PBqY5DXguFGdblAAMoeVVxf++9tYG9EJ5JFfNpQzyCLTGuZjJajR +tfjojZZdyTqay8Lq/Jw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ob7fg-00CnRN-M4; Wed, 21 Sep 2022 21:54:20 +0000 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ob7fd-00CnOu-Q5 for kvm-riscv@lists.infradead.org; Wed, 21 Sep 2022 21:54:19 +0000 Received: by mail-pg1-x536.google.com with SMTP id f193so7305589pgc.0 for <kvm-riscv@lists.infradead.org>; Wed, 21 Sep 2022 14:54:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=LZQfptf+iYOUQ8McXiQWO1D3Z3+wk/s8KlPsiOQszMo=; b=RhfYoTnryrjb79R3/4iMGX9oI85rhi0a7dzTk51q64kz9gEqhe2p5ESqWV3tIBXz50 uGHQtxX7hluodH7zvyGl8al/gWSP/rTiT6N6TeglXZu4dAjFzTqPApL9AO9CQdZHoLPT ZyQUdJjpTJNhlFoKlRFyLC94IlojQaiPXHoRgQ7Kl3vH0RkKJ3hxasZgTptuNfEPgM7d LxLo3vHGhfKQ1HUb+0RtJcFF/CyWPEqZ2f36nxpQzhYo0AGUXXRGVljzrXu8rK1yYnA3 3R3d/8IC7JHkQlkuCchFxb9vFZPWuEFR7C8yAyp5FNKLD2jJVQe/FHZLeDc5U0fgX60n NsvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=LZQfptf+iYOUQ8McXiQWO1D3Z3+wk/s8KlPsiOQszMo=; b=syS4trxlJPDEUaypJuuOehqMQ/Q+pguV5tJr+/wADHzdWrxkcPx5NBADBpnVdDulYZ vWMjFInYgJ6vlClTIvnbJzApAVTa2ySIGynO4TmE2VeABlH1SHFFeVcalCLeiqic8QS2 qOEKRsZFjxXoXtC1g+PMpD/6luTppSK05Ql80O/FVQjirvwIKUcuwonU/imX6loPFIFE ndYlKH5Aa8gjgwTYivzRuDeHwpD6QtR/Iq+to1jGjvUs4X9JUYizceKoRh0X4TjMg5E4 6okg5G3sbPTxJS4nKUp5xWulXGqxVxNGDnDjtbeneksPdrqKMvcr9Ep+jWkRbpO0uaI2 VFWg== X-Gm-Message-State: ACrzQf0FUfHls7gifUFxpeQ+Ms2CmkJ486LqtmEQx6xGLxCx3YZWhHvB GvCYSEXqqmJG/BLmyQ8yORuTZA== X-Google-Smtp-Source: AMsMyM7qUvsQuumknYRC0jab4HbLRHrOOrTRgBYsQ9Z3D5uB1vAZBfsFyBHuw07wvdsd7OPncjzKyw== X-Received: by 2002:a62:17d1:0:b0:54d:87d5:249e with SMTP id 200-20020a6217d1000000b0054d87d5249emr381182pfx.14.1663797253833; Wed, 21 Sep 2022 14:54:13 -0700 (PDT) Received: from stillson.ba.rivosinc.com ([66.220.2.162]) by smtp.gmail.com with ESMTPSA id k7-20020aa79727000000b005484d133127sm2634536pfg.129.2022.09.21.14.54.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Sep 2022 14:54:13 -0700 (PDT) From: Chris Stillson <stillson@rivosinc.com> To: Cc: Greentime Hu <greentime.hu@sifive.com>, ShihPo Hung <shihpo.hung@sifive.com>, Vincent Chen <vincent.chen@sifive.com>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Eric Biederman <ebiederm@xmission.com>, Kees Cook <keescook@chromium.org>, Anup Patel <anup@brainfault.org>, Atish Patra <atishp@atishpatra.org>, Oleg Nesterov <oleg@redhat.com>, Heinrich Schuchardt <heinrich.schuchardt@canonical.com>, Guo Ren <guoren@kernel.org>, Chris Stillson <stillson@rivosinc.com>, Mayuresh Chitale <mchitale@ventanamicro.com>, Paolo Bonzini <pbonzini@redhat.com>, Alexandre Ghiti <alexandre.ghiti@canonical.com>, Qinglin Pan <panqinglin2020@iscas.ac.cn>, Arnd Bergmann <arnd@arndb.de>, Heiko Stuebner <heiko@sntech.de>, Jisheng Zhang <jszhang@kernel.org>, Dao Lu <daolu@rivosinc.com>, Sunil V L <sunilvl@ventanamicro.com>, Nick Knight <nick.knight@sifive.com>, Han-Kuan Chen <hankuan.chen@sifive.com>, Liao Chang <liaochang1@huawei.com>, Changbin Du <changbin.du@intel.com>, Li Zhengyu <lizhengyu3@huawei.com>, Ard Biesheuvel <ardb@kernel.org>, Tsukasa OI <research_trasio@irq.a4lg.com>, Yury Norov <yury.norov@gmail.com>, Frederic Weisbecker <frederic@kernel.org>, "Paul E. McKenney" <paulmck@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Vitaly Wool <vitaly.wool@konsulko.com>, Myrtle Shah <gatecat@ds0.me>, Catalin Marinas <catalin.marinas@arm.com>, Mark Brown <broonie@kernel.org>, Will Deacon <will@kernel.org>, Alexey Dobriyan <adobriyan@gmail.com>, Huacai Chen <chenhuacai@kernel.org>, Janosch Frank <frankja@linux.ibm.com>, Christian Brauner <brauner@kernel.org>, Evgenii Stepanov <eugenis@google.com>, Colin Cross <ccross@google.com>, Eugene Syromiatnikov <esyr@redhat.com>, Peter Collingbourne <pcc@google.com>, Andrew Morton <akpm@linux-foundation.org>, Barret Rhoden <brho@google.com>, Suren Baghdasaryan <surenb@google.com>, Davidlohr Bueso <dave@stgolabs.net>, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org Subject: [PATCH v12 14/17] riscv: Fix a kernel panic issue if $s2 is set to a specific value before entering Linux Date: Wed, 21 Sep 2022 14:43:56 -0700 Message-Id: <20220921214439.1491510-14-stillson@rivosinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220921214439.1491510-1-stillson@rivosinc.com> References: <20220921214439.1491510-1-stillson@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220921_145417_854539_0C3F35EA X-CRM114-Status: GOOD ( 18.89 ) X-Spam-Score: 0.0 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Greentime Hu <greentime.hu@sifive.com> Panic log: [ 0.018707] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 0.023060] Oops [#1] [ 0.023214] Modules linked in: [ 0.023725] CPU: 0 PID: 0 Comm: swapper [...] Content analysis details: (0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:536 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <kvm-riscv.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/kvm-riscv>, <mailto:kvm-riscv-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/kvm-riscv/> List-Post: <mailto:kvm-riscv@lists.infradead.org> List-Help: <mailto:kvm-riscv-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/kvm-riscv>, <mailto:kvm-riscv-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kvm-riscv" <kvm-riscv-bounces@lists.infradead.org> Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
[v12,01/17] riscv: Rename __switch_to_aux -> fpu
|
expand
|
diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S index 2c81ca42ec4e..c7effef23f41 100644 --- a/arch/riscv/kernel/head.S +++ b/arch/riscv/kernel/head.S @@ -301,6 +301,7 @@ clear_bss_done: la tp, init_task la sp, init_thread_union + THREAD_SIZE XIP_FIXUP_OFFSET sp + addi sp, sp, -PT_SIZE #ifdef CONFIG_BUILTIN_DTB la a0, __dtb_start XIP_FIXUP_OFFSET a0 @@ -318,6 +319,7 @@ clear_bss_done: /* Restore C environment */ la tp, init_task la sp, init_thread_union + THREAD_SIZE + addi sp, sp, -PT_SIZE #ifdef CONFIG_KASAN call kasan_early_init