From nobody Mon Nov 25 08:04:36 2024 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 2A7971CF5E9 for ; Wed, 30 Oct 2024 05:36:11 +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=1730266572; cv=none; b=bd6DCmJrPnQ6WhmnbadgX/7QPQOi4oo+rjHVDJkJSrDd7Y0/wgHCxfe9WduQscM7ZK8oy5zfDEdIBRgGE4OH4qGyNY6xOBoKNJ1yUazEM3dGP/pk+dWCalycn9hv1haSPOW9njStgo4gQ+E66D6dM6vmqdSXxMY3xW8eKhuAxp4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730266572; c=relaxed/simple; bh=RZcE8kYwVBL5aI5YvzmADyiAuU5C/gpT3PizaPFFQNc=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=LknfrF5M/bLRJvnQ6iNo7LamFRX7FHnv0Yo4UCei/HVBJ7PFFPJ6nartHqcFyMtihG15HzXG4G+daoEADYNZTDJw8fEjCcHG1ckPf3B1WD/twRs3nPgZ6W1unNw8yp1Ptp8EEYckzIKnRkMIfbI/qQZS50DH1RPpcE0+Pi//P5o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0672C4CEE9; Wed, 30 Oct 2024 05:36:11 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.98) (envelope-from ) id 1t61OC-00000005BCe-3Bw4; Wed, 30 Oct 2024 01:37:04 -0400 Message-ID: <20241030053704.621655585@goodmis.org> User-Agent: quilt/0.68 Date: Wed, 30 Oct 2024 01:36:51 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Ryan Roberts Subject: [for-next][PATCH 1/7] fgraph: Separate size of ret_stack from PAGE_SIZE References: <20241030053650.956861738@goodmis.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Steven Rostedt The ret_stack (shadow stack used by function graph infrastructure) is currently defined as PAGE_SIZE. But some architectures which have 64K PAGE_SIZE, this is way overkill. Also there's an effort to allow the PAGE_SIZE to be defined at boot up. Hard code it for now to 4096. In the future, this size may change and even be dependent on specific architectures. Link: https://lore.kernel.org/all/e5067bb8-0fcd-4739-9bca-0e872037d5a1@arm.= com/ Cc: Mark Rutland Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20241019152951.053f9646@rorschach.local.home Suggested-by: Ryan Roberts Reviewed-by: Ryan Roberts Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) --- kernel/trace/fgraph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c index 13fcc25d15a0..4ce87982966a 100644 --- a/kernel/trace/fgraph.c +++ b/kernel/trace/fgraph.c @@ -153,7 +153,7 @@ enum { * SHADOW_STACK_OFFSET: The size in long words of the shadow stack * SHADOW_STACK_MAX_OFFSET: The max offset of the stack for a new frame to= be added */ -#define SHADOW_STACK_SIZE (PAGE_SIZE) +#define SHADOW_STACK_SIZE (4096) #define SHADOW_STACK_OFFSET (SHADOW_STACK_SIZE / sizeof(long)) /* Leave on a buffer at the end */ #define SHADOW_STACK_MAX_OFFSET \ --=20 2.45.2