From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
To: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>,
peterz@infradead.org, mingo@redhat.com, acme@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org,
Pu Hou <bjhoupu@linux.vnet.ibm.com>,
Thomas-Mich Richter <tmricht@linux.vnet.ibm.com>
Subject: Re: [PATCH] kernel/perf: correct return code of rb_alloc_aux() if !has_aux(ev)
Date: Tue, 20 Jun 2017 15:26:03 +0300 [thread overview]
Message-ID: <877f06zvz8.fsf@ashishki-desk.ger.corp.intel.com> (raw)
In-Reply-To: <1497954399-6355-1-git-send-email-brueckner@linux.vnet.ibm.com>
Hendrik Brueckner <brueckner@linux.vnet.ibm.com> writes:
> If the event for which an AUX area is about to be allocated, does
> not support setting up an AUX area, rb_alloc_aux() return -ENOTSUPP.
>
> This error condition is being returned unfiltered to the user space,
> and, for example, the perf tools fails with:
>
> failed to mmap with 524 (INTERNAL ERROR: strerror_r(524, 0x3fff497a1c8, 512)=22)
>
> This error can be easily seen with "perf record -m 128,256 -e cpu-clock".
>
> The 524 error code maps to -ENOTSUPP (in rb_alloc_aux()). The -ENOTSUPP
> error code shall be only used within the kernel. So the correct error
> code would then be -EOPNOTSUPP.
>
> With this commit, the perf tool then reports:
>
> failed to mmap with 95 (Operation not supported)
>
> which is more clear.
Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Curious as to why does the tool allow this.
Regards,
--
Alex
prev parent reply other threads:[~2017-06-20 12:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-20 10:26 [PATCH] kernel/perf: correct return code of rb_alloc_aux() if !has_aux(ev) Hendrik Brueckner
2017-06-20 12:26 ` Alexander Shishkin [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=877f06zvz8.fsf@ashishki-desk.ger.corp.intel.com \
--to=alexander.shishkin@linux.intel.com \
--cc=acme@kernel.org \
--cc=bjhoupu@linux.vnet.ibm.com \
--cc=brueckner@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tmricht@linux.vnet.ibm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox