Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1700214
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | James Morse <james.morse@arm.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 0/5] ARM64: disable irq between breakpoint and step exception |
| Date | Mon, 31 Jul 2017 19:20:03 +0200 |
| Message-ID | <u9mwj-Ac-29@gated-at.bofh.it> (permalink) |
| References | <u9gqR-5by-7@gated-at.bofh.it> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252 |
| Content-Transfer-Encoding | 7bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 44 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-arm-kernel@lists.infradead.org, mark.rutland@arm.com, will.deacon@arm.com, huawei.libin@huawei.com, takahiro.akashi@linaro.org, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Arnaldo Carvalho de Melo <acme@kernel.org>, Ingo Molnar <mingo@redhat.com>, linux-kernel@vger.kernel.org, Peter Zijlstra <peterz@infradead.org> |
| X-Original-Date | Mon, 31 Jul 2017 18:15:41 +0100 |
| X-Original-Message-ID | <597F65BD.3070200@arm.com> |
| X-Original-References | <cover.1501496603.git.panand@redhat.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1700214 |
Show key headers only | View raw
Hi Pratyush, On 31/07/17 11:40, Pratyush Anand wrote: > samples/hw_breakpoint/data_breakpoint.c passes with x86_64 but fails with > ARM64. Even though it has been NAKed previously on upstream [1, 2], I have > tried to come up with patches which can resolve it for ARM64 as well. > > I noticed that even perf step exception can go into an infinite loop if CPU > receives an interrupt while executing breakpoint/watchpoint handler. So, > event though we are not concerned about above test, we will have to find a > solution for the perf issue. This caught my eye as I've been reworking the order the DAIF flags get set/cleared[0]. What causes your infinite loop? Is it single-stepping kernel_exit? If so patch 4 "arm64: entry.S mask all exceptions during kernel_exit" [1] may help. If its more like "single stepping something we didn't expect" you will get the same problem if we take an SError. (which with that series is unmasked ~all the time). Either way this looks like a new and exciting way of hitting the 'known issue' described in patch 12 [3]. Would disabling MDSCR_EL1.SS if we took an exception solve your problem? If so, I think we should add a new flag, 'TIF_KSINGLESTEP', causing us to save/restore MDSCR_EL1.SS into pt_regs on el1 exceptions. This would let us single-step without modifying the DAIF flags for the location we are stepping, and allow taking any kind of exception from that location. We should disable nested users of single-step, we can do that by testing the flag, print a warning then pretend we missed the breakpoint. (hence it needs to be separate from the user single-step flag). Thanks, James [0] https://www.spinics.net/lists/arm-kernel/msg596684.html [1] https://www.spinics.net/lists/arm-kernel/msg596686.html [2] https://www.spinics.net/lists/arm-kernel/msg596689.html
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 0/5] ARM64: disable irq between breakpoint and step exception Pratyush Anand <panand@redhat.com> - 2017-07-31 12:50 +0200
[PATCH v3 5/5] arm64: fault: re-enable irq if it was disabled for single stepping Pratyush Anand <panand@redhat.com> - 2017-07-31 12:50 +0200
[PATCH v3 1/5] hw_breakpoint: Add step_needed event attribute Pratyush Anand <panand@redhat.com> - 2017-07-31 12:50 +0200
Re: [PATCH v3 1/5] hw_breakpoint: Add step_needed event attribute Peter Zijlstra <peterz@infradead.org> - 2017-08-01 10:20 +0200
Re: [PATCH v3 0/5] ARM64: disable irq between breakpoint and step exception James Morse <james.morse@arm.com> - 2017-07-31 19:20 +0200
Re: [PATCH v3 0/5] ARM64: disable irq between breakpoint and step exception Pratyush Anand <panand@redhat.com> - 2017-08-01 06:20 +0200
Re: [PATCH v3 0/5] ARM64: disable irq between breakpoint and step exception James Morse <james.morse@arm.com> - 2017-08-02 19:20 +0200
Re: [PATCH v3 0/5] ARM64: disable irq between breakpoint and step exception Pratyush Anand <panand@redhat.com> - 2017-08-02 20:50 +0200
Re: [PATCH v3 0/5] ARM64: disable irq between breakpoint and step exception James Morse <james.morse@arm.com> - 2017-08-03 17:30 +0200
Re: [PATCH v3 0/5] ARM64: disable irq between breakpoint and step exception AKASHI Takahiro <takahiro.akashi@linaro.org> - 2017-08-01 10:20 +0200
Re: [PATCH v3 0/5] ARM64: disable irq between breakpoint and step exception Pratyush Anand <panand@redhat.com> - 2017-08-01 10:40 +0200
csiph-web