All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: <jmlatten@linux.vnet.ibm.com>, <herbert@gondor.apana.org.au>,
	<davem@davemloft.net>, <netdev@vger.kernel.org>
Subject: Re: [PATCH] xfrm: Remove useless secid field from xfrm_audit.
Date: Tue, 22 Apr 2014 14:02:56 +0200	[thread overview]
Message-ID: <20140422120256.GT32371@secunet.com> (raw)
In-Reply-To: <201404190100.IJG17653.VOSHJMtFQFOLOF@I-love.SAKURA.ne.jp>

On Sat, Apr 19, 2014 at 01:00:27AM +0900, Tetsuo Handa wrote:
> >From 049fe797638a75b902b5c7bb845f6320bc0b47f6 Mon Sep 17 00:00:00 2001
> From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Date: Fri, 18 Apr 2014 16:23:46 +0900
> Subject: [PATCH] xfrm: Remove useless secid field from xfrm_audit.
> 
> It seems to me that commit ab5f5e8b "[XFRM]: xfrm audit calls" is doing
> something strange at xfrm_audit_helper_usrinfo().
> If secid != 0 && security_secid_to_secctx(secid) != 0, the caller calls
> audit_log_task_context() which basically does
> secid != 0 && security_secid_to_secctx(secid) == 0 case
> except that secid is obtained from current thread's context.
> 
> Oh, what happens if secid passed to xfrm_audit_helper_usrinfo() was
> obtained from other thread's context? It might audit current thread's
> context rather than other thread's context if security_secid_to_secctx()
> in xfrm_audit_helper_usrinfo() failed for some reason.
> 
> Then, are all the caller of xfrm_audit_helper_usrinfo() passing either
> secid obtained from current thread's context or secid == 0?
> It seems to me that they are.
> 
> If I didn't miss something, we don't need to pass secid to
> xfrm_audit_helper_usrinfo() because audit_log_task_context() will
> obtain secid from current thread's context.

Yes, looks like that.

Applied to the ipsec-next tree.

Thanks!

  reply	other threads:[~2014-04-22 12:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-18 16:00 [PATCH] xfrm: Remove useless secid field from xfrm_audit Tetsuo Handa
2014-04-22 12:02 ` Steffen Klassert [this message]
2014-04-22 12:48   ` Tetsuo Handa
2014-04-24 10:55     ` Steffen Klassert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140422120256.GT32371@secunet.com \
    --to=steffen.klassert@secunet.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=jmlatten@linux.vnet.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.