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: <YVWrahfHnM95cHy+@zn.tnic>
Date:   Thu, 30 Sep 2021 14:19:54 +0200
From:   Borislav Petkov <bp@...e.de>
To:     unknown <weidonghui@...winnertech.com>
Cc:     akpm@...ux-foundation.org, maz@...terjones.org, will@...nel.org,
        rabin@....in, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] scripts/decodecode: fix faulting instruction no print
 when opps.file is DOS format

On Thu, Sep 30, 2021 at 10:04:39AM +0800, unknown wrote:
> Signed-off-by: Borislav Petkov <bp@...e.de>
> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>

You don't just add Signed-off-by of other people when sending a patch -
please don't *ever* do that.

If you don't know what you're doing, *don't* do it but *read* the damn
docs first:

https://www.kernel.org/doc/html/latest/process/submitting-patches.html

> Cc: Marc Zyngier <maz@...terjones.org>
> Cc: Will Deacon <will@...nel.org>
> Cc: Rabin Vincent <rabin@....in>
> Cc: lkml <linux-kernel@...r.kernel.org>
> Signed-off-by: weidonghui <weidonghui@...winnertech.com>
> ---
>  scripts/decodecode | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/decodecode b/scripts/decodecode
> index 31d884e35f2f..77a3b518aacc 100755
> --- a/scripts/decodecode
> +++ b/scripts/decodecode
> @@ -126,7 +126,7 @@ if [ $marker -ne 0 ]; then
>  fi
>  echo Code starting with the faulting instruction  > $T.aa
>  echo =========================================== >> $T.aa
> -code=`echo $code | sed -e 's/ [<(]/ /;s/[>)] / /;s/ /,0x/g; s/[>)]$//'`
> +code=`echo $code | sed -e 's/\x0d//;s/ [<(]/ /;s/[>)] / /;s/ /,0x/g; s/[>)]$//'`

So that link I pointed you to says:

"That character is matched with \r by sed. Use:

sed -e "s/\r//g" input-file"

I have no clue how you did not see it?!

But I guess \x0d works too.

To quote from the sed info manual:

"5.8 Escape Sequences - specifying special characters
 ====================================================

 ...

'\r'
     Produces or matches a carriage return (ASCII 13).

...

'\xXX'
     Produces or matches a character whose hexadecimal ASCII value is
     XX."

In any case, I'd prefer \r because it is more readable.

Thx.

-- 
Regards/Gruss,
    Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ