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: <YQD45STjL160RnzR@kroah.com>
Date:   Wed, 28 Jul 2021 08:27:49 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Wan Jiabing <wanjiabing@...o.com>,
        Kees Cook <keescook@...omium.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-hardening@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] scripts: make some scripts executable

On Wed, Jul 28, 2021 at 10:03:56AM +0900, Masahiro Yamada wrote:
> On Wed, Jul 28, 2021 at 12:56 AM Greg KH <gregkh@...uxfoundation.org> wrote:
> >
> > On Wed, Jul 28, 2021 at 12:39:24AM +0900, Masahiro Yamada wrote:
> > > Set the x bit to some scripts to make them directly executable.
> > >
> > > Especially, scripts/checkdeclares.pl is not hooked by anyone.
> > > It should be executable since it is tedious to type
> > > 'perl scripts/checkdeclares.pl'.
> > >
> > > The original patch [1] set the x bit properly, but it was lost when
> > > it was merged as commit 21917bded72c ("scripts: a new script for
> > > checking duplicate struct declaration").
> > >
> > > [1] https://lore.kernel.org/lkml/20210401110943.1010796-1-wanjiabing@vivo.com/
> > >
> > > Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
> > > ---
> > >
> > >  scripts/checkdeclares.pl               | 0
> > >  scripts/gcc-plugins/gen-random-seed.sh | 0
> > >  scripts/syscallnr.sh                   | 0
> > >  scripts/xen-hypercalls.sh              | 0
> > >  4 files changed, 0 insertions(+), 0 deletions(-)
> > >  mode change 100644 => 100755 scripts/checkdeclares.pl
> > >  mode change 100644 => 100755 scripts/gcc-plugins/gen-random-seed.sh
> > >  mode change 100644 => 100755 scripts/syscallnr.sh
> > >  mode change 100644 => 100755 scripts/xen-hypercalls.sh
> >
> > Please no, as other tools (i.e. patch), can not set mode bits, and some
> > people still rely on patch in places.
> >
> > If these need to be called by other parts of the build, we should
> > execute them properly, not rely on the mode settings.
> >
> > thanks,
> >
> > greg k-h
> 
> 
> I believe tools should be executable.
> 
> If the x bit were missing in scripts/checkpatch.pl
> for example, we would need to run 'perl scripts/checkpatch.pl'
> instead of 'scripts/checkpatch.pl'. That is annoying.
> 
> 
> Most of the scripts under the scripts/ directory
> are already executable, and we rely on that fact.
> Some of them are run directly, and I do not hear
> from anyone who complains about that.

Ok, fair enough, I just run into problems when dealing with this with
backports to stable trees, and I know Andrew has also had problems when
dealing with patches like this.

> BTW, my 'patch' command on Ubuntu can handle the
> x bit.  Doesn't it work on your 'patch' ?

Somehow quilt can not handle it, I do not know if that is a problem with
patch not knowing how to read the git-generated-patch or not, but we
have had issues in the past here.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ