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: <X7aXh3wivkz4tEMm@alley>
Date:   Thu, 19 Nov 2020 17:04:23 +0100
From:   Petr Mladek <pmladek@...e.com>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     linux-kernel@...r.kernel.org,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...nel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Jiri Kosina <jikos@...nel.org>, Miroslav Benes <mbenes@...e.cz>
Subject: Re: [PATCH 1/3 v7] ftrace: Have the callbacks receive a struct
 ftrace_regs instead of pt_regs

On Thu 2020-11-19 09:07:58, Steven Rostedt wrote:
> On Thu, 19 Nov 2020 12:05:44 +0100
> Petr Mladek <pmladek@...e.com> wrote:
> 
> > >  void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip,
> > > -			   struct ftrace_ops *ops, struct pt_regs *regs)
> > > +			   struct ftrace_ops *ops, struct ftrace_regs *fregs)
> > >  {
> > >  	int bit;
> > >  	bool lr_saver = false;
> > >  	struct kprobe *p;
> > >  	struct kprobe_ctlblk *kcb;
> > > +	struct pt_regs *regs;
> > >  
> > >  	bit = ftrace_test_recursion_trylock(ip, parent_ip);
> > >  	if (bit < 0)
> > >  		return;
> > >  
> > > +	regs = ftrace_get_regs(fregs);  
> > 
> > Should we check for NULL here?
> > Same in all callers?
> 
> If regs is NULL that's a major bug.
> 
> It's no different than what we have today. If you set FL_SAVE_REGS, then
> the regs parameter will have regs. If you don't, it will be NULL. We don't
> check regs for NULL today, so we shouldn't need to check regs for NULL with
> this.
> 
> One of my bootup tests checks if this works. I work hard to make sure that
> regs is set for everything that wants it, otherwise bad things happen.
> 
> In other words, the functionality in this regard hasn't changed with this
> patch.

Thanks for explanation. Feel free to use:

Acked-by: Petr Mladek <pmladek@...e.com>

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ