linux-audit.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Richard Guy Briggs <rgb@redhat.com>
To: Markos Chandras <Markos.Chandras@imgtec.com>
Cc: linux-arch@vger.kernel.org, linux-mips@linux-mips.org,
	user-mode-linux-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, oleg@redhat.com,
	linux-audit@redhat.com
Subject: Re: [PATCH 1/6][RFC] syscall: define syscall_get_arch() for each audit-supported arch
Date: Thu, 6 Mar 2014 14:55:10 -0500	[thread overview]
Message-ID: <20140306195510.GA16640@madcap2.tricolour.ca> (raw)
In-Reply-To: <531833F0.8080300@imgtec.com>

On 14/03/06, Markos Chandras wrote:
> Hi Richard,

Hi Markos,

> On 03/05/2014 09:27 PM, Richard Guy Briggs wrote:
> >Each arch that supports audit requires syscall_get_arch() to able to log and
> >identify architecture-dependent syscall numbers.  The information is used in at
> >least two different subsystems, so standardize it in the same call across all
> >arches.
> >
> >Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
> >
> >---
> >diff --git a/arch/mips/include/asm/syscall.h b/arch/mips/include/asm/syscall.h
> >index 81c8913..41ecde4 100644
> >--- a/arch/mips/include/asm/syscall.h
> >+++ b/arch/mips/include/asm/syscall.h
> >@@ -103,7 +103,7 @@ extern const unsigned long sysn32_call_table[];
> >
> >  static inline int __syscall_get_arch(void)
> >  {
> >-	int arch = EM_MIPS;
> >+	int arch = AUDIT_ARCH_MIPS;
> >  #ifdef CONFIG_64BIT
> >  	arch |=  __AUDIT_ARCH_64BIT;
> >  #endif
> >@@ -113,4 +113,10 @@ static inline int __syscall_get_arch(void)
> >  	return arch;
> >  }
> >
> >+static inline int syscall_get_arch(struct task_struct *task,
> >+				   struct pt_regs *regs)
> >+{
> >+	return __syscall_get_arch();
> >+}
> >+
> >  #endif	/* __ASM_MIPS_SYSCALL_H */
> 
> This is already fixed for MIPS
> 
> http://patchwork.linux-mips.org/patch/6398/
> 
> The code is in linux-next targeting 3.15 as far as I can tell.

Ok, good to see that it is pretty much the same approach.

My patchset is based on 3.13 (as I assume this patch is), so that
conflict will be sorted out once I add to linux-next...

> markos

- RGB

--
Richard Guy Briggs <rbriggs@redhat.com>
Senior Software Engineer, Kernel Security, AMER ENG Base Operating Systems, Red Hat
Remote, Ottawa, Canada
Voice: +1.647.777.2635, Internal: (81) 32635, Alt: +1.613.693.0684x3545

  reply	other threads:[~2014-03-06 19:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05 21:27 [PATCH 0/6][RFC] audit: standardize and simplify syscall_get_arch() Richard Guy Briggs
2014-03-05 21:27 ` [PATCH 1/6][RFC] syscall: define syscall_get_arch() for each audit-supported arch Richard Guy Briggs
2014-03-05 22:33   ` Richard Guy Briggs
2014-03-06  8:38   ` Markos Chandras
2014-03-06 19:55     ` Richard Guy Briggs [this message]
2014-03-05 21:27 ` [PATCH 2/6][RFC] audit: add arch field to seccomp event log Richard Guy Briggs
2014-03-05 21:27 ` [PATCH 3/6][RFC] audit: __audit_syscall_entry: ignore arch arg and call syscall_get_arch() directly Richard Guy Briggs
2014-03-05 21:27 ` [PATCH 4/6][RFC] audit: drop arch from audit_syscall_entry() interface Richard Guy Briggs
2014-03-05 21:27 ` [PATCH 5/6][RFC] audit: drop args from syscall_get_arch() interface Richard Guy Briggs
2014-03-05 21:27 ` [PATCH 6/6][RFC] audit: drop arch from __audit_syscall_entry() interface Richard Guy Briggs

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=20140306195510.GA16640@madcap2.tricolour.ca \
    --to=rgb@redhat.com \
    --cc=Markos.Chandras@imgtec.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=oleg@redhat.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).