Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1289835

Re: [PATCH v2 1/1] Fix int1 recursion when no perf_bp_event is registeredy

From Jeff Merkey <linux.mdb@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/1] Fix int1 recursion when no perf_bp_event is registeredy
Date 2015-12-11 20:10 +0100
Message-ID <qEBeN-7o-13@gated-at.bofh.it> (permalink)
References <qE3G9-2Ub-5@gated-at.bofh.it> <qEeBz-1xO-5@gated-at.bofh.it> <qEeLg-1Qp-3@gated-at.bofh.it> <qEgtI-2KO-23@gated-at.bofh.it> <qEqW6-1rK-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


One thing I noticed in this section of code:

	/* Handle all the breakpoints that were triggered */
	for (i = 0; i < HBP_NUM; ++i) {
		if (likely(!(dr6 & (DR_TRAP0 << i))))
			continue;

                ... snip ...

		if (bp->hw.info.type == X86_BREAKPOINT_EXECUTE)
			args->regs->flags |= X86_EFLAGS_RF;

		rcu_read_unlock();
	}

Whoever wrote this loop did not seem to understand have observed the
code path in action on intel hardware.  There is NEVER a case I have
seen when the hardware sends multiple breakpoint statuses through dr6,
they are sent one at a time.  So the rolling check through all the
status bits is pointless since only one breakpoint will be reported by
the hardware at a time.  This is not to say that someone in the future
might may change it, but these interrupts are delivered one by one in
order and if there are duplicates (like a read/write breakpoint set at
the same address as an execute breakpoint.

Does anyone know why it was coded this way because its flat wrong.

Jeff
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/1] Fix int1 recursion when no perf_bp_event is registered Jeff Merkey <linux.mdb@gmail.com> - 2015-12-10 08:20 +0100
  Re: [PATCH 1/1] Fix int1 recursion when no perf_bp_event is  registered Thomas Gleixner <tglx@linutronix.de> - 2015-12-10 20:00 +0100
    Re: [PATCH 1/1] Fix int1 recursion when no perf_bp_event is registered Andy Lutomirski <luto@amacapital.net> - 2015-12-10 20:10 +0100
      Re: [PATCH 1/1] Fix int1 recursion when no perf_bp_event is  registered Jiri Olsa <jolsa@redhat.com> - 2015-12-10 20:30 +0100
        Re: [PATCH 1/1] Fix int1 recursion when no perf_bp_event is  registered Borislav Petkov <bp@alien8.de> - 2015-12-10 20:30 +0100
      Re: [PATCH 1/1] Fix int1 recursion when no perf_bp_event is  registeredy Thomas Gleixner <tglx@linutronix.de> - 2015-12-10 22:00 +0100
        Re: [PATCH 1/1] Fix int1 recursion when no perf_bp_event is registeredy Andy Lutomirski <luto@amacapital.net> - 2015-12-10 22:10 +0100
          Re: [PATCH 1/1] Fix int1 recursion when no perf_bp_event is  registeredy Thomas Gleixner <tglx@linutronix.de> - 2015-12-10 22:20 +0100
            Re: [PATCH 1/1] Fix int1 recursion when no perf_bp_event is registeredy Jeff Merkey <linux.mdb@gmail.com> - 2015-12-10 22:30 +0100
          Re: [PATCH 1/1] Fix int1 recursion when no perf_bp_event is registeredy Jeff Merkey <linux.mdb@gmail.com> - 2015-12-10 22:20 +0100
            Re: [PATCH 1/1] Fix int1 recursion when no perf_bp_event is  registeredy Ingo Molnar <mingo@kernel.org> - 2015-12-14 09:10 +0100
              Re: [PATCH 1/1] Fix int1 recursion when no perf_bp_event is registeredy Jeff Merkey <linux.mdb@gmail.com> - 2015-12-14 09:20 +0100
                Re: [PATCH 1/1] Fix int1 recursion when no perf_bp_event is registeredy Jeff Merkey <linux.mdb@gmail.com> - 2015-12-14 09:30 +0100
                Re: [PATCH 1/1] Fix int1 recursion when no perf_bp_event is  registeredy Ingo Molnar <mingo@kernel.org> - 2015-12-14 10:30 +0100
                Re: [PATCH 1/1] Fix int1 recursion when no perf_bp_event is registeredy Jeff Merkey <linux.mdb@gmail.com> - 2015-12-14 19:00 +0100
                Re: [PATCH 1/1] Fix int1 recursion when no perf_bp_event is registeredy Andy Lutomirski <luto@amacapital.net> - 2015-12-14 19:00 +0100
                Re: [PATCH 1/1] Fix int1 recursion when no perf_bp_event is registeredy Jeff Merkey <linux.mdb@gmail.com> - 2015-12-14 19:20 +0100
                Re: [PATCH 1/1] Fix int1 recursion when no perf_bp_event is registeredy Jeff Merkey <linux.mdb@gmail.com> - 2015-12-14 19:20 +0100
        Re: [PATCH 1/1] Fix int1 recursion when no perf_bp_event is registeredy Jeff Merkey <linux.mdb@gmail.com> - 2015-12-10 22:20 +0100
        Re: [PATCH 1/1] Fix int1 recursion when no perf_bp_event is registeredy Jeff Merkey <linux.mdb@gmail.com> - 2015-12-10 23:30 +0100
        Re: [PATCH v2 1/1] Fix int1 recursion when no perf_bp_event is registeredy Jeff Merkey <linux.mdb@gmail.com> - 2015-12-11 09:10 +0100
          Re: [PATCH v2 1/1] Fix int1 recursion when no perf_bp_event is registeredy Jeff Merkey <linux.mdb@gmail.com> - 2015-12-11 20:10 +0100
          Re: [PATCH v2 1/1] Fix int1 recursion when no perf_bp_event is registeredy Jeff Merkey <linux.mdb@gmail.com> - 2015-12-14 00:20 +0100

csiph-web