mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Ingo Molnar <mingo@elte.hu>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Alexey Dobriyan <adobriyan@sw.ru>
Subject: Re: 2.6.23-rc2-mm2
Date: Fri, 10 Aug 2007 11:12:55 -0600	[thread overview]
Message-ID: <m1odhfxqi0.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20070810160519.GA27500@elte.hu> (Ingo Molnar's message of "Fri, 10 Aug 2007 18:05:19 +0200")

Ingo Molnar <mingo@elte.hu> writes:

> * Eric W. Biederman <ebiederm@xmission.com> wrote:
>
>> Yes.  For the sched debug case I sent Ingo and friends but apparently 
>> other changes in Ingos tree kept it from applying and Andrew dropped 
>> it.  So instead the code now screams at you and refuses to register 
>> Ingo sysctl table.
>
> the commit below is now upstream - is your patch still needed?

Ok.  I missed that.  Duh.  I just saw Andrews drop message.

This looks like Alexey respun my patch, or else we were thinking on
parallel paths.  Probably parallel given Alexey's dislike of 
using the CTL_UNNUMBERED define.

There are two remaining gotchas:
- The directories have impossible permissions (writeable).

- The ctl_name for the kernel directory is inconsistent with
  everything else.  It should be CTL_KERN.

I think the patch below fixes that up but I haven't had a chance to
test it yet.

I kind of feel bad about being so picky but the this code is the
only place in the kernel where I have seen us violate either
of those rules, and it is a lot easier to deal with things
when they are consistent.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>

diff --git a/kernel/sched.c b/kernel/sched.c
index b0afd8d..47afd80 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5223,15 +5223,16 @@ static void migrate_dead_tasks(unsigned int dead_cpu)
 static struct ctl_table sd_ctl_dir[] = {
 	{
 		.procname	= "sched_domain",
-		.mode		= 0755,
+		.mode		= 0555,
 	},
 	{0,},
 };
 
 static struct ctl_table sd_ctl_root[] = {
 	{
+		.ctl_name	= CTL_KERN,
 		.procname	= "kernel",
-		.mode		= 0755,
+		.mode		= 0555,
 		.child		= sd_ctl_dir,
 	},
 	{0,},
@@ -5307,7 +5308,7 @@ static ctl_table *sd_alloc_ctl_cpu_table(int cpu)
 	for_each_domain(cpu, sd) {
 		snprintf(buf, 32, "domain%d", i);
 		entry->procname = kstrdup(buf, GFP_KERNEL);
-		entry->mode = 0755;
+		entry->mode = 0555;
 		entry->child = sd_alloc_ctl_domain_table(sd);
 		entry++;
 		i++;
@@ -5327,7 +5328,7 @@ static void init_sched_domain_sysctl(void)
 	for (i = 0; i < cpu_num; i++, entry++) {
 		snprintf(buf, 32, "cpu%d", i);
 		entry->procname = kstrdup(buf, GFP_KERNEL);
-		entry->mode = 0755;
+		entry->mode = 0555;
 		entry->child = sd_alloc_ctl_cpu_table(i);
 	}
 	sd_sysctl_header = register_sysctl_table(sd_ctl_root);

  parent reply	other threads:[~2007-08-10 17:14 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-10  5:42 2.6.23-rc2-mm2 Andrew Morton
2007-08-10  7:59 ` 2.6.23-rc2-mm2: possible irq lock inversion dependency detected Mariusz Kozlowski
2007-08-10  8:18 ` 2.6.23-rc2-mm2 Dave Young
2007-08-10  8:32   ` 2.6.23-rc2-mm2 Andrew Morton
2007-08-10  8:37     ` 2.6.23-rc2-mm2 Dave Young
2007-08-10  9:52       ` 2.6.23-rc2-mm2 Dave Young
2007-08-10 11:19         ` 2.6.23-rc2-mm2 Gabriel C
2007-08-10 20:22           ` 2.6.23-rc2-mm2 -- conntrack divide error Jiri Slaby
2007-08-10  9:23 ` 2.6.23-rc2-mm2 Aurelien Jarno
2007-08-10 16:40   ` 2.6.23-rc2-mm2 Valdis.Kletnieks
2007-08-10 16:59     ` 2.6.23-rc2-mm2 Adrian Bunk
2007-08-10 17:21       ` 2.6.23-rc2-mm2 Valdis.Kletnieks
2007-08-10 17:28         ` 2.6.23-rc2-mm2 Adrian Bunk
2007-08-10 10:23 ` 2.6.23-rc2-mm2 Gabriel C
2007-08-10 11:03   ` 2.6.23-rc2-mm2 Gabriel C
2007-08-10 16:05     ` 2.6.23-rc2-mm2 Eric W. Biederman
2007-08-10 12:35   ` 2.6.23-rc2-mm2 Gabriel C
2007-08-10 16:38     ` 2.6.23-rc2-mm2 Andrew Morton
2007-08-12 15:21       ` 2.6.23-rc2-mm2 Gabriel C
2007-08-10 12:37   ` 2.6.23-rc2-mm2 Gabriel C
2007-08-10 13:20     ` [PATCH -mm] Fix some section mismatch warnings Gabriel C
2007-08-14 20:50       ` Andrew Morton
2007-08-10 19:04     ` Section mismatch warnings ( Re: 2.6.23-rc2-mm2 ) Gabriel C
2007-08-10 19:32       ` Andrew Morton
2007-08-10 12:42   ` 2.6.23-rc2-mm2 Gabriel C
2007-08-11 20:58     ` [linux-usb-devel] 2.6.23-rc2-mm2 David Brownell
2007-08-12 10:15       ` Gabriel C
2007-08-10 16:03   ` 2.6.23-rc2-mm2 Eric W. Biederman
2007-08-10 14:38 ` [-mm patch] kernel/sysctl_check.c must #include <linux/string.h> Adrian Bunk
2007-08-10 21:32   ` Eric W. Biederman
2007-08-10 14:53 ` 2.6.23-rc2-mm2 Michal Piotrowski
2007-08-10 15:05   ` 2.6.23-rc2-mm2 Michal Piotrowski
2007-08-10 16:01     ` 2.6.23-rc2-mm2 Eric W. Biederman
2007-08-10 16:05       ` 2.6.23-rc2-mm2 Ingo Molnar
2007-08-10 17:10         ` 2.6.23-rc2-mm2 Andrew Morton
2007-08-10 17:12         ` Eric W. Biederman [this message]
2007-08-21 10:41           ` 2.6.23-rc2-mm2 Ingo Molnar
2007-08-10 15:56 ` 2.6.23-rc2-mm2: drivers/s390/char/keyboard.c compile error Adrian Bunk
2007-08-10 16:39   ` Samuel Thibault
2007-08-10 16:16 ` 2.6.23-rc2-mm2 Michal Piotrowski
2007-08-10 16:37   ` 2.6.23-rc2-mm2 Gabriel C
2007-08-10 17:33     ` 2.6.23-rc2-mm2 Eric W. Biederman
2007-08-10 19:41       ` 2.6.23-rc2-mm2 Andrew Morton
2007-08-10 19:54         ` 2.6.23-rc2-mm2 Eric W. Biederman
2007-08-10 21:00         ` [PATCH 1/7] sysctl: Remove broken cdrom binary sysctls Eric W. Biederman
2007-08-10 21:01           ` [PATCH 2/7] sysctl: parport remove binary paths Eric W. Biederman
2007-08-10 21:03             ` [PATCH 3/7] sysctl: Simplify the pty sysctl logic Eric W. Biederman
2007-08-10 21:06               ` [PATCH 4/7] sysctl: remove broken netfilter binary sysctls Eric W. Biederman
2007-08-10 21:08                 ` [PATCH 5/7] sysctl: Cleanup the sched debug sysctl usage Eric W. Biederman
2007-08-10 21:09                   ` [PATCH 6/7] sysctl: Update sysctl_checks list of binary paths Eric W. Biederman
2007-08-10 21:10                     ` [PATCH 7/7] sysctl: Remove the cad_pid binary sysctl path Eric W. Biederman
2007-08-10 21:10           ` [PATCH 1/7] sysctl: Remove broken cdrom binary sysctls Alan Cox
2007-08-10 21:19         ` 2.6.23-rc2-mm2 Eric W. Biederman
2007-08-10 17:38     ` 2.6.23-rc2-mm2 Michal Piotrowski
2007-08-10 17:55 ` arch/i386/kernel/setup.c - compile error (Re: 2.6.23-rc2-mm2) Gabriel C
2007-08-10 18:44   ` Andrew Morton
2007-08-10 19:34     ` Gabriel C
2007-08-10 20:08 ` 2.6.23-rc2-mm2 Aurelien Jarno
2007-08-10 20:20   ` 2.6.23-rc2-mm2 Andrew Morton
2007-08-10 21:43     ` 2.6.23-rc2-mm2 John W. Linville
2007-08-11 22:04 ` [PATCH] Re: 2.6.23-rc2-mm2: sata disk going slow Hugh Dickins
2007-08-13  5:29 ` 2.6.23-rc2-mm2 (libertas) Randy Dunlap
2007-08-14 21:23 ` [-mm patch] unexport ide_tune_dma Adrian Bunk
2007-08-14 21:23 ` [-mm patch] AFLAGS: fix the -g setting Adrian Bunk
2007-08-16 21:02   ` Andrew Morton
2007-08-16 22:16     ` Adrian Bunk
2007-08-16 22:30       ` Roland McGrath
2007-08-14 21:25 ` [-mm patch] remove fs/ext2/balloc.c:reserve_blocks() Adrian Bunk
2007-08-14 21:26 ` [-mm patch] unexport cap_inode_killpriv Adrian Bunk
2007-08-14 21:35   ` Serge E. Hallyn
2007-08-14 23:43     ` Adrian Bunk
2007-08-19 15:56 ` 2.6.23-rc2-mm2 richard kennedy
2007-08-21 23:36   ` 2.6.23-rc2-mm2 Andrew Morton
2007-08-23 15:54     ` 2.6.23-rc2-mm2 richard kennedy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1odhfxqi0.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=adobriyan@sw.ru \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.k.k.piotrowski@gmail.com \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®