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]
Date:   Mon, 8 Oct 2018 12:51:02 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     Alexey Budankov <alexey.budankov@...ux.intel.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...nel.org>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Andi Kleen <ak@...ux.intel.com>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v11 1/3]: perf util: map data buffer for preserving
 collected data

On Mon, Oct 08, 2018 at 09:14:29AM +0300, Alexey Budankov wrote:

SNIP

>  static int overwrite_rb_find_range(void *buf, int mask, u64 *start, u64 *end)
> diff --git a/tools/perf/util/mmap.h b/tools/perf/util/mmap.h
> index e603314dc792..1b63b6cc7cf9 100644
> --- a/tools/perf/util/mmap.h
> +++ b/tools/perf/util/mmap.h
> @@ -6,6 +6,9 @@
>  #include <linux/types.h>
>  #include <asm/barrier.h>
>  #include <stdbool.h>
> +#ifdef HAVE_AIO_SUPPORT
> +#include <aio.h>
> +#endif
>  #include "auxtrace.h"
>  #include "event.h"
>  
> @@ -26,6 +29,11 @@ struct perf_mmap {
>  	bool		 overwrite;
>  	struct auxtrace_mmap auxtrace_mmap;
>  	char		 event_copy[PERF_SAMPLE_MAX_SIZE] __aligned(8);
> +#ifdef HAVE_AIO_SUPPORT
> +	void 		 *data;
> +	struct aiocb	 cblock;
> +	int		 nr_cblocks;
> +#endif

could you please separate those in struct, maybe anonymous like:

	...
	struct {
		void 		 *data;
		struct aiocb	 cblock;
		int		 nr_cblocks;
	} aio;
	...


>  };
>  
>  /*
> @@ -59,6 +67,9 @@ enum bkw_mmap_state {
>  struct mmap_params {
>  	int			    prot, mask;
>  	struct auxtrace_mmap_params auxtrace_mp;
> +#ifdef HAVE_AIO_SUPPORT
> +	int			    nr_cblocks;
> +#endif

I dont think we need the ifdef here.. IMO one extra int is not
worth of the ifdef endif confusion

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ