[Linux-kernel-mentees] [RFC PATCH] checkpatch: add shebang check to EXECUTE_PERMISSIONS
ujjwalkumar0501 at gmail.com
Sun Oct 11 18:14:33 UTC 2020
On 11/10/20 11:20 pm, Lukas Bulwahn wrote:
> On Sun, 11 Oct 2020, Ujjwal Kumar wrote:
>> checkpatch script checks for invalid EXECUTE_PERMISSIONS on source
>> files. The script leverages filename extensions and its path in
>> the repository to decide whether to allow execute permissions on
>> the file or not.
>> Based on current check conditions, a perl script file without
>> '.pl' extension in its filename and not belonging to 'scripts/'
>> directory is reported as ERROR which is a false-positive.
>> The script can correctly handle patches with mode changes and
>> shebang line if shebang is taken into account. So, along with
>> the current check conditions, adding the shebang check in the
>> check conditions can improve the reports of the script.
> I think one of the core design decisions of checkpatch.pl is:
> checkpatch.pl can run on a patch, even if the patch does not apply to the
> current repository version that is checked out.
>From our past conversation I remember about this particular point.
> It solely uses the information in the patch, and does not try to guess how
> it could be applied etc.
I am fetching the 'shebang' from the patch itself (therefore I do not
understand how does the proposed change violate that design decision?).
> This patch violates that core design decisions.
Can you please point out the exact change that violates the design decisions?
> You can propose to Joe Perches and lkml, but do not be surprised if that
> is rejected because of this reason above.
> I would be interested in the discussion.
More information about the Linux-kernel-mentees