lkml.org 
[lkml]   [2019]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRE: [PATCH v8 13/15] x86/split_lock: Enable split lock detection by default
On Thu, 25 Apr 2019, David Laight wrote:
> From: Thomas Gleixne]
> > Sent: 25 April 2019 11:59
> > On Thu, 25 Apr 2019, David Laight wrote:
> >
> > > From: Fenghua Yu
> > > > Sent: 24 April 2019 20:33
> > > > A split locked access locks bus and degrades overall memory access
> > > > performance. When split lock detection feature is enumerated, enable
> > > > the feature by default by writing 1 to bit 29 in MSR TEST_CTL to find
> > > > any split lock issue.
> > >
> > > You can't enable this by default until ALL the known potentially
> > > misaligned locked memory operations have been fixed.
> >
> > Errm? The result will be a WARN_ON() printed and no further damage.
>
> ISTR something about sending SIGSEGV to userspace.

Nope. If the #AC originates from kernel then a warning is printed and the
detection is disabled.

Userspace is a different story. We cannot audit all user space upfront,
right?

> > It's not making anything worse than it is now. In fact we just should add a
> >
> > WARN_ON_ONCE(!aligned_to_long(p)) to all the xxx_bit() operations.
> >
> > so we catch them even when they do not trigger that #AC thingy.
>
> That will explode the kernel code size.

So what? We have enough debug options which make the kernel big. One more
does not really matter.

Thanks,

tglx

\
 
 \ /
  Last update: 2019-04-25 15:05    [W:1.416 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site