public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bagas Sanjaya <bagasdotme@gmail.com>
To: wardenjohn <ydzhang@linux.alibaba.com>
Cc: jpoimboe <jpoimboe@kernel.org>, jikos <jikos@kernel.org>,
	mbenes <mbenes@suse.cz>, pmladek <pmladek@suse.com>,
	"joe.lawrence" <joe.lawrence@redhat.com>,
	Kernel Live Patching <live-patching@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Fix MAX_STACK_ENTRIES from 100 to 32
Date: Sun, 9 Jul 2023 15:07:01 +0700	[thread overview]
Message-ID: <ZKpqpamE89nvgslC@debian.me> (raw)
In-Reply-To: <931aaecf-66b1-469a-8bc3-7126871a8464.ydzhang@linux.alibaba.com>

[-- Attachment #1: Type: text/plain, Size: 1657 bytes --]

On Sat, Jul 08, 2023 at 09:56:34AM +0800, wardenjohn wrote:
> Thanks for reading my suggestion. I found that the array for task stack entries when
> doing livepatch function check is too large which seems to be unnecessary. Therefore,
> I suggest to fix the MAX_STACK_ENTRIES from 100 to 32.

Can you provide Link: to the discussion? Yet, I guess this is somehow
v2 patch.

> 
> The patch is as follows:
> 
> From ee27da5e64daced159257f54170a31141e943710 Mon Sep 17 00:00:00 2001
> From: Yongde Zhang <ydzhang@linux.alibaba.com>
> Date: Sat, 8 Jul 2023 09:40:50 +0800
> Subject: [PATCH] Fix MAX_STACK_ENTRIES to 32
> 
> When checking the task stack, using an stack array of size 100 
> seems to be to large for a task stack. Therefore, I suggest to
> change the stack size from 100 to 32. 

Why is MAX_STACK_ENTRIES=100 overkill? And why do you reduce it?

> 
> Signed-off-by: Yongde Zhang <ydzhang@linux.alibaba.com>
> ---
>  kernel/livepatch/transition.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/livepatch/transition.c b/kernel/livepatch/transition.c
> index e54c3d60a904..8d61c62b0c27 100644
> --- a/kernel/livepatch/transition.c
> +++ b/kernel/livepatch/transition.c
> @@ -14,7 +14,7 @@
>  #include "patch.h"
>  #include "transition.h"
>  
> -#define MAX_STACK_ENTRIES  100
> +#define MAX_STACK_ENTRIES  32
>  static DEFINE_PER_CPU(unsigned long[MAX_STACK_ENTRIES], klp_stack_entries);
>  
>  #define STACK_ERR_BUF_SIZE 128 

Your patch is MIME'd, please submit it with git-send-email(1) instead.

Thanks.

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2023-07-09  8:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-08  1:56 Fix MAX_STACK_ENTRIES from 100 to 32 wardenjohn
2023-07-09  8:07 ` Bagas Sanjaya [this message]
2023-07-09 13:09   ` wardenjohn
2023-07-10 17:13     ` Josh Poimboeuf
2023-07-12 14:48       ` wardenjohn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZKpqpamE89nvgslC@debian.me \
    --to=bagasdotme@gmail.com \
    --cc=jikos@kernel.org \
    --cc=joe.lawrence@redhat.com \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --cc=pmladek@suse.com \
    --cc=ydzhang@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox