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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171113115229.GB3017@krava>
Date:   Mon, 13 Nov 2017 12:52:29 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Wang Nan <wangnan0@...wei.com>
Cc:     linux-kernel@...r.kernel.org, kan.liang@...el.com, acme@...nel.org,
        namhyung@...nel.org
Subject: Re: [PATCH 6/7] perf tools: Remove 'overwrite' concept from code
 level

On Mon, Nov 13, 2017 at 01:38:08AM +0000, Wang Nan wrote:

SNIP

>  size_t perf_mmap__mmap_len(struct perf_mmap *map);
> diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c
> index c129e99..ece33b4 100644
> --- a/tools/perf/util/python.c
> +++ b/tools/perf/util/python.c
> @@ -856,14 +856,14 @@ static PyObject *pyrf_evlist__mmap(struct pyrf_evlist *pevlist,
>  				   PyObject *args, PyObject *kwargs)
>  {
>  	struct perf_evlist *evlist = &pevlist->evlist;
> -	static char *kwlist[] = { "pages", "overwrite", NULL };

unlikely, but there might be already some users of this..

I think the best would be to keep the "overwrite" here and
don't use it.. maybe warn or update docs, if there's any ;-)

jirka

> -	int pages = 128, overwrite = false;
> +	static char *kwlist[] = { "pages", NULL };
> +	int pages = 128;
>  
> -	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ii", kwlist,
> -					 &pages, &overwrite))
> +	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i", kwlist,
> +					 &pages))
>  		return NULL;
>  
> -	if (perf_evlist__mmap(evlist, pages, overwrite) < 0) {
> +	if (perf_evlist__mmap(evlist, pages) < 0) {
>  		PyErr_SetFromErrno(PyExc_OSError);
>  		return NULL;
>  	}
> -- 
> 2.10.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ