lkml.org 
[lkml]   [2022]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ubifs: Fix build errors as symbol undefined
----- Ursprüngliche Mail -----
> Von: "Lihua" <hucool.lihua@huawei.com>
> An: "richard" <richard@nod.at>
> CC: "Sascha Hauer" <s.hauer@pengutronix.de>, "linux-mtd" <linux-mtd@lists.infradead.org>, "linux-kernel"
> <linux-kernel@vger.kernel.org>, "Wei Yongjun" <weiyongjun1@huawei.com>, "yusongping" <yusongping@huawei.com>
> Gesendet: Montag, 21. November 2022 02:54:53
> Betreff: Re: [PATCH] ubifs: Fix build errors as symbol undefined

> You can verify it with the config in the attachment. TKS :D

Thanks for your .config, I was able to identify the problem.
When CONFIG_CC_OPTIMIZE_FOR_SIZE is set the compiler does not optimize this construct:

err = ubifs_node_check_hash(c, buf, zbr->hash);
if (err) {
ubifs_bad_hash(c, buf, zbr->hash, lnum, offs);
return 0;
}

With CONFIG_UBIFS_FS_AUTHENTICATION not set, the compiler can assume that
ubifs_node_check_hash() is never true and drops the call to ubifs_bad_hash().
Is CONFIG_CC_OPTIMIZE_FOR_SIZE enabled this optimization does not happen anymore.

So we need a no-op ubifs_bad_hash() for the CONFIG_UBIFS_FS_AUTHENTICATION=n case.

Thanks,
//richard

\
 
 \ /
  Last update: 2022-11-21 09:00    [W:0.054 / U:0.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site