mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: Shahab Vahedi <Shahab.Vahedi@synopsys.com>,
	"linux-snps-arc@lists.infradead.org" 
	<linux-snps-arc@lists.infradead.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ARC: entry: fix off-by-one error in syscall number validation
Date: Thu, 29 Apr 2021 18:17:20 +0000	[thread overview]
Message-ID: <c0bb4c71-a3c6-2ae6-c978-d48732a13e78@synopsys.com> (raw)
In-Reply-To: <8d154e49-d77e-012a-81df-c1946b669bb4@synopsys.com>

On 4/29/21 4:39 AM, Shahab Vahedi wrote:
> On 4/23/21 9:52 PM, Vineet Gupta wrote:
>> diff --git a/arch/arc/kernel/entry.S b/arch/arc/kernel/entry.S
>> index 1743506081da..aea9b558993d 100644
>> --- a/arch/arc/kernel/entry.S
>> +++ b/arch/arc/kernel/entry.S
>> @@ -255,7 +255,7 @@ ENTRY(EV_Trap)
>>   	;============ Normal syscall case
>>   
>>   	; syscall num shd not exceed the total system calls avail
>> -	cmp     r8,  NR_syscalls
>> +	cmp     r8,  NR_syscalls - 1
>>   	mov.hi  r0, -ENOSYS
>>   	bhi     .Lret_from_system_call
> Same problem exists in "syscall Tracing" section:
>
> ; Do the Sys Call as we normally would.
> ; Validate the Sys Call number
> cmp     r8,  NR_syscalls
> mov.hi  r0, -ENOSYS
> bhi     tracesys_exit

Thanks for spotting this. I'll fix this up and repush (after the ongoing 
merge window).

-Vineet

      reply	other threads:[~2021-04-29 18:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-23 19:52 Vineet Gupta
2021-04-29 11:39 ` Shahab Vahedi
2021-04-29 18:17   ` Vineet Gupta [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=c0bb4c71-a3c6-2ae6-c978-d48732a13e78@synopsys.com \
    --to=vineet.gupta1@synopsys.com \
    --cc=Shahab.Vahedi@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    /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

all inboxes | Powered by JetHome®