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
| ||
|
Date: Thu, 5 Feb 2015 19:49:14 +0000 From: Al Viro <viro@...IV.linux.org.uk> To: Steven Rostedt <rostedt@...dmis.org> Cc: linux-kernel@...r.kernel.org Subject: [RFC][PATCHES] constifying ftrace globs We don't really need to NUL-terminate the substring we are matching against; all it takes is introducing memmem(3) and using it instead of str[n]str(). It's not that much work - see vfs.git#ftrace_glob. The reason I went there is rather amusing; it all started with making do_execve() take arrays of const strings for argv and envp. After all, we never change them *and* we often enough pass arrays of string literals that way. It exploded into a series of 75 commits, with the final ripple being argv_split() and argv_free(). OK, turns out that ftrace is using those as well, fortunately it's done to get arrays of regexes, so it should be trivial to constify as well, right? Imagine the amount of swearing when I noticed that it *does* modify the resulting strings... This series deals with that problem, providing the missing prereq for the patchbomb from hell... Could you review #ftrace_glob? It's not large - seven commits, boiling down to include/linux/ftrace.h | 8 ++--- include/linux/string.h | 1 + kernel/trace/ftrace.c | 68 ++++++++++++++++++-------------------- kernel/trace/trace.h | 2 +- kernel/trace/trace_events_filter.c | 26 +++++++++------ lib/string.c | 34 ++++++++++++------- 6 files changed, 75 insertions(+), 64 deletions(-) Patches in followups. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists