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:	Fri, 06 Sep 2013 14:11:28 +0530
From:	Hemant <hkshaw@...ux.vnet.ibm.com>
To:	Namhyung Kim <namhyung@...nel.org>
CC:	linux-kernel@...r.kernel.org, srikar@...ux.vnet.ibm.com,
	peterz@...radead.org, oleg@...hat.com, mingo@...hat.com,
	anton@...hat.com, systemtap@...rceware.org,
	masami.hiramatsu.pt@...achi.com
Subject: Re: [PATCH 1/2] SDT markers listing by perf

Hi Namhyung,

On 09/06/2013 12:07 PM, Namhyung Kim wrote:
> Hi Hemant,
>
> On Wed, 04 Sep 2013 23:07:57 +0530, Hemant wrote:
>> On 09/04/2013 12:12 PM, Namhyung Kim wrote:
>>> On Tue, 03 Sep 2013 13:06:55 +0530, Hemant Kumar wrote:
>>>> +	/*
>>>> +	 * Look for Section type = SHT_NOTE, flags = no SHF_ALLOC
>>>> +	 * and name = .note.stapsdt
>>>> +	 */
>>>> +	scn = elf_section_by_name(elf, &ehdr, &shdr, NOTE_SCN, NULL);
>>>> +	if (scn == NULL) {
>>>> +		pr_err("%s section not found!\n", NOTE_SCN);
>>>> +		goto out_end;
>>>> +	}
>>>> +
>>>> +	if (!(shdr.sh_type == SHT_NOTE) || (shdr.sh_flags & SHF_ALLOC))
>>>> +		goto out_end;
>>>> +
>>>> +	data = elf_getdata(scn, NULL);
>>>> +
>>>> +	/* Get the notes */
>>>> +	for (offset = 0; (next = gelf_getnote(data, offset, &nhdr, &name_off,
>>>> +					      &desc_off)) > 0; offset = next) {
>>>> +		tmp = populate_note(&elf, (const char *)((long)(data->d_buf) +
>>>> +							 (long)desc_off),
>>>> +				    nhdr.n_descsz, nhdr.n_type);
>>> Shouldn't we check the name of note being "stapsdt" as well as version
>>> (type) 3?
>> Since, we are already fetching the section NOTE_SCN (".note.stapsdt")
>> and then we check for the type being SHT_NOTE and SHF_ALLOC, is it
>> required to do the same for the individual notes?
> I don't know.  Now it seems only includes SDT notes with name being
> "stapsdt" and type being 3.  But things can be changed in future..
>
> Thanks,
> Namhyung
>

Yeah that may be a case. Ok, will put a check on the individual markers 
for their type.

Thanks
Hemant

--
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