lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180629203844.GA68178@romley-ivt3.sc.intel.com>
Date:   Fri, 29 Jun 2018 13:38:44 -0700
From:   Fenghua Yu <fenghua.yu@...el.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Fenghua Yu <fenghua.yu@...el.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Ingo Molnar <mingo@...hat.com>, H Peter Anvin <hpa@...or.com>,
        Ashok Raj <ashok.raj@...el.com>,
        Alan Cox <alan@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Rafael Wysocki <rafael.j.wysocki@...el.com>,
        Tony Luck <tony.luck@...el.com>,
        Ravi V Shankar <ravi.v.shankar@...el.com>,
        linux-kernel <linux-kernel@...r.kernel.org>, x86 <x86@...nel.org>
Subject: Re: [PATCH v2 2/4] x86/split_lock: Align x86_capability to unsigned
 long to avoid split locked access

On Fri, Jun 29, 2018 at 10:08:59PM +0200, Thomas Gleixner wrote:
> On Fri, 29 Jun 2018, Fenghua Yu wrote:
> 
> > On Fri, Jun 29, 2018 at 06:35:39PM +0200, Thomas Gleixner wrote:
> > > On Fri, 29 Jun 2018, Dave Hansen wrote:
> > > 
> > > Plus what enforces proper alignment for the other capability related
> > > u32 arrays? 
> > 
> > Do you want me to enforce unsigned long alignment for all that are used by
> > locked BTS/BTR?
> 
> If there are variables which might be unaligned and accessed with locked
> instructions and you have them identified, then why are you asking whether
> they should be fixed?
> 
> Ignoring them because they do not trigger #AC right now, is only the
> correct answer if you are a follower of the 'works by chance' cult.
> 
> Yeah, I know that most of this industry just works by chance....
>

Ok. I can work on fixing alignment for these instructions in next version.

How to handle data that is used in generic code which can be used on
non-Intel platform? For exmple, if I do this change for struct efi in
include/linux/efi.h because set_bit() sets bits in efi.flags:
-       unsigned long flags;
+       unsigned long flags __aligned(unsigned long);
 } efi;

People may argue that the alignment unnecessarily increases size of 'efi'
on non-Intel platform which doesn't have split lock issue. Do we care this
argument?

Another question, there will be a bunch of one-line changes for
the alignment (i.e. adding __aligned(unsigned long)) in various files.
Will the changes be put in one big patch or in separate one-liner patches?

Thanks.

-Fenghua

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ