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: <CAGG-pUSk-A=m=cXL85fY+nNgRGQVtG62GouPoANuXFUSrKK6BA@mail.gmail.com>
Date:	Sat, 19 Oct 2013 10:58:15 -0300
From:	Geyslan Gregório Bem <geyslan@...il.com>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Steven Rostedt <rostedt@...dmis.org>,
	kernel-br <kernel-br@...glegroups.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>,
	open list <linux-kernel@...r.kernel.org>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Subject: Re: [PATCH] tracing: fix referencing after memory freeing and
 refactors code

2013/10/19 Oleg Nesterov <oleg@...hat.com>:
> On 10/17, Steven Rostedt wrote:
>>
>> On Thu, 17 Oct 2013 22:44:56 -0300
>> "Geyslan G. Bem" <geyslan@...il.com> wrote:
>>
>> > and fix the possible 'dir'
>> > assignment after freeing it.
>
> This should be safe afaics, nobody will use it anyway. Even
> subsystem_release() won't be called if .open() fails. But I agree
> this doesn't look good.

Right.
>
>> I'm thinking of just nuking the tracing_open_generic() here. The only
>> thing it does here is the tracing_disabled check. The assignment of
>> inode->i_private to filp->private_data is pointless
>
> The same for ftrace_enable_fops() and ftrace_event_filter_fops() at
> least. The users of event_file_data() do not use ->private_data.
>

Aren't "ftrace_enable_fops" and "ftrace_event_filter_fops" structures?
About event_file_data() I think that the callers uses the
private_data. So, we have to analyze better.

> OTOH, say, trace_format_open() doesn't check tracing_disabled, so
>
>> We could add a tracing_is_disabled() function to test instead.
>
> perhaps it can have more callers.
>

static int trace_format_open(struct inode *inode, struct file *file)
{
    struct seq_file *m;
    int ret;

    ret = seq_open(file, &trace_format_seq_ops);
    if (ret < 0)
        return ret;

    m = file->private_data;
    m->private = file;

    return 0;
}

I really got confused here. The 'm' assignments are, to me, pointless.

> Oleg.
>
--
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