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]
Date:	Tue, 21 Jun 2011 09:24:15 +0200
From:	Tejun Heo <tj@...nel.org>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	torvalds@...ux-foundation.org, hch@...radead.org
Subject: Re: [PATCH 5/7] ptrace: kill clone/exec tracehooks

Hello,

On Mon, Jun 20, 2011 at 10:33 PM, Oleg Nesterov <oleg@...hat.com> wrote:
>> +     if (likely(user_mode(regs)) && !(clone_flags & CLONE_UNTRACED)) {
>
> Off-topic, but I never understood this user_mode() check... OK, a
> traced task can call kernel_thread() in kernel, but this used
> CLONE_UNTRACED.

Me neither.  I suppose it's added as a safety net.  Maybe we can turn
it into WARN_ON(!user_mode) && !CLONE_UNTRACED) but just leaving it
alone doesn't sound like a bad idea.

>> +             if (clone_flags & CLONE_VFORK)
>> +                     trace = PTRACE_EVENT_VFORK;
>> +             else if ((clone_flags & CSIGNAL) != SIGCHLD)
>> +                     trace = PTRACE_EVENT_CLONE;
>> +             else
>> +                     trace = PTRACE_EVENT_FORK;
>> +
>> +             if (likely(!ptrace_event_enabled(current, trace)))
>> +                     trace = 0;
>> +     }
>
> As I said am going to apply this all except 6/7, but imho this
> deserves a trivial helper anyway.

Yeah, maybe.  Preference, I guess.

Thanks.

-- 
tejun
--
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