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]
Date:   Thu, 3 Sep 2020 21:32:30 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Iouri Tarassov <iourit@...ux.microsoft.com>
Cc:     Sasha Levin <sashal@...nel.org>, kys@...rosoft.com,
        haiyangz@...rosoft.com, sthemmin@...rosoft.com, wei.liu@...nel.org,
        iourit@...rosoft.com, linux-kernel@...r.kernel.org,
        linux-hyperv@...r.kernel.org, spronovo@...rosoft.com
Subject: Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

On Thu, Sep 03, 2020 at 11:55:16AM -0700, Iouri Tarassov wrote:
> Hi Greg,
> 
> I appreciate your comments and working to address them.
> 
> On 8/27/2020 11:12 PM, Greg KH wrote:
> > As for "matching names", why does that matter?  Who sees both names at
> > the same time?
> > 
> > > > > > endian issues?
> > > > > > If not, why are these bit fields?
> > > This matches the definition on the Windows side. Windows only works on
> > > little endian platforms.
> > 
> > But Linux works on both, so you need to properly document/handle this somehow.
> This driver works only in a Linux container in conjunction with the Windows
> host. The structure definitions areĀ  the same on the host and the container.
> The driver will not be enabled or work on platforms, where Windows does not
> run.

That's fine, you can create your structures in a way that works no
matter what endian is in use, in very simple ways.  Don't rely on
bit fields like this in a structure to actually work the way you think
they work (hint, compilers hate them and do horrible things with them
usually...)

So do it that way please, especially for when you are passing things
across the user/kernel boundry.  It's much simpler and easier to do it
right now, than to have to fix it up later.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ