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]
Date:   Tue, 3 Jul 2018 15:41:39 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     Mathieu Poirier <mathieu.poirier@...aro.org>
Cc:     peterz@...radead.org, acme@...nel.org, mingo@...hat.com,
        tglx@...utronix.de, alexander.shishkin@...ux.intel.com,
        schwidefsky@...ibm.com, heiko.carstens@...ibm.com,
        will.deacon@....com, mark.rutland@....com, namhyung@...nel.org,
        adrian.hunter@...el.com, ast@...nel.org,
        gregkh@...uxfoundation.org, hpa@...or.com,
        linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 5/6] perf/core: Use ioctl to communicate driver
 configuration to kernel

On Mon, Jul 02, 2018 at 04:33:29PM -0600, Mathieu Poirier wrote:

SNIP

> +	ret = 0;
> +out:
> +	return ret;
> +}
> +
> +static int perf_event_set_drv_config(struct perf_event *event, void __user *arg)
> +{
> +	int ret = -EINVAL;
> +	char *config_str;
> +
> +	config_str = strndup_user(arg, PAGE_SIZE);
> +	if (IS_ERR(config_str))
> +		return PTR_ERR(config_str);
> +
> +	if (has_drv_config(event))

would it be better to make this check before
the alloc/copy data from user takes place?

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ