lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180416165509.GC3202@kernel.org>
Date:   Mon, 16 Apr 2018 13:55:09 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Jiri Olsa <jolsa@...nel.org>
Cc:     Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        lkml <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Andi Kleen <andi@...stfloor.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        hpa@...or.com, Namhyung Kim <namhyung@...nel.org>,
        syzkaller-bugs@...glegroups.com, tglx@...utronix.de, x86@...nel.org
Subject: Re: [PATCH 1/3] perf: Return proper values for user stack errors

Em Mon, Apr 16, 2018 at 01:54:30PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Sun, Apr 15, 2018 at 11:23:50AM +0200, Jiri Olsa escreveu:
> > Return immediately when we find issue in the user
> > stack checks. The error value could get overwritten
> > by following check for PERF_SAMPLE_REGS_INTR.
> > 
> > Signed-off-by: Jiri Olsa <jolsa@...nel.org>
> 
> Also, since you're sending this to syskaller-bugs, was this something
> reported by that tool? If so I think we should communicate with him,
> like described in its docs, no? /me goes to find the doc snippet...

Ok, you did it in 2/3, nevermind then :-)
 
- Arnaldo
> 
> 
> >  kernel/events/core.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/kernel/events/core.c b/kernel/events/core.c
> > index fc1c330c6bd6..4d997bc064d2 100644
> > --- a/kernel/events/core.c
> > +++ b/kernel/events/core.c
> > @@ -10191,9 +10191,9 @@ static int perf_copy_attr(struct perf_event_attr __user *uattr,
> >  		 * __u16 sample size limit.
> >  		 */
> >  		if (attr->sample_stack_user >= USHRT_MAX)
> > -			ret = -EINVAL;
> > +			return -EINVAL;
> >  		else if (!IS_ALIGNED(attr->sample_stack_user, sizeof(u64)))
> > -			ret = -EINVAL;
> > +			return -EINVAL;
> >  	}
> >  
> >  	if (!attr->sample_max_stack)
> > -- 
> > 2.13.6

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ