Merge more updates from Andrew Morton: "147 patches, based on 7d2a07b769330c34b4deabeed939325c77a7ec2f. Subsystems affected by this patch series: mm (memory-hotplug, rmap, ioremap, highmem, cleanups, secretmem, kfence, damon, and vmscan), alpha, percpu, procfs, misc, core-kernel, MAINTAINERS, lib, checkpatch, epoll, init, nilfs2, coredump, fork, pids, criu, kconfig, selftests, ipc, and scripts" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (94 commits) scripts: check_extable: fix typo in user error message mm/workingset: correct kernel-doc notations ipc: replace costly bailout check in sysvipc_find_ipc() selftests/memfd: remove unused variable Kconfig.debug: drop selecting non-existing HARDLOCKUP_DETECTOR_ARCH configs: remove the obsolete CONFIG_INPUT_POLLDEV prctl: allow to setup brk for et_dyn executables pid: cleanup the stale comment mentioning pidmap_init(). kernel/fork.c: unexport get_{mm,task}_exe_file coredump: fix memleak in dump_vma_snapshot() fs/coredump.c: log if a core dump is aborted due to changed file permissions nilfs2: use refcount_dec_and_lock() to fix potential UAF nilfs2: fix memory leak in nilfs_sysfs_delete_snapshot_group nilfs2: fix memory leak in nilfs_sysfs_create_snapshot_group nilfs2: fix memory leak in nilfs_sysfs_delete_##name##_group nilfs2: fix memory leak in nilfs_sysfs_create_##name##_group nilfs2: fix NULL pointer in nilfs_##name##_attr_release nilfs2: fix memory leak in nilfs_sysfs_create_device_group trap: cleanup trap_init() init: move usermodehelper_enable() to populate_rootfs() ...
Showing the changes to scripts (2 of 149 files). Show all
Unified · Split
| @@ -4,7 +4,7 @@ · 3 unmodified lines | |||
| 4 | 4 | ||
| 5 | obj=$1 | 5 | obj=$1 |
| 6 | 6 | ||
| 7 | file ${obj} | grep -q ELF || (echo "${obj} is not and ELF file." 1>&2 ; exit 0) | 7 | file ${obj} | grep -q ELF || (echo "${obj} is not an ELF file." 1>&2 ; exit 0) |
| 8 | 8 | ||
| 9 | # Bail out early if there isn't an __ex_table section in this object file. | 9 | # Bail out early if there isn't an __ex_table section in this object file. |
| 10 | objdump -hj __ex_table ${obj} 2> /dev/null > /dev/null | 10 | objdump -hj __ex_table ${obj} 2> /dev/null > /dev/null |
| @@ -501,7 +501,7 @@ our $Binary = qr{(?i)0b[01]+$Int_type?}; · 500 unmodified lines | |||
| 501 | our $Hex = qr{(?i)0x[0-9a-f]+$Int_type?}; | 501 | our $Hex = qr{(?i)0x[0-9a-f]+$Int_type?}; |
| 502 | our $Int = qr{[0-9]+$Int_type?}; | 502 | our $Int = qr{[0-9]+$Int_type?}; |
| 503 | our $Octal = qr{0[0-7]+$Int_type?}; | 503 | our $Octal = qr{0[0-7]+$Int_type?}; |
| 504 | our $String = qr{"[X\t]*"}; | 504 | our $String = qr{(?:\b[Lu])?"[X\t]*"}; |
| 505 | our $Float_hex = qr{(?i)0x[0-9a-f]+p-?[0-9]+[fl]?}; | 505 | our $Float_hex = qr{(?i)0x[0-9a-f]+p-?[0-9]+[fl]?}; |
| 506 | our $Float_dec = qr{(?i)(?:[0-9]+\.[0-9]*|[0-9]*\.[0-9]+)(?:e-?[0-9]+)?[fl]?}; | 506 | our $Float_dec = qr{(?i)(?:[0-9]+\.[0-9]*|[0-9]*\.[0-9]+)(?:e-?[0-9]+)?[fl]?}; |
| 507 | our $Float_int = qr{(?i)[0-9]+e-?[0-9]+[fl]?}; | 507 | our $Float_int = qr{(?i)[0-9]+e-?[0-9]+[fl]?}; |
| @@ -1181,7 +1181,8 @@ sub git_commit_info { · 673 unmodified lines | |||
| 1181 | # git log --format='%H %s' -1 $line | | 1181 | # git log --format='%H %s' -1 $line | |
| 1182 | # echo "commit $(cut -c 1-12,41-)" | 1182 | # echo "commit $(cut -c 1-12,41-)" |
| 1183 | # done | 1183 | # done |
| 1184 | } elsif ($lines[0] =~ /^fatal: ambiguous argument '$commit': unknown revision or path not in the working tree\./) { | 1184 | } elsif ($lines[0] =~ /^fatal: ambiguous argument '$commit': unknown revision or path not in the working tree\./ || |
| 1185 | $lines[0] =~ /^fatal: bad object $commit/) { | ||
| 1185 | $id = undef; | 1186 | $id = undef; |
| 1186 | } else { | 1187 | } else { |
| 1187 | $id = substr($lines[0], 0, 12); | 1188 | $id = substr($lines[0], 0, 12); |
| @@ -2587,6 +2588,8 @@ sub process { · 1399 unmodified lines | |||
| 2587 | my $reported_maintainer_file = 0; | 2588 | my $reported_maintainer_file = 0; |
| 2588 | my $non_utf8_charset = 0; | 2589 | my $non_utf8_charset = 0; |
| 2589 | 2590 | ||
| 2591 | my $last_git_commit_id_linenr = -1; | ||
| 2592 | |||
| 2590 | my $last_blank_line = 0; | 2593 | my $last_blank_line = 0; |
| 2591 | my $last_coalesced_string_linenr = -1; | 2594 | my $last_coalesced_string_linenr = -1; |
| 2592 | 2595 | ||
| @@ -2909,10 +2912,10 @@ sub process { · 316 unmodified lines | |||
| 2909 | my ($email_name, $email_comment, $email_address, $comment1) = parse_email($ctx); | 2912 | my ($email_name, $email_comment, $email_address, $comment1) = parse_email($ctx); |
| 2910 | my ($author_name, $author_comment, $author_address, $comment2) = parse_email($author); | 2913 | my ($author_name, $author_comment, $author_address, $comment2) = parse_email($author); |
| 2911 | 2914 | ||
| 2912 | if ($email_address eq $author_address && $email_name eq $author_name) { | 2915 | if (lc $email_address eq lc $author_address && $email_name eq $author_name) { |
| 2913 | $author_sob = $ctx; | 2916 | $author_sob = $ctx; |
| 2914 | $authorsignoff = 2; | 2917 | $authorsignoff = 2; |
| 2915 | } elsif ($email_address eq $author_address) { | 2918 | } elsif (lc $email_address eq lc $author_address) { |
| 2916 | $author_sob = $ctx; | 2919 | $author_sob = $ctx; |
| 2917 | $authorsignoff = 3; | 2920 | $authorsignoff = 3; |
| 2918 | } elsif ($email_name eq $author_name) { | 2921 | } elsif ($email_name eq $author_name) { |
| @@ -3170,10 +3173,20 @@ sub process { · 251 unmodified lines | |||
| 3170 | } | 3173 | } |
| 3171 | 3174 | ||
| 3172 | # Check for git id commit length and improperly formed commit descriptions | 3175 | # Check for git id commit length and improperly formed commit descriptions |
| 3173 | if ($in_commit_log && !$commit_log_possible_stack_dump && | 3176 | # A correctly formed commit description is: |
| 3177 | # commit <SHA-1 hash length 12+ chars> ("Complete commit subject") | ||
| 3178 | # with the commit subject '("' prefix and '")' suffix | ||
| 3179 | # This is a fairly compilicated block as it tests for what appears to be | ||
| 3180 | # bare SHA-1 hash with minimum length of 5. It also avoids several types of | ||
| 3181 | # possible SHA-1 matches. | ||
| 3182 | # A commit match can span multiple lines so this block attempts to find a | ||
| 3183 | # complete typical commit on a maximum of 3 lines | ||
| 3184 | if ($perl_version_ok && | ||
| 3185 | $in_commit_log && !$commit_log_possible_stack_dump && | ||
| 3174 | $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink|base-commit):/i && | 3186 | $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink|base-commit):/i && |
| 3175 | $line !~ /^This reverts commit [0-9a-f]{7,40}/ && | 3187 | $line !~ /^This reverts commit [0-9a-f]{7,40}/ && |
| 3176 | ($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i || | 3188 | (($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i || |
| 3189 | ($line =~ /\bcommit\s*$/i && defined($rawlines[$linenr]) && $rawlines[$linenr] =~ /^\s*[0-9a-f]{5,}\b/i)) || | ||
| 3177 | ($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i && | 3190 | ($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i && |
| 3178 | $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i && | 3191 | $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i && |
| 3179 | $line !~ /\bfixes:\s*[0-9a-f]{12,40}/i))) { | 3192 | $line !~ /\bfixes:\s*[0-9a-f]{12,40}/i))) { |
| @@ -3183,49 +3196,56 @@ sub process { · 3 unmodified lines | |||
| 3183 | my $long = 0; | 3196 | my $long = 0; |
| 3184 | my $case = 1; | 3197 | my $case = 1; |
| 3185 | my $space = 1; | 3198 | my $space = 1; |
| 3186 | my $hasdesc = 0; | ||
| 3187 | my $hasparens = 0; | ||
| 3188 | my $id = '0123456789ab'; | 3199 | my $id = '0123456789ab'; |
| 3189 | my $orig_desc = "commit description"; | 3200 | my $orig_desc = "commit description"; |
| 3190 | my $description = ""; | 3201 | my $description = ""; |
| 3202 | my $herectx = $herecurr; | ||
| 3203 | my $has_parens = 0; | ||
| 3204 | my $has_quotes = 0; | ||
| 3205 | |||
| 3206 | my $input = $line; | ||
| 3207 | if ($line =~ /(?:\bcommit\s+[0-9a-f]{5,}|\bcommit\s*$)/i) { | ||
| 3208 | for (my $n = 0; $n < 2; $n++) { | ||
| 3209 | if ($input =~ /\bcommit\s+[0-9a-f]{5,}\s*($balanced_parens)/i) { | ||
| 3210 | $orig_desc = $1; | ||
| 3211 | $has_parens = 1; | ||
| 3212 | # Always strip leading/trailing parens then double quotes if existing | ||
| 3213 | $orig_desc = substr($orig_desc, 1, -1); | ||
| 3214 | if ($orig_desc =~ /^".*"$/) { | ||
| 3215 | $orig_desc = substr($orig_desc, 1, -1); | ||
| 3216 | $has_quotes = 1; | ||
| 3217 | } | ||
| 3218 | last; | ||
| 3219 | } | ||
| 3220 | last if ($#lines < $linenr + $n); | ||
| 3221 | $input .= " " . trim($rawlines[$linenr + $n]); | ||
| 3222 | $herectx .= "$rawlines[$linenr + $n]\n"; | ||
| 3223 | } | ||
| 3224 | $herectx = $herecurr if (!$has_parens); | ||
| 3225 | } | ||
| 3191 | 3226 | ||
| 3192 | if ($line =~ /\b(c)ommit\s+([0-9a-f]{5,})\b/i) { | 3227 | if ($input =~ /\b(c)ommit\s+([0-9a-f]{5,})\b/i) { |
| 3193 | $init_char = $1; | 3228 | $init_char = $1; |
| 3194 | $orig_commit = lc($2); | 3229 | $orig_commit = lc($2); |
| 3195 | } elsif ($line =~ /\b([0-9a-f]{12,40})\b/i) { | 3230 | $short = 0 if ($input =~ /\bcommit\s+[0-9a-f]{12,40}/i); |
| 3231 | $long = 1 if ($input =~ /\bcommit\s+[0-9a-f]{41,}/i); | ||
| 3232 | $space = 0 if ($input =~ /\bcommit [0-9a-f]/i); | ||
| 3233 | $case = 0 if ($input =~ /\b[Cc]ommit\s+[0-9a-f]{5,40}[^A-F]/); | ||
| 3234 | } elsif ($input =~ /\b([0-9a-f]{12,40})\b/i) { | ||
| 3196 | $orig_commit = lc($1); | 3235 | $orig_commit = lc($1); |
| 3197 | } | 3236 | } |
| 3198 | 3237 | ||
| 3199 | $short = 0 if ($line =~ /\bcommit\s+[0-9a-f]{12,40}/i); | ||
| 3200 | $long = 1 if ($line =~ /\bcommit\s+[0-9a-f]{41,}/i); | ||
| 3201 | $space = 0 if ($line =~ /\bcommit [0-9a-f]/i); | ||
| 3202 | $case = 0 if ($line =~ /\b[Cc]ommit\s+[0-9a-f]{5,40}[^A-F]/); | ||
| 3203 | if ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)"\)/i) { | ||
| 3204 | $orig_desc = $1; | ||
| 3205 | $hasparens = 1; | ||
| 3206 | } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s*$/i && | ||
| 3207 | defined $rawlines[$linenr] && | ||
| 3208 | $rawlines[$linenr] =~ /^\s*\("([^"]+)"\)/) { | ||
| 3209 | $orig_desc = $1; | ||
| 3210 | $hasparens = 1; | ||
| 3211 | } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+$/i && | ||
| 3212 | defined $rawlines[$linenr] && | ||
| 3213 | $rawlines[$linenr] =~ /^\s*[^"]+"\)/) { | ||
| 3214 | $line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)$/i; | ||
| 3215 | $orig_desc = $1; | ||
| 3216 | $rawlines[$linenr] =~ /^\s*([^"]+)"\)/; | ||
| 3217 | $orig_desc .= " " . $1; | ||
| 3218 | $hasparens = 1; | ||
| 3219 | } | ||
| 3220 | |||
| 3221 | ($id, $description) = git_commit_info($orig_commit, | 3238 | ($id, $description) = git_commit_info($orig_commit, |
| 3222 | $id, $orig_desc); | 3239 | $id, $orig_desc); |
| 3223 | 3240 | ||
| 3224 | if (defined($id) && | 3241 | if (defined($id) && |
| 3225 | ($short || $long || $space || $case || ($orig_desc ne $description) || !$hasparens)) { | 3242 | ($short || $long || $space || $case || ($orig_desc ne $description) || !$has_quotes) && |
| 3243 | $last_git_commit_id_linenr != $linenr - 1) { | ||
| 3226 | ERROR("GIT_COMMIT_ID", | 3244 | ERROR("GIT_COMMIT_ID", |
| 3227 | "Please use git commit description style 'commit <12+ chars of sha1> (\"<title line>\")' - ie: '${init_char}ommit $id (\"$description\")'\n" . $herecurr); | 3245 | "Please use git commit description style 'commit <12+ chars of sha1> (\"<title line>\")' - ie: '${init_char}ommit $id (\"$description\")'\n" . $herectx); |
| 3228 | } | 3246 | } |
| 3247 | #don't report the next line if this line ends in commit and the sha1 hash is the next line | ||
| 3248 | $last_git_commit_id_linenr = $linenr if ($line =~ /\bcommit\s*$/i); | ||
| 3229 | } | 3249 | } |
| 3230 | 3250 | ||
| 3231 | # Check for added, moved or deleted files | 3251 | # Check for added, moved or deleted files |
| @@ -6132,7 +6152,8 @@ sub process { · 2900 unmodified lines | |||
| 6132 | } | 6152 | } |
| 6133 | 6153 | ||
| 6134 | # concatenated string without spaces between elements | 6154 | # concatenated string without spaces between elements |
| 6135 | if ($line =~ /$String[A-Za-z0-9_]/ || $line =~ /[A-Za-z0-9_]$String/) { | 6155 | if ($line =~ /$String[A-Z_]/ || |
| 6156 | ($line =~ /([A-Za-z0-9_]+)$String/ && $1 !~ /^[Lu]$/)) { | ||
| 6136 | if (CHK("CONCATENATED_STRING", | 6157 | if (CHK("CONCATENATED_STRING", |
| 6137 | "Concatenated strings should use spaces between elements\n" . $herecurr) && | 6158 | "Concatenated strings should use spaces between elements\n" . $herecurr) && |
| 6138 | $fix) { | 6159 | $fix) { |
| @@ -6145,7 +6166,7 @@ sub process { · 6 unmodified lines | |||
| 6145 | } | 6166 | } |
| 6146 | 6167 | ||
| 6147 | # uncoalesced string fragments | 6168 | # uncoalesced string fragments |
| 6148 | if ($line =~ /$String\s*"/) { | 6169 | if ($line =~ /$String\s*[Lu]?"/) { |
| 6149 | if (WARN("STRING_FRAGMENTS", | 6170 | if (WARN("STRING_FRAGMENTS", |
| 6150 | "Consecutive strings are generally better as a single string\n" . $herecurr) && | 6171 | "Consecutive strings are generally better as a single string\n" . $herecurr) && |
| 6151 | $fix) { | 6172 | $fix) { |