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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080427003645.GA19827@suse.de>
Date:	Sat, 26 Apr 2008 17:36:45 -0700
From:	Greg KH <gregkh@...e.de>
To:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Cc:	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org
Subject: Re: ftrace and debugfs weird interaction

On Sat, Apr 26, 2008 at 02:54:03PM -0400, Mathieu Desnoyers wrote:
> Hi,
> 
> When trying to figure out what was going on with the sched tracer
> "tracing_enabled" file (sched-devel.git tree), I fell on this strange
> behavior :
> 
> echo 1>tracing_enabled seems _not_ to send 1 to the tracing_ctrl_write
> callback. However, sending garbage, e.g. echo s> tracing_enabled,
> correctly sends the 's' character down the chain. echo 0>tracing_enabled
> sometimes results in the callback not even being called.
> 
> The debugfs file has been created with
> 
>         entry = debugfs_create_file("tracing_enabled", 0644, d_tracer,
>                                     &global_trace, &tracing_ctrl_fops);
>         if (!entry)
>                 pr_warning("Could not create debugfs 'tracing_enabled' entry\n");
> 
> I wonder what kind of weird debugfs interaction we might have here ?

I don't know.  Are you sure your _fops is not getting called at all?

How about using a "default" operation for such a simple file, like
debugfs_create_bool() as that is all you care about for this kind of
value?

That should save you some code at the very least :)

thanks,

greg k-h
--
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