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: <robbat2-20211007T172058-955036195Z@orbis-terrarum.net>
Date:   Thu, 7 Oct 2021 17:26:04 +0000
From:   "Robin H. Johnson" <robbat2@...too.org>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        "Robin H. Johnson" <robbat2@...too.org>,
        linux-kernel@...r.kernel.org, mingo@...hat.com,
        rjohnson@...italocean.com,
        Arnaldo Carvalho de Melo <acme@...nel.org>
Subject: Re: [PATCH 1/2] tracing: show size of requested buffer

On Thu, Oct 07, 2021 at 09:23:58AM -0400, Steven Rostedt wrote:
> On Thu, 7 Oct 2021 09:11:51 +0200
> Peter Zijlstra <peterz@...radead.org> wrote:
> 
> > > > +++ 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))  
> > 
> > Priting a constant seems daft.. why is any of this important in any way?
> 
> I see your point, but it can be useful if you changed it, and want to know
> if you are running the kernel with the change or not.
> 
> I've done daft things were I changed a const and was running a kernel
> without the change and couldn't understand why it wasn't working ;-)
Yes, my initial internal versions of this series only bumped the
constant, and then I was running a few different kernels, and being able
to compare which value was in use became a problem.

I was trying to think further what would make sense for the constant.
- What are the negative impacts of a too-large value?
- Is there demand for more reconfigurability? 
- Should PERF_MAX_TRACE_SIZE be a knob in Kconfig?

-- 
Robin Hugh Johnson
Gentoo Linux: Dev, Infra Lead, Foundation Treasurer
E-Mail   : robbat2@...too.org
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85
GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136

Download attachment "signature.asc" of type "application/pgp-signature" (1114 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ