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]
Message-Id: <20181024154316.810676f4b8eb9be637a34e28@linux-foundation.org>
Date:   Wed, 24 Oct 2018 15:43:16 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Dan Williams <dan.j.williams@...el.com>
Cc:     sebhtml@...eotron.qc.ca, Steven Rostedt <rostedt@...dmis.org>,
        acme@...hat.com, tz.stoyanov@...il.com,
        Namhyung Kim <namhyung@...nel.org>, zwisler@...nel.org,
        arangradient@...il.com, linux-perf-users@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] pfn_t: force '~' to be parsed as an unary operator

On Mon, 22 Oct 2018 10:13:48 -0700 Dan Williams <dan.j.williams@...el.com> wrote:

> [ added Andrew ]
> 
> Patch here: https://lore.kernel.org/patchwork/patch/1002234/
> 
> On Sun, Oct 21, 2018 at 8:00 AM Sebastien Boisvert
> <sebhtml@...eotron.qc.ca> wrote:
> >
> > Tracing the event "fs_dax:dax_pmd_insert_mapping" with perf produces this
> > warning:
> >       [fs_dax:dax_pmd_insert_mapping] unknown op '~'
> >
> > It is printed in process_op (tools/lib/traceevent/event-parse.c) because '~'
> > is parsed as a binary operator.
> >
> > perf reads the format of fs_dax:dax_pmd_insert_mapping ("print fmt") from
> > /sys/kernel/debug/tracing/events/fs_dax/dax_pmd_insert_mapping/format .
> >
> > The format contains:
> >
> > ~(((u64) ~(~(((1UL) << 12)-1)))
> >          ^
> >          \ interpreted as a binary operator by process_op().
> >
> > This part is generated in the declaration of the event class
> > dax_pmd_insert_mapping_class in include/trace/events/fs_dax.h :
> >
> >                 __print_flags_u64(__entry->pfn_val & PFN_FLAGS_MASK, "|",
> >                         PFN_FLAGS_TRACE),
> >
> > This patch adds a pair of parentheses in the declaration of PFN_FLAGS_MASK to
> > make sure that '~' is parsed as a unary operator by perf.
> >
> > The part of the format that was problematic is now:
> >
> > ~(((u64) (~(~(((1UL) << 12)-1))))
> >
> > Now, all the '~' are parsed as unary operators.
> >
> > Cc: Dan Williams <dan.j.williams@...el.com>
> 
> 
> Acked-by: Dan Williams <dan.j.williams@...el.com>
> 

I grabbed it, and added cc:stable.

But aren't we fixing this in the wrong place?  That's a valid
expression and if this isn't addressed in perf then we may hit a
similar issue elsewhere...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ