proc_coredump_filter_write() goes as follows: """ ret = -ESRCH; <find task - goto out if fails> <set bits> out_no_task: if (ret < 0) return ret; return count; """ So, even if successful, the default value of -ESRCH is used. The simplest fix is probably: --- fs/proc/base.c.orig 2015-11-05 11:41:18.094788845 -0700 +++ fs/proc/base.c 2015-11-05 11:41:51.212157299 -0700 @@ -2488,6 +2488,7 @@ if (!mm) goto out_no_mm; + ret = 0; for (i = 0, mask = 1; i < MMF_DUMP_FILTER_BITS; i++, mask <<= 1) { if (val & mask) set_bit(i + MMF_DUMP_FILTER_SHIFT, &mm->flags); Sorry, I don't have a git checkout at work so I can't tell you when this regression occurred. However, based on the behaviour of my system, I suspect that it's new to 4.3 - I was running 4.2.5 previously without issue.
Looks like this was broken by 774636e19ed514cdf560006813c0473409616de8, "proc: convert to kstrto*()/kstrto*_from_user()", which went in Sep 9ish.
Created attachment 192251 [details] Patch for fs/proc/base.c
Better patch has been attached.
Created attachment 192271 [details] Patch for fs/proc/base.c Fixed tabs vs. spaces.
You're correct, it's a regression.
Thanks for the confirmation. Is this something that you'd like to fix, or should I submit the patch? I've never done that before, so I'd have to learn how. :P
Looks like this was fixed in 4.4 by 41a0c249cb8706a2efa1ab3d59466b23a27d0c8b.