All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: cgel.zte@gmail.com
Cc: jpoimboe@redhat.com, jbaron@akamai.com, rostedt@goodmis.org,
	ardb@kernel.org, tglx@linutronix.de, mingo@redhat.com,
	bp@alien8.de, x86@kernel.org, hpa@zytor.com,
	linux-kernel@vger.kernel.org, Yang Guang <yang.guang5@zte.com.cn>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] Add exception handling
Date: Sat, 18 Sep 2021 10:12:42 +0200	[thread overview]
Message-ID: <20210918081242.GK4323@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20210918074718.240511-1-yang.guang5@zte.com.cn>

On Sat, Sep 18, 2021 at 07:47:18AM +0000, cgel.zte@gmail.com wrote:
> From: Yang Guang <yang.guang5@zte.com.cn>

That's not the email address this email is from: cgel.zte@gmail.com

In fact, I seem to get a lot of email from cgel.zte@gmail.com claiming
to be from different authors. This cannot be right.

> If the type is abnormal input from argument, the code will be NULL.

This is incorrect, in that case @code is uninitialized.

> So it should return as default;

That reasoning escapes me.

Also, there's exactly two callsites to __static_call_transform(), both
take their .type argument directly from __sc_insn(). Please explain how
the value can be out of range.

I'm thinking you're:

 1) not understanding the code (or necessarily even C)
 2) working on the suggestino of some broken automation

Please, go pester other people. I'll go block all email from
cgel.zte@gmail.com because it's not a single person and the quality of
patches is below par.

> Signed-off-by: Yang Guang <yang.guang5@zte.com.cn>
> ---
>  arch/x86/kernel/static_call.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/x86/kernel/static_call.c b/arch/x86/kernel/static_call.c
> index f608e6710300..696da3eccf28 100644
> --- a/arch/x86/kernel/static_call.c
> +++ b/arch/x86/kernel/static_call.c
> @@ -45,6 +45,8 @@ static void __ref __static_call_transform(void *insn, enum insn_type type, void
>  		code = text_gen_insn(RET_INSN_OPCODE, insn, func);
>  		size = RET_INSN_SIZE;
>  		break;
> +	default:
> +		return;
>  	}
>  
>  	if (memcmp(insn, code, size) == 0)
> -- 
> 2.25.1
> 

      reply	other threads:[~2021-09-18  8:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-18  7:47 [PATCH] Add exception handling cgel.zte
2021-09-18  8:12 ` Peter Zijlstra [this message]

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=20210918081242.GK4323@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=ardb@kernel.org \
    --cc=bp@alien8.de \
    --cc=cgel.zte@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=jbaron@akamai.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yang.guang5@zte.com.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.