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] [day] [month] [year] [list]
Date:   Wed, 27 Jul 2022 12:01:25 -0700
From:   Beau Belgrave <beaub@...ux.microsoft.com>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     mhiramat@...nel.org, mathieu.desnoyers@...icios.com,
        linux-trace-devel@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arch@...r.kernel.org
Subject: Re: [PATCH v2 6/7] tracing/user_events: Use bits vs bytes for
 enabled status page data

On Wed, Jul 27, 2022 at 09:45:17AM -0400, Steven Rostedt wrote:
> On Tue, 26 Jul 2022 19:01:47 -0700
> Beau Belgrave <beaub@...ux.microsoft.com> wrote:
> 
> > Ah, I see the confusion. Sorry.  
> > 
> > EVENT_STATUS_* are internal bits that aren't used with STATUS_MASK or
> > STATUS_BYTE. It's only used to set and check the user event status byte
> > for checking if anything is attached and outputting which probe is
> > connected within the kernel side.
> > 
> > STATUS_BYTE and STATUS_MASK take a bit in a bitmap and figure out which
> > byte in the status mapping should be used and which bit in that byte
> > should be set/reset (mask) when it's enabled/disabled via a probe. Both
> > the user and kernel need to align on this logic.
> > 
> > IE: Bits above the lower 3 of the index/bit of the event to enable is the byte
> > and the lower 3 bits (& 7) is the actual bit to set.
> > 
> > For example if the user_event with the index 1024 is enabled, we need to
> > figure out which byte and bit represents that event when a probe is
> > attached.
> > 
> > I got into detail of this in the documentation for both a byte and long
> > wise checking of these values.
> > 
> > Hope that helps explain it.
> 
> Yes, but that should be in the comments above the code.
> 

Will do, I will also change to use the BIT() macro as you suggested.

> -- Steve

Thanks,
-Beau

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ