Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp793264lqo; Fri, 10 May 2024 15:37:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW622+288U0vnDmjnZNNRLcPgzg67T7LgMg8FUD+7l+1TkaMPtbrYPc+9hAkZ3aUvF7oGf+0txdgm7TxI/YSenK/lZvqCQ1ABc6Dwe01w== X-Google-Smtp-Source: AGHT+IFs5WdnxZMbSUZxvIXwV6zcRvVQuNFvlaZjmFif8D/pE0zTMh3xpiB9sZ9dL00FfW13VFtd X-Received: by 2002:ac2:4c85:0:b0:51d:1c86:a274 with SMTP id 2adb3069b0e04-5221017775amr2413341e87.34.1715380666239; Fri, 10 May 2024 15:37:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715380666; cv=pass; d=google.com; s=arc-20160816; b=Uc4Rfzkow8YFAzlxf8qukBKWFNZJnGWSgIgnpUUO7LBE002CXYXpAUe3yM8EGVFAFM afLAUH4NyygPr62eVqyKNwd9T+eJeCbRMvSPPjlL6Uy/dRHuNQdaSPg+dOHOjFPM09mw 0mkVcMCs3FtAfIHKMor5GQIG2hs1jvyrd7Hpck5NluY9RPXBlo4rBekONeu13ueMLDLM 7Hj39rVqiVH0616v3z1iIRBQxd2I0esQYJQQEJ+2aBTE6Qkcbe9uiP4GU2PgkZf1vFwR b3vZQPfR9dVUt3CNDVH4edGf3LsR50gXUw7GGpOxgqrW9NcIb4DaAnWijLlknpHBOki9 Z5tw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=zS7lCbzZkns2fdQ69wn4m037nt1gQxHyRlvOKblzJbQ=; fh=8naPtvQpdmQ7bUNDcqYntB+QnJz904j8odWHIF759Pc=; b=wj0yUb2qJpeK29/PleeM8DavpZIzE9GBHmcHNHKf/XWXnETl8AirK8XkAvLkA+1siR jVbw5EEYKuTLL1EMsJlGjaFLeIU/VcZCDcuvLnlxdN0HuD5K7PwtM/FJNi+lPS052LgG fTBCHMzbpjfAFTHSoE9wWBmmI0nNd9oO2QalKbMPLaccwh7Xskdprx+lAKFZOzEn9Xk8 BT0aIFVq3lqSN4h6278LBzWAsfavdO0UAvEk9RG6aONDwrLf6tyKs5eMrDAEePJJ8Lvp cSSQK7XAGHk62mm3IPXu2p12K+yk/DuvOB5145Wedz24q57aTWtGb3MNE+bH2A1Wl3FI lD0g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b="k12AqZ/B"; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-176278-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176278-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17ba2e7asi253879866b.516.2024.05.10.15.37.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 15:37:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176278-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b="k12AqZ/B"; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-176278-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176278-linux.lists.archive=gmail.com@vger.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5CA781F23874 for ; Fri, 10 May 2024 22:37:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D3623171E72; Fri, 10 May 2024 22:36:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="k12AqZ/B" Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4A5716F848 for ; Fri, 10 May 2024 22:36:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715380618; cv=none; b=nbUS/bjR7loRLg6558LsaWbkCHwtbKGnodwNTM83l4LhSnX3H5Ik2OP7++pkhm63jYHLrBYTGhg2qiO2osgxbnLKWDDoZAVnQGjYApkEGseVj8zV/qi5b+laJzfrYDQIkahxgQPf8JijoqCYh8FNN919LM3bOkCuS9yqA10uyew= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715380618; c=relaxed/simple; bh=yoVhvIbXtXjAXXbTeoK/ZDLeEQzQ/4+EhbyXgPPnC74=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=osXVwESkdRnQ9M8cwqnVXDcPU6uWXSk0LhbYW/M0EtyBkemDiAfI0LYFmK7F49mfyQXlC1H6d9V3EFYfZMyxUUkPNv+tuGTEUZW048o0+HpCBeay8laDPhOMULOeXKZQdnMsXZ0vw2hcAwBxT1j784gPiYWI2d/emjbVEVb2Q9U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=k12AqZ/B; arc=none smtp.client-ip=209.85.215.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-5d3907ff128so2046976a12.3 for ; Fri, 10 May 2024 15:36:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1715380615; x=1715985415; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=zS7lCbzZkns2fdQ69wn4m037nt1gQxHyRlvOKblzJbQ=; b=k12AqZ/Bq0Z+cHO6rimHqBAFFXB4mSIfmE8UdZggLlEgmkr+khlydOldPXDim6nMTx FRvQmSpiVUlYESYUziCy/pZ0o0hB6IH4Vv8de5ZGIM7p6rh6aum/Lhkq2y5nvoJC7/YO cmqaLm9Fw7xT9qUzFcpK4IfzV9F7gRGBf3nIPQGyuBOf89a3VltX3DRiqZ9kyc8DijBX OvS2gz1n687nO+f5aBbk2O1dtI9BIsVJ0VmVnLgPVTDTXqXH3L2xEkEbd3vJ5GD6liMZ HvEnV0dpii2FIgo6/LoIkoPEBujpKPngyylN9RIXTLKyIcXkLTGImyvAEYRkmImgD9Ra RgpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715380615; x=1715985415; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=zS7lCbzZkns2fdQ69wn4m037nt1gQxHyRlvOKblzJbQ=; b=NBITy7ijvIaH/aWsp1o9uwaq6kT+Wgr/PwVpVYkAj0FnMmzYZZaGVO5MDFtkN9ugEI eCYvyX8q9QSCe9SNInzPeEiKbN693BH2U5jP+cRw0IrWYk0OzNDDGuOEPvdaF6OJc+9p H9pgdqLuljgUNVZ7lDkBzTV8Bovje66ArMjzPWYvhrbqZhEjcCUhkCVHsPvzFjp19O5k iLxb72tUJuW0QbBScQN5f4F0DGrEP3AYve5c4zhJqQp7+99HRIhL56Jdq6vN6+o3K6VP Wt3KRqHPDE+07DPOiQjuaorjZhd2wjfkE7arfImlLb9x4G6R6x86HLUFY3bJDb0foJbx w3wA== X-Forwarded-Encrypted: i=1; AJvYcCUhXEaUy7vN/8QcBp9hAo3OS2gGQXT5z2yJLu9yZCkF6nnnz2kUeqw094lx6rYWsb2RvvXiflx0mxm2oN+/cWxWwzdPCAeVHU2ri+4d X-Gm-Message-State: AOJu0YweooKrn4CABQmsiwhJxreMcm+O0IshAYcPXjnjlV/FY3eRJuiu iMYw1tsoMAiHPIcqY9lJ1ERpFwLeFxNcSYyW549T4HRTXa8VoXz3ZMpObhgnSjY= X-Received: by 2002:a05:6a20:3206:b0:1aa:5a22:5eca with SMTP id adf61e73a8af0-1afde0ecc61mr4558503637.31.1715380615067; Fri, 10 May 2024 15:36:55 -0700 (PDT) Received: from ghost ([2601:647:5700:6860:629e:3f2:f321:6c]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2a83d3dsm3438933b3a.65.2024.05.10.15.36.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 15:36:54 -0700 (PDT) Date: Fri, 10 May 2024 15:36:50 -0700 From: Charlie Jenkins To: Deepak Gupta Cc: paul.walmsley@sifive.com, rick.p.edgecombe@intel.com, broonie@kernel.org, Szabolcs.Nagy@arm.com, kito.cheng@sifive.com, keescook@chromium.org, ajones@ventanamicro.com, conor.dooley@microchip.com, cleger@rivosinc.com, atishp@atishpatra.org, alex@ghiti.fr, bjorn@rivosinc.com, alexghiti@rivosinc.com, samuel.holland@sifive.com, conor@kernel.org, linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kselftest@vger.kernel.org, corbet@lwn.net, palmer@dabbelt.com, aou@eecs.berkeley.edu, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, oleg@redhat.com, akpm@linux-foundation.org, arnd@arndb.de, ebiederm@xmission.com, Liam.Howlett@oracle.com, vbabka@suse.cz, lstoakes@gmail.com, shuah@kernel.org, brauner@kernel.org, andy.chiu@sifive.com, jerry.shih@sifive.com, hankuan.chen@sifive.com, greentime.hu@sifive.com, evan@rivosinc.com, xiao.w.wang@intel.com, apatel@ventanamicro.com, mchitale@ventanamicro.com, dbarboza@ventanamicro.com, sameo@rivosinc.com, shikemeng@huaweicloud.com, willy@infradead.org, vincent.chen@sifive.com, guoren@kernel.org, samitolvanen@google.com, songshuaishuai@tinylab.org, gerg@kernel.org, heiko@sntech.de, bhe@redhat.com, jeeheng.sia@starfivetech.com, cyy@cyyself.name, maskray@google.com, ancientmodern4@gmail.com, mathis.salmen@matsal.de, cuiyunhui@bytedance.com, bgray@linux.ibm.com, mpe@ellerman.id.au, baruch@tkos.co.il, alx@kernel.org, david@redhat.com, catalin.marinas@arm.com, revest@chromium.org, josh@joshtriplett.org, shr@devkernel.io, deller@gmx.de, omosnace@redhat.com, ojeda@kernel.org, jhubbard@nvidia.com Subject: Re: [PATCH v3 03/29] riscv/Kconfig: enable HAVE_EXIT_THREAD for riscv Message-ID: References: <20240403234054.2020347-1-debug@rivosinc.com> <20240403234054.2020347-4-debug@rivosinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240403234054.2020347-4-debug@rivosinc.com> On Wed, Apr 03, 2024 at 04:34:51PM -0700, Deepak Gupta wrote: > riscv will need an implementation for exit_thread to clean up shadow stack > when thread exits. If current thread had shadow stack enabled, shadow > stack is allocated by default for any new thread. > > Signed-off-by: Deepak Gupta > --- > arch/riscv/Kconfig | 1 + > arch/riscv/kernel/process.c | 5 +++++ > 2 files changed, 6 insertions(+) > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index e3142ce531a0..7e0b2bcc388f 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -149,6 +149,7 @@ config RISCV > select HAVE_SAMPLE_FTRACE_DIRECT_MULTI > select HAVE_STACKPROTECTOR > select HAVE_SYSCALL_TRACEPOINTS > + select HAVE_EXIT_THREAD > select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU > select IRQ_DOMAIN > select IRQ_FORCED_THREADING > diff --git a/arch/riscv/kernel/process.c b/arch/riscv/kernel/process.c > index d3109557f951..ce577cdc2af3 100644 > --- a/arch/riscv/kernel/process.c > +++ b/arch/riscv/kernel/process.c > @@ -200,6 +200,11 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) > return 0; > } > > +void exit_thread(struct task_struct *tsk) > +{ > + > +} > + > int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) > { > unsigned long clone_flags = args->flags; > -- > 2.43.2 > Reviewed-by: Charlie Jenkins