linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@amacapital.net>
To: Ruslan Kabatsayev <b7.10110111@gmail.com>
Cc: Andy Lutomirski <luto@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Is it really correct to check for breakpoint in kernel space against ptracer's address space?
Date: Tue, 10 May 2016 09:10:19 -0700	[thread overview]
Message-ID: <CALCETrVC26_hQjKFCfum2jBkxScyCun6PQc=UGmVwavR7jOaFg@mail.gmail.com> (raw)
In-Reply-To: <CAHEcG96=S6Eqn1sXapdupuUVwggitZ1O3RSuH=oOMCNcVnCK6w@mail.gmail.com>

On Tue, May 10, 2016 at 8:40 AM, Ruslan Kabatsayev
<b7.10110111@gmail.com> wrote:
> On Tue, May 10, 2016 at 6:23 PM, Andy Lutomirski <luto@amacapital.net> wrote:
>> Anyway, what kernel are you on?  I think I fixed your specific issue in:
>>
>> commit 27747f8bc355a2808ca9e490ab6866acd85b4c16
>> Author: Andy Lutomirski <luto@kernel.org>
>> Date:   Thu Jul 30 20:32:42 2015 -0700
>>
>>     perf/x86/hw_breakpoints: Fix check for kernel-space breakpoints
>>
>> If that does fix it and it's a problem for you on older kernels, you
>> could ask for a backport.
>
> Indeed, I was using a 3.12 kernel. This should indeed fix it, thanks.
>
> BTW, in that commit, why isn't va>=TASK_SIZE_MAX redundant with the
> second operand of ||? If va is aligned to a multiple of len (so
> va+len-1 doesn't overflow), then in what cases would the first
> condition be true with the second being false?

An excellent question :)

I think that, when I wrote that, I wasn't 100% convinced that len
couldn't be zero.

--Andy

-- 
Andy Lutomirski
AMA Capital Management, LLC

      reply	other threads:[~2016-05-10 16:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-09  8:43 Is it really correct to check for breakpoint in kernel space against ptracer's address space? Ruslan Kabatsayev
2016-05-10  3:33 ` Andy Lutomirski
2016-05-10 11:50   ` Ruslan Kabatsayev
2016-05-10 15:23     ` Andy Lutomirski
2016-05-10 15:40       ` Ruslan Kabatsayev
2016-05-10 16:10         ` Andy Lutomirski [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='CALCETrVC26_hQjKFCfum2jBkxScyCun6PQc=UGmVwavR7jOaFg@mail.gmail.com' \
    --to=luto@amacapital.net \
    --cc=b7.10110111@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).