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: <24dae8ebfd18a60e844383ae4beed486@sf-tec.de>
Date:   Fri, 12 Oct 2018 16:03:35 +0200
From:   Rolf Eike Beer <eike-kernel@...tec.de>
To:     Firoz Khan <firoz.khan@...aro.org>
Cc:     linux-parisc@...r.kernel.org,
        "James E . J . Bottomley" <jejb@...isc-linux.org>,
        Helge Deller <deller@....de>,
        Thomas Gleixner <tglx@...utronix.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Philippe Ombredanne <pombredanne@...b.com>,
        Kate Stewart <kstewart@...uxfoundation.org>,
        y2038 Mailman List <y2038@...ts.linaro.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux-Arch <linux-arch@...r.kernel.org>,
        Arnd Bergmann <arnd@...db.de>,
        Deepa Dinamani <deepa.kernel@...il.com>,
        Marcin Juszkiewicz <marcin.juszkiewicz@...aro.org>,
        linux-parisc-owner@...r.kernel.org
Subject: Re: [PATCH v4 3/6] parisc: add system call table generation support

Firoz Khan wrote:

>> > +
>> > +    my_abi="$(cut -d'|' -f2 <<< $my_abis)"
> 
> Here is the logic of identifying the generated script is for compat 
> interface
> or not. So systbl_abi_syscall_table_c32 := common,compat,32 in Makefile
> will parse the script and check the second string whether this is
> "compat" or not.
> 
> Other ways are:
> 1. add an extra flag, that will again add the complexity
> 2. check if [ ${out: -5} = "c32.h" ], this looks weird
> 
> Is there any better way to do the same?

What part is that comment directed at? I guess it's the next hunk, so 
I'll comment on that.

>> "<<<" is a bash extension and will not work with /bin/sh.
>> 
>> > +    while read nr abi name entry compat ; do
>> > +     if [ $my_abi = "compat" ]; then
>> > +         if [ -z "$compat" ]; then
>> > +             emit $nxt $nr $entry
>> > +         else
>> > +             emit $nxt $nr $compat
>> > +         fi
>> > +     else
>> > +         emit $nxt $nr $entry
>> > +     fi
>> 
>> I would go for a local variable being set to $compat or $entry and
>> calling emit at only one place. And there should be only one if with 2
>> expressions, no need for 3 branches.

if [ $my_abi = "compat" -a -n "${compat}" ]; then
     somevar=${compat}
else
     somevar=${entry}
fi
emit $nxt $nr $somevar

Eike

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ