mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-26 19:44:21 +08:00
sysctl changes for v6.9-rc1
I'm sending you the sysctl pull request after following Luis' suggestion to become a maintainer. If you see that something is missing, get back to me with how to improve and I'll include your feedback in the following PRs. Here is a summary of the changes included in this PR: * New shared repo for sysctl maintenance * check-sysctl-docs adjustment for API changes by Thomas Weißschuh This is a non-functional PR. Additional testing is required for the rest of the pending changes. Future kernel pull requests will include the removal of the empty elements (sentinels) from sysctl arrays in the kernel/, net/, mm/ and security/ dirs. After that, the superfluous check for procname == NULL will be removed. And the push to avoid bloating the kernel as these arrays move out of kernel/sysctl.c will be completed. Even though Thomas' changes went into sysctl-next after v6.8-rc5 (3 weeks in linux-next), I include them as they contained no functional changes and therefore have little chance of resulting in an error/regression. Finally the new shared repo is now picked up by linux-next and is the source for upcoming sysctl changes. -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEErkcJVyXmMSXOyyeQupfNUreWQU8FAmXzVSUACgkQupfNUreW QU938wv9F8giyaHfGAOOytq6zsMxEYt96t7YP8gAIApPrLIorfFPc/hP4fZhthwX G0KRuA2LLmBL8wq22otzwDx0I5p3zu1ZOEXX594MX2ac4iGRFTsGbZo4G/caiaDu tUEjxMKC4EChGd04Zh8QW93SFK2bQLJYm59ST4JnXynpFZ4B3B7y1AMTshMKdmGu KozaCt/IBi27Wsp8Bwlx39KL+wWtmluYtM4ErxTjUp2hXyDr5aQiNztD0yeOMrLN rIh3H7WYFbFVm3HY4ZgkVfRgKgKZBjI6+5lYu8C3BAgp+ltDkDY7rJu5ux2b5q1r Z9yQ4rg+pnsEjvIpq4trccbyPZX5hrgE9zUN7lJSKr2bqPTKAnJfN0FAQ4rNgHzO EFSHJQd26XuWoQIhwR07d8PDXnfKUH1f8mgN/LWFEXr4iQ1VBGBlYwbvrMkjyoVt Qb/bLUKomCEPzQ6qKrSDAqmcm4A8dl3jbMnjFT7zAfjrcMy8gsWY1sX/0FYR/KYs gPWmf0GW =mUbc -----END PGP SIGNATURE----- Merge tag 'sysctl-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl Pull sysctl updates from Joel Granados: "No functional changes - additional testing is required for the rest of the pending changes. - New shared repo for sysctl maintenance - check-sysctl-docs adjustment for API changes by Thomas Weißschuh" * tag 'sysctl-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl: scripts: check-sysctl-docs: handle per-namespace sysctls ipc: remove linebreaks from arguments of __register_sysctl_table scripts: check-sysctl-docs: adapt to new API MAINTAINERS: Update sysctl tree location
This commit is contained in:
commit
2cb5c86839
@ -17689,7 +17689,7 @@ M: Joel Granados <j.granados@samsung.com>
|
||||
L: linux-kernel@vger.kernel.org
|
||||
L: linux-fsdevel@vger.kernel.org
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git sysctl-next
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl.git sysctl-next
|
||||
F: fs/proc/proc_sysctl.c
|
||||
F: include/linux/sysctl.h
|
||||
F: kernel/sysctl-test.c
|
||||
|
@ -292,8 +292,7 @@ bool setup_ipc_sysctls(struct ipc_namespace *ns)
|
||||
tbl[i].data = NULL;
|
||||
}
|
||||
|
||||
ns->ipc_sysctls = __register_sysctl_table(&ns->ipc_set,
|
||||
"kernel", tbl,
|
||||
ns->ipc_sysctls = __register_sysctl_table(&ns->ipc_set, "kernel", tbl,
|
||||
ARRAY_SIZE(ipc_sysctls));
|
||||
}
|
||||
if (!ns->ipc_sysctls) {
|
||||
|
@ -8,7 +8,7 @@
|
||||
# Example invocation:
|
||||
# scripts/check-sysctl-docs -vtable="kernel" \
|
||||
# Documentation/admin-guide/sysctl/kernel.rst \
|
||||
# $(git grep -l register_sysctl_)
|
||||
# $(git grep -l register_sysctl)
|
||||
#
|
||||
# Specify -vdebug=1 to see debugging information
|
||||
|
||||
@ -20,14 +20,10 @@ BEGIN {
|
||||
}
|
||||
|
||||
# The following globals are used:
|
||||
# children: maps ctl_table names and procnames to child ctl_table names
|
||||
# documented: maps documented entries (each key is an entry)
|
||||
# entries: maps ctl_table names and procnames to counts (so
|
||||
# enumerating the subkeys for a given ctl_table lists its
|
||||
# procnames)
|
||||
# files: maps procnames to source file names
|
||||
# paths: maps ctl_path names to paths
|
||||
# curpath: the name of the current ctl_path struct
|
||||
# curtable: the name of the current ctl_table struct
|
||||
# curentry: the name of the current proc entry (procname when parsing
|
||||
# a ctl_table, constructed path when parsing a ctl_path)
|
||||
@ -94,42 +90,23 @@ FNR == NR {
|
||||
|
||||
# Stage 2: process each file and find all sysctl tables
|
||||
BEGINFILE {
|
||||
delete children
|
||||
delete entries
|
||||
delete paths
|
||||
curpath = ""
|
||||
curtable = ""
|
||||
curentry = ""
|
||||
delete vars
|
||||
if (debug) print "Processing file " FILENAME
|
||||
}
|
||||
|
||||
/^static struct ctl_path/ {
|
||||
match($0, /static struct ctl_path ([^][]+)/, tables)
|
||||
curpath = tables[1]
|
||||
if (debug) print "Processing path " curpath
|
||||
}
|
||||
|
||||
/^static struct ctl_table/ {
|
||||
match($0, /static struct ctl_table ([^][]+)/, tables)
|
||||
curtable = tables[1]
|
||||
/^static( const)? struct ctl_table/ {
|
||||
match($0, /static( const)? struct ctl_table ([^][]+)/, tables)
|
||||
curtable = tables[2]
|
||||
if (debug) print "Processing table " curtable
|
||||
}
|
||||
|
||||
/^};$/ {
|
||||
curpath = ""
|
||||
curtable = ""
|
||||
curentry = ""
|
||||
}
|
||||
|
||||
curpath && /\.procname[\t ]*=[\t ]*".+"/ {
|
||||
match($0, /.procname[\t ]*=[\t ]*"([^"]+)"/, names)
|
||||
if (curentry) {
|
||||
curentry = curentry "/" names[1]
|
||||
} else {
|
||||
curentry = names[1]
|
||||
}
|
||||
if (debug) print "Setting path " curpath " to " curentry
|
||||
paths[curpath] = curentry
|
||||
delete vars
|
||||
}
|
||||
|
||||
curtable && /\.procname[\t ]*=[\t ]*".+"/ {
|
||||
@ -140,10 +117,32 @@ curtable && /\.procname[\t ]*=[\t ]*".+"/ {
|
||||
file[curentry] = FILENAME
|
||||
}
|
||||
|
||||
/\.child[\t ]*=/ {
|
||||
child = trimpunct($NF)
|
||||
if (debug) print "Linking child " child " to table " curtable " entry " curentry
|
||||
children[curtable][curentry] = child
|
||||
/register_sysctl.*/ {
|
||||
match($0, /register_sysctl(|_init|_sz)\("([^"]+)" *, *([^,)]+)/, tables)
|
||||
if (debug) print "Registering table " tables[3] " at " tables[2]
|
||||
if (tables[2] == table) {
|
||||
for (entry in entries[tables[3]]) {
|
||||
printentry(entry)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/kmemdup.*/ {
|
||||
match($0, /([^ \t]+) *= *kmemdup\(([^,]+) *,/, names)
|
||||
if (debug) print "Found variable " names[1] " for table " names[2]
|
||||
if (names[2] in entries) {
|
||||
vars[names[1]] = names[2]
|
||||
}
|
||||
}
|
||||
|
||||
/__register_sysctl_table.*/ {
|
||||
match($0, /__register_sysctl_table\([^,]+, *"([^"]+)" *, *([^,]+)/, tables)
|
||||
if (debug) print "Registering variable table " tables[2] " at " tables[1]
|
||||
if (tables[1] == table && tables[2] in vars) {
|
||||
for (entry in entries[vars[tables[2]]]) {
|
||||
printentry(entry)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
END {
|
||||
|
Loading…
Reference in New Issue
Block a user