Advertisement
Guest User

Untitled

a guest
Oct 27th, 2018
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. Subject: Re: [PATCH] pfn_t: force '~' to be parsed as an unary operator
  2. To: Andrew Morton <akpm@linux-foundation.org>,
  3. Dan Williams <dan.j.williams@intel.com>
  4. Cc: Steven Rostedt <rostedt@goodmis.org>, acme@redhat.com,
  5. tz.stoyanov@gmail.com, Namhyung Kim <namhyung@kernel.org>,
  6. zwisler@kernel.org, arangradient@gmail.com,
  7. linux-perf-users@vger.kernel.org,
  8. Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
  9. References: <20181021145939.8760-1-sebhtml@videotron.qc.ca>
  10. <CAPcyv4iJ_bfzOtV_GAQg_tdLLuebE_1Gp420LMG0xbR2ZQdV7g@mail.gmail.com>
  11. <FRrzgp7InaOtKFRs0geay1@videotron.ca>
  12. From: sebhtml <sebhtml@videotron.qc.ca>
  13. Message-ID: <d48b2b1b-201a-d350-6bda-943a66f1abfb@videotron.qc.ca>
  14. Date: Wed, 24 Oct 2018 19:52:40 -0400
  15. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
  16. Thunderbird/60.2.1
  17. MIME-Version: 1.0
  18. In-Reply-To: <FRrzgp7InaOtKFRs0geay1@videotron.ca>
  19. Content-Type: text/plain; charset=utf-8; format=flowed
  20. Content-Language: en-US
  21. Content-Transfer-Encoding: 7bit
  22.  
  23. On 2018-10-24 6:43 p.m., Andrew Morton wrote:
  24. >
  25. > I grabbed it, and added cc:stable.
  26. >
  27. > But aren't we fixing this in the wrong place? That's a valid
  28. > expression and if this isn't addressed in perf then we may hit a
  29. > similar issue elsewhere...
  30. >
  31.  
  32. Right.
  33.  
  34. Based on:
  35. git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 01aa9d518eae8a4d75cd3049defc6ed0b6d0a658
  36.  
  37. In perf, the warning
  38. [fs_dax:dax_pmd_insert_mapping] unknown op '~'
  39. comes from tools/lib/traceevent/event-parse.c at line 2045:
  40. do_warning_event(event, "unknown op '%s'", token);
  41.  
  42. This is in this function:
  43.  
  44. static enum tep_event_type
  45. process_op(struct tep_event_format *event, struct tep_print_arg *arg, char **tok);
  46.  
  47. The code path to reach the good '~' case needs:
  48. if (arg->type == TEP_PRINT_OP && !arg->op.left) {
  49.  
  50. I assume that here arg->op.left is not NULL because of (u64) on the left.
  51.  
  52. ~(((u64) ~(~(((1UL) << 12)-1)))
  53. ^
  54.  
  55. However, I fail to see where '~' is parsed as a binary operator though.
  56.  
  57. Any pointer would be welcome.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement