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] [day] [month] [year] [list]
Date:   Wed, 10 Jun 2020 14:08:21 -0700
From:   Joe Perches <joe@...ches.com>
To:     Scott Branden <scott.branden@...adcom.com>,
        Andy Whitcroft <apw@...onical.com>
Cc:     BCM Kernel Feedback <bcm-kernel-feedback-list@...adcom.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] checkpatch: add --max-file-size option

On Wed, 2020-06-10 at 13:56 -0700, Scott Branden wrote:
> Add --max-file-size option (default off) to limit size of files
> that checkpatch processes.  Such an option is useful when checkpatch
> is run automatically during checkins to a source control system and
> someone acccidently or purposely attempt to commit massive size files
> to the system.  If the checkpatch script runs on such files it could take
> a long time to run and limit the server's ability to perform other
> operations.

Does everything need to be in checkpatch or can this facility
be run by a separate script that does the file size validation
before running checkpatch?

Also:

> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> +	if ($max_file_size > 0) {
> +		my $filesize = -s$FILE;

Does this work if the input file is from STDIN?
I'd guess it does not.

I think this might be better using (stat($FILE))[7]
or at least a space between -s and $file.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ