lib/vdso: use "grep -E" instead of "egrep"
[platform/kernel/linux-starfive.git] / lib / string.c
index 6f33442..3371d26 100644 (file)
@@ -197,6 +197,14 @@ ssize_t strscpy(char *dest, const char *src, size_t count)
                max = 0;
 #endif
 
+       /*
+        * read_word_at_a_time() below may read uninitialized bytes after the
+        * trailing zero and use them in comparisons. Disable this optimization
+        * under KMSAN to prevent false positive reports.
+        */
+       if (IS_ENABLED(CONFIG_KMSAN))
+               max = 0;
+
        while (max >= sizeof(unsigned long)) {
                unsigned long c, data;