All of lore.kernel.org
 help / color / mirror / Atom feed
From: sebhtml <sebhtml@videotron.qc.ca>
To: Andrew Morton <akpm@linux-foundation.org>,
	Dan Williams <dan.j.williams@intel.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	acme@redhat.com, tz.stoyanov@gmail.com,
	Namhyung Kim <namhyung@kernel.org>,
	zwisler@kernel.org, arangradient@gmail.com,
	linux-perf-users@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] pfn_t: force '~' to be parsed as an unary operator
Date: Wed, 24 Oct 2018 19:52:40 -0400	[thread overview]
Message-ID: <d48b2b1b-201a-d350-6bda-943a66f1abfb@videotron.qc.ca> (raw)
In-Reply-To: <FRrzgp7InaOtKFRs0geay1@videotron.ca>

On 2018-10-24 6:43 p.m., Andrew Morton wrote:
> 
> 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...
> 

Right.

Based on:
     git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 01aa9d518eae8a4d75cd3049defc6ed0b6d0a658

In perf, the warning
       [fs_dax:dax_pmd_insert_mapping] unknown op '~'
comes from tools/lib/traceevent/event-parse.c at line 2045:
                 do_warning_event(event, "unknown op '%s'", token);

This is in this function:

static enum tep_event_type
process_op(struct tep_event_format *event, struct tep_print_arg *arg, char **tok);

The code path to reach the good '~' case needs:
         if (arg->type == TEP_PRINT_OP && !arg->op.left) {

I assume that here arg->op.left is not NULL because of (u64) on the left.

~(((u64) ~(~(((1UL) << 12)-1)))
          ^

However, I fail to see where '~' is parsed as a binary operator though.

Any pointer would be welcome.

      parent reply	other threads:[~2018-10-25  0:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-21 14:59 [PATCH] pfn_t: force '~' to be parsed as an unary operator Sebastien Boisvert
2018-10-21 14:59 ` Sebastien Boisvert
2018-10-22 17:13 ` Dan Williams
2018-10-24 22:43   ` Andrew Morton
     [not found]   ` <FRrzgp7InaOtKFRs0geay1@videotron.ca>
2018-10-24 23:52     ` sebhtml [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d48b2b1b-201a-d350-6bda-943a66f1abfb@videotron.qc.ca \
    --to=sebhtml@videotron.qc.ca \
    --cc=acme@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=arangradient@gmail.com \
    --cc=dan.j.williams@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tz.stoyanov@gmail.com \
    --cc=zwisler@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.