From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752453AbdI1Is1 (ORCPT ); Thu, 28 Sep 2017 04:48:27 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:50264 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751999AbdI1IsZ (ORCPT ); Thu, 28 Sep 2017 04:48:25 -0400 X-Google-Smtp-Source: AOwi7QDIeyb78d4Ff8rY7o/spyFAQqykIxjqVd59yJ1jpcI/UTZtdgxd7J3JvV0nkdRnTXJTeiB/Fg== Date: Thu, 28 Sep 2017 10:48:21 +0200 From: Ingo Molnar To: Jean Delvare Cc: LKML , Andrew Morton , Baoquan He , Linus Torvalds , Thomas Gleixner , Peter Zijlstra , "H. Peter Anvin" , Borislav Petkov Subject: Re: [PATCH] params: Fix an overflow in param_attr_show Message-ID: <20170928084821.mh6nlxsrdfojmx4h@gmail.com> References: <20170927101031.7a3b2398@endymion> <20170927082642.slh2gk3zuw5j7gmh@gmail.com> <1506505230.14970.22.camel@suse.de> <20170927133104.s6meugnrysccwrde@gmail.com> <20170928100223.2be62f88@endymion> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170928100223.2be62f88@endymion> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Jean Delvare wrote: > > STANDARD_PARAM_DEF(byte, unsigned char, "%hhu\n", kstrtou8); > > STANDARD_PARAM_DEF(short, short, "%hi\n", kstrtos16); > > STANDARD_PARAM_DEF(ushort, unsigned short, "%hu\n", kstrtou16); > > STANDARD_PARAM_DEF(int, int, "%i\n", kstrtoint); > > STANDARD_PARAM_DEF(uint, unsigned int, "%u\n", kstrtouint); > > STANDARD_PARAM_DEF(long, long, "%li\n", kstrtol); > > STANDARD_PARAM_DEF(ulong, unsigned long, "%lu\n", kstrtoul); > > STANDARD_PARAM_DEF(ullong, unsigned long long, "%llu\n", kstrtoull); > > Sure it is possible to add a new parameter type. But why would the > person adding it forget the \n? Because they are human? I certainly forgot similar details when writing code, numerous times, and making constructs more robust against mistakes is half of my job as a maintainer. This is kernel design 101. > I can't imagine that someone adding a > new type would type the new line of code character by character. Such an > operation is calling for copy, paste and edit, at which point there is > no reason why the \n would be actively deleted. Or this is sabotage, > really ;-) WTF? Really, I've given you useful feedback in the last couple of days, and my suggestions were generally correct and on topic, still your replies were passive-aggressive, obtuse and generally foul tempered in every single case. Just the latest example: > Aligning parameters vertically as you suggest above is probably a good > idea for overall readability anyway, so I can change my patch to do > that, as I am modifying these lines anyway. It is pretty much > independent from the fix per se, but if it makes you happy... I made a routine, technically valid suggestion that I made countless other kernel developers in the past who sent me code with such a pattern, and I do not appreciate your condescending tone, it's not about 'making me happy'. You need to handle criticism of your patches properly and constructively. Thanks, Ingo