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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071026203941.GA15427@martell.zuzino.mipt.ru>
Date:	Sat, 27 Oct 2007 00:39:41 +0400
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Matthew Wilcox <matthew@....cx>, torvalds@...ux-foundation.org,
	linux-kernel@...r.kernel.org, willy@...ux.intel.com,
	Stephane Eranian <eranian@....hp.com>
Subject: Re: [PATCH 2/5] Use macros instead of TASK_ flags

On Fri, Oct 26, 2007 at 11:45:15AM -0700, Andrew Morton wrote:
> On Wed, 24 Oct 2007 08:24:55 -0400
> Matthew Wilcox <matthew@....cx> wrote:
> 
> > Abstracting away direct uses of TASK_ flags allows us to change the
> > definitions of the task flags more easily.

> > --- a/arch/ia64/kernel/perfmon.c
> > +++ b/arch/ia64/kernel/perfmon.c
> > @@ -2631,7 +2631,7 @@ pfm_task_incompatible(pfm_context_t *ctx, struct task_struct *task)
> >  	 */
> >  	if (task == current) return 0;
> >  
> > -	if ((task->state != TASK_STOPPED) && (task->state != TASK_TRACED)) {
> > +	if (!is_task_stopped_or_traced(task)) {
> >  		DPRINT(("cannot attach to non-stopped task [%d] state=%ld\n", task_pid_nr(task), task->state));
> >  		return -EBUSY;
> >  	}
> > @@ -4792,7 +4792,7 @@ recheck:
> >  	 * the task must be stopped.
> >  	 */
> >  	if (PFM_CMD_STOPPED(cmd)) {
> > -		if ((task->state != TASK_STOPPED) && (task->state != TASK_TRACED)) {
> > +		if (!is_task_stopped_or_traced(task)) {
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^

I think this is horrible. Are you going to add full blown static inline
function for every combination of state tests?

> I have dropped this hunk because the file which it is patching is removed
> by the (newly-added-to-mm) git-perfmon.patch.  I can't immediately find any
> corresponding code which was readded in a different place by git-perfmon so
> it looks like this code was simply zapped.
> 
> Of course, if git-perfmon doesn't merge in 2.6.25 then I'll end up merging
> your patch but accidentally leaving 2.6.25's arch/ia64/kernel/perfmon.c
> unpatched.  It looks like that'll be non-fatal.
> 
> This isn't going to go very well and I might end up having to drop this
> whole patch series and ask for a refactored one.  We'll see.
-
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