Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1529607394.29548.199.camel@intel.com>
Date: Thu, 21 Jun 2018 18:56:18 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "jannh@...gle.com" <jannh@...gle.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "Van De
 Ven, Arjan" <arjan.van.de.ven@...el.com>, "tglx@...utronix.de"
	<tglx@...utronix.de>, "linux-mm@...ck.org" <linux-mm@...ck.org>,
	"x86@...nel.org" <x86@...nel.org>, "Accardi, Kristen C"
	<kristen.c.accardi@...el.com>, "hpa@...or.com" <hpa@...or.com>,
	"mingo@...hat.com" <mingo@...hat.com>, "kernel-hardening@...ts.openwall.com"
	<kernel-hardening@...ts.openwall.com>, "Hansen, Dave" <dave.hansen@...el.com>
Subject: Re: [PATCH 3/3] vmalloc: Add debugfs modfraginfo

On Thu, 2018-06-21 at 14:32 +0200, Jann Horn wrote:
> On Thu, Jun 21, 2018 at 12:12 AM Rick Edgecombe
> <rick.p.edgecombe@...el.com> wrote:
> > 
> > Add debugfs file "modfraginfo" for providing info on module space
> > fragmentation.  This can be used for determining if loadable module
> > randomization is causing any problems for extreme module loading
> > situations,
> > like huge numbers of modules or extremely large modules.
> > 
> > Sample output when RANDOMIZE_BASE and X86_64 is configured:
> > Largest free space:             847253504
> > External Memory Fragementation: 20%
> > Allocations in backup area:     0
> > 
> > Sample output otherwise:
> > Largest free space:             847253504
> > External Memory Fragementation: 20%
> [...]
> > 
> > +       seq_printf(m, "Largest free space:\t\t%lu\n",
> > largest_free);
> > +       if (total_free)
> > +               seq_printf(m, "External Memory
> > Fragementation:\t%lu%%\n",
> "Fragmentation"
> 
> > 
> > +                       100-(100*largest_free/total_free));
> > +       else
> > +               seq_puts(m, "External Memory
> > Fragementation:\t0%%\n");
> "Fragmentation"

Oops! Thanks.

> [...]
> > 
> > +static const struct file_operations debug_module_frag_operations =
> > {
> > +       .open       = proc_module_frag_debug_open,
> > +       .read       = seq_read,
> > +       .llseek     = seq_lseek,
> > +       .release    = single_release,
> > +};
> > 
> > +static void debug_modfrag_init(void)
> > +{
> > +       debugfs_create_file("modfraginfo", 0x0400, NULL, NULL,
> > +                       &debug_module_frag_operations);
> 0x0400 is 02000, which is the setgid bit. I think you meant to type
> 0400?

Yes, thanks.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.