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: <291c0615-2b5c-0076-faeb-720df9ab5c84@intel.com>
Date:   Fri, 11 May 2018 14:18:01 +0300
From:   Adrian Hunter <adrian.hunter@...el.com>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Andy Lutomirski <luto@...nel.org>,
        "H. Peter Anvin" <hpa@...or.com>, Andi Kleen <ak@...ux.intel.com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Joerg Roedel <joro@...tes.org>, Jiri Olsa <jolsa@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH RFC 07/19] perf tools: Workaround missing maps for x86_64
 KPTI entry trampolines

On 10/05/18 23:47, Arnaldo Carvalho de Melo wrote:
> Em Thu, May 10, 2018 at 05:19:22PM -0300, Arnaldo Carvalho de Melo escreveu:
>> Em Thu, May 10, 2018 at 05:15:42PM -0300, Arnaldo Carvalho de Melo escreveu:
>>> Em Thu, May 10, 2018 at 07:08:37PM +0000, Hunter, Adrian escreveu:
>>>> Let me know if you want me to post the workaround patches separately,
>>>> otherwise I will wait a bit before sending the patches again.
> 
>>> I'll see if I went thru all of the patches already...
>  
>> So I looked at the patches posted and one comment is about the terse
>> commit logs for some of the kcore_copy patches, for instance:
>  
>> --------------------
>>  In preparation to add more program headers, get rid of kernel_map and
>> modules_map.
>> --------------------
>  
>> Can't this be made a bit more verbose? Lemme re-read the patch...
> 
> So you had just one pointers to the kernel map and a module_maps, and
> then this is replaced by kcore_copy__map() that instead of populating
> those fields that are being removed:
> 
> -       struct phdr_data kernel_map;
> -       struct phdr_data modules_map;
> 
> Will allocate and add "struct phdr_data" instances to the
> kcore_copy_info->phdrs list, so I propose, to follow convention used
> elsewhere in tools/perf/ that you rename kcore_copy__map() to
> 
>   kcore_copy_info__addnew(kci, fields)
> 
> I would do it as:
> 
> struct phdr_data *phdr_data__new(fields)
> {
> 	return  zalloc() + init fields;
> }
> 
> struct phdr_data *kcore_copy_info__addnew(kci, fields)
> {
> 	struct phdr_data *pd = phdr_data__new(fields);
> 
> 	if (pd)
> 		list_add(&pd->list, &kci->phdrs)
> }
> 
> Also please rename pd->list to pd->node, to clarify that it is a node in
> some list, not a list.
> 
> The commit log list then could reflect that somehow, with something
> around:
> 
> ----------------------
> 
> Move ->kernel_map and ->modules_map to newly allocated entries in the
> ->phdrs list.
> 
> ----------------------
> 
> wdyt?

I have done the changes but still have kcore_copy__map() calling
kcore_copy_info__addnew().  The changes have been pushed to the same branch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ