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: <20211006182652.6c11ce1b@gandalf.local.home>
Date:   Wed, 6 Oct 2021 18:26:52 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     "Robin H. Johnson" <robbat2@...too.org>
Cc:     linux-kernel@...r.kernel.org, mingo@...hat.com,
        rjohnson@...italocean.com, Peter Zijlstra <peterz@...radead.org>,
        Jiri Olsa <jolsa@...hat.com>,
        Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH 1/2] tracing: show size of requested buffer

On Mon, 30 Aug 2021 21:37:22 -0700
"Robin H. Johnson" <robbat2@...too.org> wrote:

Sorry for the late reply, I was on holiday when this was sent, and I'm just
getting to looking at this email now (as my OoO email should have suggested ;-)

Anyway, this needs to be reviewed by the Perf maintainers (Cc'd)

(Lore link for patch 2: 
  https://lore.kernel.org/all/20210831043723.13481-2-robbat2@gentoo.org/ )

-- Steve


> If the perf buffer isn't large enough, provide a hint about how large it
> needs to be for whatever is running.
> 
> Signed-off-by: Robin H. Johnson <robbat2@...too.org>
> ---
>  kernel/trace/trace_event_perf.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/trace/trace_event_perf.c b/kernel/trace/trace_event_perf.c
> index 03be4435d103..26eed4b89100 100644
> --- a/kernel/trace/trace_event_perf.c
> +++ b/kernel/trace/trace_event_perf.c
> @@ -400,7 +400,8 @@ void *perf_trace_buf_alloc(int size, struct pt_regs **regs, int *rctxp)
>  	BUILD_BUG_ON(PERF_MAX_TRACE_SIZE % sizeof(unsigned long));
>  
>  	if (WARN_ONCE(size > PERF_MAX_TRACE_SIZE,
> -		      "perf buffer not large enough"))
> +		      "perf buffer not large enough, wanted %d, have %d",
> +		      size, PERF_MAX_TRACE_SIZE))
>  		return NULL;
>  
>  	*rctxp = rctx = perf_swevent_get_recursion_context();

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ