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, 29 Nov 2011 19:22:31 +0100
From:	Robert Richter <robert.richter@....com>
To:	Stephane Eranian <eranian@...gle.com>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"acme@...hat.com" <acme@...hat.com>,
	"peterz@...radead.org" <peterz@...radead.org>,
	"dsahern@...il.com" <dsahern@...il.com>,
	"ak@...ux.intel.com" <ak@...ux.intel.com>,
	"mingo@...e.hu" <mingo@...e.hu>
Subject: Re: [PATCH] perf: make perf.data more self-descriptive (v8)

On 30.09.11 09:40:40, Stephane Eranian wrote:
> @@ -385,36 +1433,69 @@ static int perf_header__adds_write(struct perf_header *header,
>         sec_start = header->data_offset + header->data_size;
>         lseek(fd, sec_start + sec_size, SEEK_SET);
> 
> -       if (perf_header__has_feat(header, HEADER_TRACE_INFO)) {
> -               struct perf_file_section *trace_sec;
> -
> -               trace_sec = &feat_sec[idx++];
> +       err = do_write_feat(fd, header, HEADER_TRACE_INFO, &p, evlist);
> +       if (err)
> +               goto out_free;
> 
> -               /* Write trace info */
> -               trace_sec->offset = lseek(fd, 0, SEEK_CUR);
> -               read_tracing_data(fd, &evlist->entries);
> -               trace_sec->size = lseek(fd, 0, SEEK_CUR) - trace_sec->offset;
> +       err = do_write_feat(fd, header, HEADER_BUILD_ID, &p, evlist);
> +       if (err) {
> +               perf_header__clear_feat(header, HEADER_BUILD_ID);
> +               goto out_free;
>         }

Stephane,

I am just looking at the code and got a question:

Is there a reason for the different error handling for
HEADER_TRACE_INFO and HEADER_BUILD_ID? All other types simply disable
the feature and go on without returning an error (goto out_free).

-Robert

-- 
Advanced Micro Devices, Inc.
Operating System Research Center

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ