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: <CAFCwf10nWdWdHT9m8xbdXDtP0y3FRk5PV09kepG46ZS8F1KvxQ@mail.gmail.com>
Date:   Wed, 30 Jan 2019 00:49:10 +0200
From:   Oded Gabbay <oded.gabbay@...il.com>
To:     gregkh <gregkh@...uxfoundation.org>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        ogabbay@...ana.ai
Subject: Re: [PATCH 01/15] habanalabs: add skeleton driver

On Sun, Jan 27, 2019 at 10:32 AM gregkh <gregkh@...uxfoundation.org> wrote:
>
> On Sat, Jan 26, 2019 at 11:48:02PM +0200, Oded Gabbay wrote:
> > On Sat, Jan 26, 2019 at 11:14 PM Arnd Bergmann <arnd@...db.de> wrote:
> > >
> > > On Sat, Jan 26, 2019 at 5:25 PM Oded Gabbay <oded.gabbay@...il.com> wrote:
> > > >
> > > > On Sat, Jan 26, 2019 at 6:06 PM Arnd Bergmann <arnd@...db.de> wrote:
> > > > >
> > > > > On Wed, Jan 23, 2019 at 1:01 AM Oded Gabbay <oded.gabbay@...il.com> wrote:
> > > > >
> > > > > > diff --git a/drivers/misc/habanalabs/include/habanalabs_device_if.h b/drivers/misc/habanalabs/include/habanalabs_device_if.h
> > > > > > new file mode 100644
> > > > > > index 000000000000..9dbb7077eabd
> > > > > > --- /dev/null
> > > > > > +++ b/drivers/misc/habanalabs/include/habanalabs_device_if.h
> > > > >
> > > > > Since this is a apparently a user space ABI, the file should be in
> > > > > include/uapi/linux/,
> > > > > not in the driver directory.
> > > >
> > > > This is not a user space ABI. This is the ABI between the driver and the F/W.
> > >
> > > Ah, I see. In that case, you should get rid of all the bitfields and make the
> > > struct members all __le32/__le64/... to make it work on big-endian kernels.
> > >
> > I really don't want to start converting bitfields and structures to
> > use __le32/64.
> > As I wrote in one of the previous reviews, we don't support big-endian
> > architecture (what's left after POWER moved to support little endian
> > ?).  We actually do run on POWER9 but with ppc64le architecture
> > In any case, our software stack is so big that this minor change in
> > the driver won't have any impact on the overall ability to run
> > something on our H/W
>
> You don't have to do anything at the moment to "convert" to use a
> specific endian, but you do have to always mark such variables that are
> in a specific endian that this is the format they are expected in.
>
> Then, when you run a tool like sparse, you will be notified if you
> happen to be making any assumptions that might not be correct about
> those variables, and it's trivial to usually fix it up at that time.
>
> hope this helps,
>
> greg k-h

ok, understood, fixed.
Thanks,
Oded

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ