You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/sysctl-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/sysctl-2.6: (43 commits) security/tomoyo: Remove now unnecessary handling of security_sysctl. security/tomoyo: Add a special case to handle accesses through the internal proc mount. sysctl: Drop & in front of every proc_handler. sysctl: Remove CTL_NONE and CTL_UNNUMBERED sysctl: kill dead ctl_handler definitions. sysctl: Remove the last of the generic binary sysctl support sysctl net: Remove unused binary sysctl code sysctl security/tomoyo: Don't look at ctl_name sysctl arm: Remove binary sysctl support sysctl x86: Remove dead binary sysctl support sysctl sh: Remove dead binary sysctl support sysctl powerpc: Remove dead binary sysctl support sysctl ia64: Remove dead binary sysctl support sysctl s390: Remove dead sysctl binary support sysctl frv: Remove dead binary sysctl support sysctl mips/lasat: Remove dead binary sysctl support sysctl drivers: Remove dead binary sysctl support sysctl crypto: Remove dead binary sysctl support sysctl security/keys: Remove dead binary sysctl support sysctl kernel: Remove binary sysctl logic ...
This commit is contained in:
+4
-7
@@ -675,36 +675,33 @@ static int hpet_is_known(struct hpet_data *hdp)
|
||||
|
||||
static ctl_table hpet_table[] = {
|
||||
{
|
||||
.ctl_name = CTL_UNNUMBERED,
|
||||
.procname = "max-user-freq",
|
||||
.data = &hpet_max_freq,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = &proc_dointvec,
|
||||
.proc_handler = proc_dointvec,
|
||||
},
|
||||
{.ctl_name = 0}
|
||||
{}
|
||||
};
|
||||
|
||||
static ctl_table hpet_root[] = {
|
||||
{
|
||||
.ctl_name = CTL_UNNUMBERED,
|
||||
.procname = "hpet",
|
||||
.maxlen = 0,
|
||||
.mode = 0555,
|
||||
.child = hpet_table,
|
||||
},
|
||||
{.ctl_name = 0}
|
||||
{}
|
||||
};
|
||||
|
||||
static ctl_table dev_root[] = {
|
||||
{
|
||||
.ctl_name = CTL_DEV,
|
||||
.procname = "dev",
|
||||
.maxlen = 0,
|
||||
.mode = 0555,
|
||||
.child = hpet_root,
|
||||
},
|
||||
{.ctl_name = 0}
|
||||
{}
|
||||
};
|
||||
|
||||
static struct ctl_table_header *sysctl_header;
|
||||
|
||||
@@ -660,26 +660,23 @@ static struct ipmi_smi_watcher smi_watcher = {
|
||||
#include <linux/sysctl.h>
|
||||
|
||||
static ctl_table ipmi_table[] = {
|
||||
{ .ctl_name = DEV_IPMI_POWEROFF_POWERCYCLE,
|
||||
.procname = "poweroff_powercycle",
|
||||
{ .procname = "poweroff_powercycle",
|
||||
.data = &poweroff_powercycle,
|
||||
.maxlen = sizeof(poweroff_powercycle),
|
||||
.mode = 0644,
|
||||
.proc_handler = &proc_dointvec },
|
||||
.proc_handler = proc_dointvec },
|
||||
{ }
|
||||
};
|
||||
|
||||
static ctl_table ipmi_dir_table[] = {
|
||||
{ .ctl_name = DEV_IPMI,
|
||||
.procname = "ipmi",
|
||||
{ .procname = "ipmi",
|
||||
.mode = 0555,
|
||||
.child = ipmi_table },
|
||||
{ }
|
||||
};
|
||||
|
||||
static ctl_table ipmi_root_table[] = {
|
||||
{ .ctl_name = CTL_DEV,
|
||||
.procname = "dev",
|
||||
{ .procname = "dev",
|
||||
.mode = 0555,
|
||||
.child = ipmi_dir_table },
|
||||
{ }
|
||||
|
||||
+4
-10
@@ -431,30 +431,25 @@ static struct cdev ptmx_cdev;
|
||||
|
||||
static struct ctl_table pty_table[] = {
|
||||
{
|
||||
.ctl_name = PTY_MAX,
|
||||
.procname = "max",
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.data = &pty_limit,
|
||||
.proc_handler = &proc_dointvec_minmax,
|
||||
.strategy = &sysctl_intvec,
|
||||
.proc_handler = proc_dointvec_minmax,
|
||||
.extra1 = &pty_limit_min,
|
||||
.extra2 = &pty_limit_max,
|
||||
}, {
|
||||
.ctl_name = PTY_NR,
|
||||
.procname = "nr",
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0444,
|
||||
.data = &pty_count,
|
||||
.proc_handler = &proc_dointvec,
|
||||
}, {
|
||||
.ctl_name = 0
|
||||
}
|
||||
.proc_handler = proc_dointvec,
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
static struct ctl_table pty_kern_table[] = {
|
||||
{
|
||||
.ctl_name = KERN_PTY,
|
||||
.procname = "pty",
|
||||
.mode = 0555,
|
||||
.child = pty_table,
|
||||
@@ -464,7 +459,6 @@ static struct ctl_table pty_kern_table[] = {
|
||||
|
||||
static struct ctl_table pty_root_table[] = {
|
||||
{
|
||||
.ctl_name = CTL_KERN,
|
||||
.procname = "kernel",
|
||||
.mode = 0555,
|
||||
.child = pty_kern_table,
|
||||
|
||||
+7
-47
@@ -1257,94 +1257,54 @@ static int proc_do_uuid(ctl_table *table, int write,
|
||||
return proc_dostring(&fake_table, write, buffer, lenp, ppos);
|
||||
}
|
||||
|
||||
static int uuid_strategy(ctl_table *table,
|
||||
void __user *oldval, size_t __user *oldlenp,
|
||||
void __user *newval, size_t newlen)
|
||||
{
|
||||
unsigned char tmp_uuid[16], *uuid;
|
||||
unsigned int len;
|
||||
|
||||
if (!oldval || !oldlenp)
|
||||
return 1;
|
||||
|
||||
uuid = table->data;
|
||||
if (!uuid) {
|
||||
uuid = tmp_uuid;
|
||||
uuid[8] = 0;
|
||||
}
|
||||
if (uuid[8] == 0)
|
||||
generate_random_uuid(uuid);
|
||||
|
||||
if (get_user(len, oldlenp))
|
||||
return -EFAULT;
|
||||
if (len) {
|
||||
if (len > 16)
|
||||
len = 16;
|
||||
if (copy_to_user(oldval, uuid, len) ||
|
||||
put_user(len, oldlenp))
|
||||
return -EFAULT;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int sysctl_poolsize = INPUT_POOL_WORDS * 32;
|
||||
ctl_table random_table[] = {
|
||||
{
|
||||
.ctl_name = RANDOM_POOLSIZE,
|
||||
.procname = "poolsize",
|
||||
.data = &sysctl_poolsize,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0444,
|
||||
.proc_handler = &proc_dointvec,
|
||||
.proc_handler = proc_dointvec,
|
||||
},
|
||||
{
|
||||
.ctl_name = RANDOM_ENTROPY_COUNT,
|
||||
.procname = "entropy_avail",
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0444,
|
||||
.proc_handler = &proc_dointvec,
|
||||
.proc_handler = proc_dointvec,
|
||||
.data = &input_pool.entropy_count,
|
||||
},
|
||||
{
|
||||
.ctl_name = RANDOM_READ_THRESH,
|
||||
.procname = "read_wakeup_threshold",
|
||||
.data = &random_read_wakeup_thresh,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = &proc_dointvec_minmax,
|
||||
.strategy = &sysctl_intvec,
|
||||
.proc_handler = proc_dointvec_minmax,
|
||||
.extra1 = &min_read_thresh,
|
||||
.extra2 = &max_read_thresh,
|
||||
},
|
||||
{
|
||||
.ctl_name = RANDOM_WRITE_THRESH,
|
||||
.procname = "write_wakeup_threshold",
|
||||
.data = &random_write_wakeup_thresh,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = &proc_dointvec_minmax,
|
||||
.strategy = &sysctl_intvec,
|
||||
.proc_handler = proc_dointvec_minmax,
|
||||
.extra1 = &min_write_thresh,
|
||||
.extra2 = &max_write_thresh,
|
||||
},
|
||||
{
|
||||
.ctl_name = RANDOM_BOOT_ID,
|
||||
.procname = "boot_id",
|
||||
.data = &sysctl_bootid,
|
||||
.maxlen = 16,
|
||||
.mode = 0444,
|
||||
.proc_handler = &proc_do_uuid,
|
||||
.strategy = &uuid_strategy,
|
||||
.proc_handler = proc_do_uuid,
|
||||
},
|
||||
{
|
||||
.ctl_name = RANDOM_UUID,
|
||||
.procname = "uuid",
|
||||
.maxlen = 16,
|
||||
.mode = 0444,
|
||||
.proc_handler = &proc_do_uuid,
|
||||
.strategy = &uuid_strategy,
|
||||
.proc_handler = proc_do_uuid,
|
||||
},
|
||||
{ .ctl_name = 0 }
|
||||
{ }
|
||||
};
|
||||
#endif /* CONFIG_SYSCTL */
|
||||
|
||||
|
||||
+4
-7
@@ -282,34 +282,31 @@ static irqreturn_t rtc_interrupt(int irq, void *dev_id)
|
||||
*/
|
||||
static ctl_table rtc_table[] = {
|
||||
{
|
||||
.ctl_name = CTL_UNNUMBERED,
|
||||
.procname = "max-user-freq",
|
||||
.data = &rtc_max_user_freq,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = &proc_dointvec,
|
||||
.proc_handler = proc_dointvec,
|
||||
},
|
||||
{ .ctl_name = 0 }
|
||||
{ }
|
||||
};
|
||||
|
||||
static ctl_table rtc_root[] = {
|
||||
{
|
||||
.ctl_name = CTL_UNNUMBERED,
|
||||
.procname = "rtc",
|
||||
.mode = 0555,
|
||||
.child = rtc_table,
|
||||
},
|
||||
{ .ctl_name = 0 }
|
||||
{ }
|
||||
};
|
||||
|
||||
static ctl_table dev_root[] = {
|
||||
{
|
||||
.ctl_name = CTL_DEV,
|
||||
.procname = "dev",
|
||||
.mode = 0555,
|
||||
.child = rtc_root,
|
||||
},
|
||||
{ .ctl_name = 0 }
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct ctl_table_header *sysctl_header;
|
||||
|
||||
Reference in New Issue
Block a user