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: <20170613185436.GC6092@krava>
Date:   Tue, 13 Jun 2017 20:54:36 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     David Carrillo-Cisneros <davidcc@...gle.com>
Cc:     linux-kernel@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Andi Kleen <ak@...ux.intel.com>, Simon Que <sque@...omium.org>,
        Wang Nan <wangnan0@...wei.com>, Jiri Olsa <jolsa@...nel.org>,
        He Kuang <hekuang@...wei.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Stephane Eranian <eranian@...gle.com>,
        Paul Turner <pjt@...gle.com>
Subject: Re: [PATCH v4 12/16] perf header: add a buffer to struct feat_fd

On Mon, Jun 12, 2017 at 09:29:28PM -0700, David Carrillo-Cisneros wrote:

SNIP

>  /* Return: 0 if succeded, -ERR if failed. */
>  int write_padded(struct feat_fd *ff, const void *bf,
>  		 size_t count, size_t count_aligned)
> @@ -125,13 +151,32 @@ static int do_write_string(struct feat_fd *ff, const char *str)
>  	return write_padded(ff, str, olen, len);
>  }
>  
> -static int __do_read(struct feat_fd *ff, void *addr, ssize_t size)
> +static int __do_read_fd(struct feat_fd *ff, void *addr, ssize_t size)
>  {
> -	ssize_t ret = readn(ff->fd, addr, size);
> +		ssize_t ret = readn(ff->fd, addr, size);
> +
> +		if (ret != size)
> +			return ret < 0 ? (int)ret : -1;
> +		return 0;

extra tab in indent

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ