Re: Kernel warns of executable stack

2020-04-29 Thread Chris Packham
On 30/04/20 4:23 pm, Markus Gothe wrote: > Basically yes, however if you build gcc yourself or via buildroot you can > change the default behaviour to emit that to GNU ld by default. Which should > be the preferred way but alas it might break some applications like a JIT > (e.g. luajit), luckil

Re: Kernel warns of executable stack

2020-04-29 Thread Markus Gothe
Basically yes, however if you build gcc yourself or via buildroot you can change the default behaviour to emit that to GNU ld by default. Which should be the preferred way but alas it might break some applications like a JIT (e.g. luajit), luckily there is '-z execstack' for those cases. There

Re: Kernel warns of executable stack

2020-04-29 Thread Chris Packham
So just to summarize (i.e. this is what I'm about to include as the commit message that sets the flags in our build system). Prior to https://lore.kernel.org/lkml/20141004030438.28569.85536.stgit@linux-yegoshin/ floating point emulation for Linux MIPS required the stack to be executable. Moder

Re: Kernel warns of executable stack

2020-04-29 Thread Markus Gothe
Depends if you use LDFLAGS or CFLAGS actually; -Wl,-z,noexecstack is the full syntax for the latter which I thought you were referring too. //M Sent from my BlackBerry - the most secure mobile device   Original Message   From: chris.pack...@alliedtelesis.co.nz Sent: April 30, 202

Re: Kernel warns of executable stack

2020-04-29 Thread Chris Packham
Just to aid future mailing list searchers The correct setting is "-z noexecstack" putting it in my targets default CFLAGS seems to have done the trick. I haven't seen any adverse effect of this (yet). https://gcc.gnu.org/onlinedocs/gcc-8.3.0/gcc/Link-Options.html#index-z On 30/04/20 12:11 pm,

Re: Kernel warns of executable stack

2020-04-29 Thread Markus Gothe
You need to rebuild the toolchain's libc as well. For hardening I also suggest fixing RELRO and BIND_NOW. //M Sent from my BlackBerry - the most secure mobile device   Original Message   From: chris.pack...@alliedtelesis.co.nz Sent: April 30, 2020 02:00 To: nietzs...@lysator.liu.

Re: Kernel warns of executable stack

2020-04-29 Thread Chris Packham
On 24/04/20 10:54 am, Markus Gothe wrote: > It's not required per se for an application. > > But you would need to relink your binaries with '-z,noexecstack' to turn > it off. > > //M So I've been trying to set CONFIG_EXTRA_LDFLAGS="-z,noexecstack" in my .config but it doesn't seem to make it thr

Re: [PATCH] grep: add proper support for pattern_list

2020-04-29 Thread Denys Vlasenko
Applied, thanks! On Mon, Mar 30, 2020 at 11:09 AM Sören Tempel wrote: > > From: Sören Tempel > > From POSIX.1-2008: > > The pattern_list's value shall consist of one or more patterns > separated by characters; > > As such, given patterns need to be split at newline characters. W

Fix 12491: crontab -e discards change with EDITOR=vim

2020-04-29 Thread Gray Wolf
Hello, I'm sending this patch once more after more then 3 months, seems like the previous one was overlooked. Would appreciate any feedback so I can make necessary changes to get this merged. I think the bug is very unpleasant surprise and would be nice to have it fixed. Have a nice day, W.

[PATCH] crontab: Fix -e with editors saving using renaming strategy

2020-04-29 Thread Gray Wolf
Some editors (like vim) use renaming strategy to save file. That means they save a file to some random name and then rename it to final location. The advantage is that such save is atomic. However, crontab -e holds open fd to the temporary file, meaning it never sees the changes. The temporary fil

Re: [PATCH v2] grep: Fix -f FILE when FILE is empty and -x provided

2020-04-29 Thread Denys Vlasenko
Applied, thanks On Wed, Apr 29, 2020 at 3:49 PM Gray Wolf wrote: > > Grep currently special-cased empty pattern file to be the same as > pattern file with one empty line (empty pattern). That does mirror how > GNU grep behaves, except when -x is provided. In that case .* pattern > needs to be use

Re: [PATCH] xargs: restore correct behaviour of -n option

2020-04-29 Thread Denys Vlasenko
Applied, thanks! On Wed, Feb 19, 2020 at 12:02 PM Ron Yorston wrote: > > Since commit 1ff7002b1 (xargs: fix handling of quoted arguments, closes > 11441) the -n option hasn't worked properly: > >$ echo 1 2 3 | xargs -n 1 echo >1 >2 > >3 > >$ > > Because state is now remembered

[PATCH v2] grep: Fix -f FILE when FILE is empty and -x provided

2020-04-29 Thread Gray Wolf
Grep currently special-cased empty pattern file to be the same as pattern file with one empty line (empty pattern). That does mirror how GNU grep behaves, except when -x is provided. In that case .* pattern needs to be used instead. --- Change configured git name to pass the check. findutils/grep

Re: [PATCH] build system: remove KBUILD_STR()

2020-04-29 Thread Denys Vlasenko
Applied, thanks! On Thu, Mar 12, 2020 at 5:20 PM Jean-Philippe Brucker wrote: > > When using GNU Make >=4.3, the KBUILD_STR() definition interferes badly > with dependency checks during build, and forces a complete rebuild every > time Make runs. > > In if_changed_rule, Kconfig checks if the comm

Re: [PATCH] grep: Fix -f FILE when FILE is empty and -x provided

2020-04-29 Thread Denys Vlasenko
Thank you. There is a git config problem, though. "Author name is not set properly (needs to be first and last name, and it is 'Wolf' instead)" Please choose a name which can pass our git configuration. Sorry. On Mon, Apr 27, 2020 at 2:21 PM Wolf wrote: > > Grep currently special-cased empty pa

Re: [PATCH] unzip: -d should create the dir

2020-04-29 Thread Denys Vlasenko
Applied, thanks! On Wed, Apr 15, 2020 at 2:01 PM Lauri Kasanen wrote: > > The official Info-Zip unzip creates the dir if it doesn't exist. > > Signed-off-by: Lauri Kasanen > --- > archival/unzip.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/archival/unzip.c b/arc