Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1710688
| From | Byungchul Park <byungchul.park@lge.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v8 06/14] lockdep: Detect and handle hist_lock ring buffer overwrite |
| Date | 2017-08-14 09:30 +0200 |
| Message-ID | <uehZ1-1bj-29@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <uddb3-14n-7@gated-at.bofh.it> <uddXs-1kf-5@gated-at.bofh.it> <udeJQ-1PM-17@gated-at.bofh.it> <udhRn-3Vr-1@gated-at.bofh.it> <uehFE-14m-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Aug 14, 2017 at 03:05:22PM +0800, Boqun Feng wrote:
> > I like Boqun's approach most but, _whatever_. It's ok if it solves the problem.
> > The last one is not bad when it is used for syscall exit, but we have to give
> > up valid dependencies unnecessarily in other cases. And I think Peterz's
> > approach should be modified a bit to make it work neatly, like:
> >
> > crossrelease_hist_end(...)
> > {
> > ...
> > invalidate_xhlock(&xhlock(cur->xhlock_idx_max));
> >
> > for (c = 0; c < XHLOCK_CXT_NR; c++)
> > if ((cur->xhlock_idx_max - cur->xhlock_idx_hist[c]) >=
> > MAX_XHLOCKS_NR)
> > invalidate_xhlock(&xhlock(cur->xhlock_idx_hist[c]));
> > ...
> > }
> >
>
> Haven't looked into this deeply, but my gut feeling is this is
> unnecessary, will have a deep look.
Of course, for now, it looks like we can rely on the check_same_context()
on the commit, without invalidating it. But I think the approach might be
dangerous in future. I think it would be better to do it explicitlly.
>
> Regards,
> Boqun
>
> > And then Peterz's approach can also work, I think.
> >
> > ---
> > Thanks,
> > Byungchul
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v8 06/14] lockdep: Detect and handle hist_lock ring buffer overwrite Boqun Feng <boqun.feng@gmail.com> - 2017-08-14 09:10 +0200 Re: [PATCH v8 06/14] lockdep: Detect and handle hist_lock ring buffer overwrite Byungchul Park <byungchul.park@lge.com> - 2017-08-14 09:30 +0200 Re: [PATCH v8 06/14] lockdep: Detect and handle hist_lock ring buffer overwrite Byungchul Park <byungchul.park@lge.com> - 2017-08-14 09:40 +0200
csiph-web