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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 16 Apr 2024 10:48:27 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Prasad Pandit <pj.pandit@...oo.in>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Joe Perches <joe@...ches.com>,
	Dwaipayan Ray <dwaipayanray1@...il.com>,
	Lukas Bulwahn <lukas.bulwahn@...il.com>,
	Dan Carpenter <dan.carpenter@...aro.org>,
	Andy Whitcroft <apw@...onical.com>
Subject: Re: [PATCH] checkpatch: error if file terminates without a new-line

On Tue, Apr 16, 2024 at 07:04:47AM +0000, Prasad Pandit wrote:
> [+linux-kernel]
> 
> On Saturday, 30 March, 2024 at 09:09:12 am IST, Prasad Pandit <ppandit@...hat.com> wrote: 

Why are these lines in a changelog of a patch to submit?  That's not
going to work :(

I suggest taking some time and talking to some other kernel developers
in red hat as to how to submit changes, that will make things much
easier.

> From: Prasad Pandit <pjp@...oraproject.org>
> 
> Add check to flag an error if a patch terminates a file
> without a new line (\n) character.
> 
> Suggested-by: Dan Carpenter <dan.carpenter@...aro.org>
> Signed-off-by: Prasad Pandit <pjp@...oraproject.org>

Also, I see 3 different emails for you here, none of which match, pick
one for kernel development and stick with it?

> ---
> scripts/checkpatch.pl | 7 +++++++
> 1 file changed, 7 insertions(+)
> 
> -> https://lore.kernel.org/all/CAE8KmOxG=3sWKpeB5fdWTK-SCipS=JyDE-_DNgY--DtoSQZ0Qw@mail.gmail.com/T/#t
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 9c4c4a61bc83..df34c0709410 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2795,6 +2795,13 @@ sub process {
>             $is_patch = 1;
>         }
> 
> +# check if patch terminates file without a new line (\n)
> +        if ($line =~ /^\\ No newline at end of file$/
> +            and $rawlines[$linenr - 2] =~ /^\+.*$/) {
> +            ERROR("NOEOL_FILE",
> +                  "patch terminates file without a new line (\\n).");
> +        }

Why is this a problem?  files without a new line should not cause
problems with a compiler, right?  You don't have a justification for why
this change needs to be checked for anywhere.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ