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: <20110902163037.GA4808@redhat.com>
Date:	Fri, 2 Sep 2011 18:30:37 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Earl Chew <echew@...acom.com>
Cc:	Alan Cox <alan@...rguk.ukuu.org.uk>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
	"andi@...stfloor.org" <andi@...stfloor.org>
Subject: Re: [PATCH 1/1 v2]: coredump: use current->group_leader->comm
	instead of current->comm

On 09/01, Earl Chew wrote:
>
> > In your view, but there is a better way to do this - add a new case and
> > letter for the behaviour you want. That way you don't break anyone elses
> > defaults and expectation and people can set a corepattern dependant upon
> > the group leader.
>
> Ok.
>
>
> The patterns %n or %N are the same as %e and %E except that they
> use current->group_leader->comm instead of current->comm.

I simply do not know what is better. Alan has a point imho, "might
break stuff" is true.

OTOH, %p always reports tgid, not tid...

But in fact I do not understand the "Using current->group_leader->comm
makes the name of the core file more consistent" part. Why ?

> A core dump can be triggered from any task in a group,

Indeed. The important case is the private/synchronous signals like
SIGSEGV, you can see the name of the thread which triggered the crash.


> -static int cn_print_exe_file(struct core_name *cn)
> +static int cn_print_exe_file(struct core_name *cn, const char *comm)
>  {
>  	struct file *exe_file;
>  	char *pathbuf, *path;
> @@ -1679,7 +1679,7 @@ static int cn_print_exe_file(struct core
>  	exe_file = get_mm_exe_file(current->mm);
>  	if (!exe_file) {
>  		char *commstart = cn->corename + cn->used;
> -		ret = cn_printf(cn, "%s (path unknown)", current->comm);
> +		ret = cn_printf(cn, "%s (path unknown)", comm);

Imho, this is overkill. This is only used if get_mm_exe_file() fails,
I don't think this deserves another option. And may be we can use
group_leader->comm, this is per-process thing anyway.

But I won't insist, I agree either way.

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