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: Fri, 31 Jan 2014 13:24:21 +0100 From: Pavel Machek <pavel@....cz> To: David Rientjes <rientjes@...gle.com> Cc: Sebastian Capella <sebastian.capella@...aro.org>, linux-kernel@...r.kernel.org, linux-mm@...ck.org, linux-pm@...r.kernel.org, linaro-kernel@...ts.linaro.org, patches@...aro.org, Andrew Morton <akpm@...ux-foundation.org>, Michel Lespinasse <walken@...gle.com>, Shaohua Li <shli@...nel.org>, Jerome Marchand <jmarchan@...hat.com>, Mikulas Patocka <mpatocka@...hat.com>, Joonsoo Kim <iamjoonsoo.kim@....com>, "Rafael J. Wysocki" <rjw@...ysocki.net> Subject: Re: [PATCH v4 1/2] mm: add kstrimdup function Hi! On Fri 2014-01-31 02:46:08, David Rientjes wrote: > On Fri, 31 Jan 2014, Pavel Machek wrote: > > > > kstrimdup will duplicate and trim spaces from the passed in > > > null terminated string. This is useful for strings coming from > > > sysfs that often include trailing whitespace due to user input. > > > > Is it good idea? I mean "\n\n/foo bar baz" is valid filename in > > unix. This is kernel interface, it is not meant to be too user > > friendly... > > v6 of this patchset carries your ack of the patch that uses this for > /sys/debug/resume, so are you disagreeing we need this support at > all or /sys/power/resume, no? > that it shouldn't be the generic sysfs write behavior? If the latter, I > agree, and the changelog could be improved to specify what writes we > actually care about. Well, your /sys/power/resume patch would be nice cleanup, but it changs behaviour, too... which is unnice. Stripping trailing "\n" is probably neccessary, because we did it before. (It probably was a mistake). But kernel is not right place to second-guess what the user meant. Just return -EINVAL. This is kernel ABI, after all, not user facing shell. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- 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