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: <560D1CBD.4050809@intel.com>
Date:	Thu, 1 Oct 2015 14:45:01 +0300
From:	Adrian Hunter <adrian.hunter@...el.com>
To:	Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:	Jiri Olsa <jolsa@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 17/25] perf callchain: Allow for max_stack greater than
 PERF_MAX_STACK_DEPTH

On 29/09/15 11:16, Adrian Hunter wrote:
> On 28/09/15 23:08, Arnaldo Carvalho de Melo wrote:
>> Em Fri, Sep 25, 2015 at 04:15:48PM +0300, Adrian Hunter escreveu:
>>> Adjust the validation to allow for max_stack greater than
>>> PERF_MAX_STACK_DEPTH.
>>>
>>> Signed-off-by: Adrian Hunter <adrian.hunter@...el.com>
>>> ---
>>>  tools/perf/util/machine.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
>>> index fd1efeafb343..d7bd9a304535 100644
>>> --- a/tools/perf/util/machine.c
>>> +++ b/tools/perf/util/machine.c
>>> @@ -1831,7 +1831,7 @@ static int thread__resolve_callchain_sample(struct thread *thread,
>>>  	}
>>>  
>>>  check_calls:
>>> -	if (chain->nr > PERF_MAX_STACK_DEPTH) {
>>> +	if (chain->nr > PERF_MAX_STACK_DEPTH && (int)chain->nr > max_stack) {
>>
>> Both?
> 
> Yes.
> 
> In the case of a hardware generated callchain, the callchain can be up to
> PERF_MAX_STACK_DEPTH but max_stack can be less than PERF_MAX_STACK_DEPTH to
> limit the number processed.
> 
> In the case of a synthesized callchain, the callchain can be up to max_stack
> which might be more than PERF_MAX_STACK_DEPTH.

Is this ok?

> 
>>
>>>  		pr_warning("corrupted callchain. skipping...\n");
>>>  		return 0;
>>>  	}
>>> -- 
>>> 1.9.1
>>
> 
> 

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