[PATCH RFC 9/9] HACK: disable strchr call in overlay-fs

Heiko Stuebner heiko at sntech.de
Fri Nov 4 15:51:53 PDT 2022


Although the standard strchr function does _not_
use strlen at all, the compiled result with the str*-alternatives
somehow wants to link against a then-nonexistent strlen symbol.

All real strlen invocations everywhere else will use the
correct functions though.

Need to investigate what happens here.

Signed-off-by: Heiko Stuebner <heiko at sntech.de>
---
 fs/overlayfs/super.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index a29a8afe9b26..9e36d0bd7f02 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -1833,7 +1833,8 @@ static struct ovl_entry *ovl_get_lowerstack(struct super_block *sb,
 		if (err)
 			goto out_err;
 
-		lower = strchr(lower, '\0') + 1;
+//FIXME: this somehow then wants to access a non-existent _strlen_ symbol
+//		lower = strchr(lower, '\0') + 1;
 	}
 
 	err = -EINVAL;
-- 
2.35.1




More information about the linux-riscv mailing list