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] [day] [month] [year] [list]
Message-ID: <20190306125611.7xt3l2esk563zrlr@paasikivi.fi.intel.com>
Date:   Wed, 6 Mar 2019 14:56:12 +0200
From:   Sakari Ailus <sakari.ailus@...ux.intel.com>
To:     Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc:     Michael Forney <forney@...gle.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Jonathan Corbet <corbet@....net>
Subject: Re: [RESEND PATCH 1/1] headers_install.sh: Support __aligned(x) for
 uAPI headers

On Wed, Feb 27, 2019 at 10:14:56PM +0900, Masahiro Yamada wrote:
> On Fri, Feb 22, 2019 at 8:37 PM Sakari Ailus
> <sakari.ailus@...ux.intel.com> wrote:
> >
> > Hi Yamada-san,
> >
> > On Fri, Feb 22, 2019 at 01:36:03PM +0900, Masahiro Yamada wrote:
> > > On Thu, Feb 21, 2019 at 10:29 PM Sakari Ailus
> > > <sakari.ailus@...ux.intel.com> wrote:
> > > >
> > > > The headers-install.sh already supports __packed conversion to
> > > > __attribute__((packed)) for uAPI headers but it does not support similar
> > > > __aligned(x) conversion.
> > > >
> > > > Add support for __aligned(x).
> > >
> > >
> > > I am not a big fan of sed scripting in headers_install.sh
> > >
> > > Is it a problem to write __attribute__((aligned(x)) in UAPI headers?
> >
> > Not really as such. __packed is supported in uAPI headers so I thought
> > __aligned should probably be as well. One factor here would seem to be that
> > __packed is way more common than __aligned is.
> >
> > FWIW, a corresponding change has been done to scripts/kernel-doc; see
> > commit 3d9bfb19bd705f503ac7afc2776d5d56dab88858 so kerneldoc does correctly
> > handle that now.
> 
> I am fine with using __aligned(x) shorthand for kernel-space code.
> 
> For UAPI headers, we get it back to __attribute__(aligned(x)) anyway,
> and I'd like to minimize the complex text processing.
> 
> 
> Since __aligned(x) takes an argument,
> this is not feasible to process it by sed.
> 
> 
> For example, please see
> include/uapi/linux/netfilter_bridge/ebtables.h
> 
> 
> 
> If
> 
> __attribute__ ((aligned (__alignof__(struct ebt_replace))));
> 
> is converted into
> 
> __aligned(__alignof__(struct ebt_replace))
> 
> 
> it would be difficult to revert it by sed

Fair enough. Sed doesn't really bend for that too well indeed. I can submit
a patch to remove the similar conversion from the kernel-doc as well based
on this discussion.

-- 
Sakari Ailus
sakari.ailus@...ux.intel.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ