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: <2125299316.352.1561398656224.JavaMail.zimbra@efficios.com>
Date:   Mon, 24 Jun 2019 13:50:56 -0400 (EDT)
From:   Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To:     "Joel Fernandes, Google" <joel@...lfernandes.org>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        "Frank Ch. Eigler" <fche@...hat.com>, Jessica Yu <jeyu@...nel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>, jikos <jikos@...nel.org>,
        mbenes <mbenes@...e.cz>, Petr Mladek <pmladek@...e.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Robert Richter <rric@...nel.org>,
        rostedt <rostedt@...dmis.org>, Ingo Molnar <mingo@...hat.com>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        paulmck <paulmck@...ux.ibm.com>,
        Ard Biesheuvel <ard.biesheuvel@...aro.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        oprofile-list <oprofile-list@...ts.sf.net>,
        netdev <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>
Subject: Re: [PATCH 2/3] module: Fix up module_notifier return values.

----- On Jun 24, 2019, at 11:52 AM, Joel Fernandes, Google joel@...lfernandes.org wrote:

> On Mon, Jun 24, 2019 at 10:01:04AM -0400, Mathieu Desnoyers wrote:
>> ----- On Jun 24, 2019, at 5:18 AM, Peter Zijlstra peterz@...radead.org wrote:
>> 
>> > While auditing all module notifiers I noticed a whole bunch of fail
>> > wrt the return value. Notifiers have a 'special' return semantics.
>> > 
>> > Cc: Robert Richter <rric@...nel.org>
>> > Cc: Steven Rostedt <rostedt@...dmis.org>
>> > Cc: Ingo Molnar <mingo@...hat.com>
>> > Cc: Alexei Starovoitov <ast@...nel.org>
>> > Cc: Daniel Borkmann <daniel@...earbox.net>
>> > Cc: Martin KaFai Lau <kafai@...com>
>> > Cc: Song Liu <songliubraving@...com>
>> > Cc: Yonghong Song <yhs@...com>
>> > Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
>> > Cc: "Paul E. McKenney" <paulmck@...ux.ibm.com>
>> > Cc: "Joel Fernandes (Google)" <joel@...lfernandes.org>
>> > Cc: Ard Biesheuvel <ard.biesheuvel@...aro.org>
>> > Cc: Thomas Gleixner <tglx@...utronix.de>
>> > Cc: oprofile-list@...ts.sf.net
>> > Cc: linux-kernel@...r.kernel.org
>> > Cc: netdev@...r.kernel.org
>> > Cc: bpf@...r.kernel.org
>> > Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
>> 
>> Thanks Peter for looking into this, especially considering your
>> endless love for kernel modules! ;)
>> 
>> It's not directly related to your changes, but I notice that
>> kernel/trace/trace_printk.c:hold_module_trace_bprintk_format()
>> appears to leak memory. Am I missing something ?
> 
> Could you elaborate? Do you mean there is no MODULE_STATE_GOING notifier
> check? If that's what you mean then I agree, there should be some place
> where the format structures are freed when the module is unloaded no?

Yes, the lack of GOING notifier is worrying considering that GOING
performs memory allocation.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ