lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 16 Dec 2008 12:56:09 +0100
From:	Robert Richter <robert.richter@....com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	oprofile-list <oprofile-list@...ts.sourceforge.net>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 08/10] oprofile: set values to default when creating
	oprofilefs

On 16.12.08 01:32:25, Andrew Morton wrote:
> > +unsigned long fs_buffer_size;
> > +unsigned long fs_cpu_buffer_size;
> > +unsigned long fs_buffer_watershed;
> 
> These were poorly chosen kernel-wide identifiers.

Right, didn't notice that. Will change this.

> >  static ssize_t depth_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
> >  {
> > @@ -120,6 +124,11 @@ static const struct file_operations dump_fops = {
> >  
> >  void oprofile_create_files(struct super_block *sb, struct dentry *root)
> >  {
> > +	/* reinitialize default values */
> > +	fs_buffer_size =	FS_BUFFER_SIZE_DEFAULT;
> > +	fs_cpu_buffer_size =	FS_CPU_BUFFER_SIZE_DEFAULT;
> > +	fs_buffer_watershed =	FS_BUFFER_WATERSHED_DEFAULT;
> > +
> >  	oprofilefs_create_file(sb, root, "enable", &enable_fops);
> >  	oprofilefs_create_file_perm(sb, root, "dump", &dump_fops, 0666);
> >  	oprofilefs_create_file(sb, root, "buffer", &event_buffer_fops);
> 
> afacit oprofile_create_files() only gets run when the module is loaded,
> so this patch is a no-op?

This code runs when oprofilefs is mounted. This happens typically in
an opcontrol --init/--deinit sequence. Before, the previous values
would have been used after mounting again. Now, default values are
restored.

-Robert

-- 
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@....com

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ