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: <761399f0-0b10-716c-1e80-cfb19c06e455@infradead.org>
Date:   Thu, 26 Jul 2018 12:29:10 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Finn Thain <fthain@...egraphics.com.au>
Cc:     Andreas Schwab <schwab@...ux-m68k.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        linux-m68k@...ts.linux-m68k.org
Subject: Re: m68k allmodconfig build errors

On 07/23/2018 09:49 PM, Finn Thain wrote:
> On Mon, 23 Jul 2018, Randy Dunlap wrote:
> 
>> On 07/20/2018 12:20 AM, Andreas Schwab wrote:
>>> On Jul 19 2018, Randy Dunlap <rdunlap@...radead.org> wrote:
>>>
>>>> block/partitions/ldm.o: In function `ldm_partition':
>>>> ldm.c:(.text+0x1900): undefined reference to `strcmp'
>>>> ldm.c:(.text+0x1964): undefined reference to `strcmp'
>>>> drivers/rtc/rtc-proc.o: In function `is_rtc_hctosys':
>>>> rtc-proc.c:(.text+0x290): undefined reference to `strcmp'
>>>> drivers/watchdog/watchdog_pretimeout.o: In function `watchdog_register_governor':
>>>> (.text+0x142): undefined reference to `strcmp'
>>>
>>> GCC has optimized strncmp to strcmp, but at a stage where macros are no
>>> longer available.  I think the right fix is to use strcmp directly,
>>> since strncmp doesn't make sense here.
>>
>> Hi Andreas,
>>
>> I don't see that all of these string compare fields are null-terminated.
>>
> 
> Some of the strncmp calls in ldm.c are null-terminated, some are not. 
> 
> That would imply that the compiler will emit both strcmp and strncmp 
> calls.
> 
> A strncmp call isn't a problem, because m68k doesn't define 
> __HAVE_ARCH_STRNCMP and so the one from lib/string.c gets built.
> 
>> How does one convert strncmp() users to strcmp()?
>>
>> thanks,
>>
> 
> The untested patch below may work. It seems that it may be relevant to 
> both arc and m68k:


I got back to looking at the build errors.  I agree with Andreas that
all of the fields in question are null-terminated, so Finn's patch looks
good to me.


-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ