Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1559967

Re: [PATCH V2] audit: log 32-bit socketcalls

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH V2] audit: log 32-bit socketcalls
Date 2017-01-16 19:40 +0100
Message-ID <t0kme-4kY-3@gated-at.bofh.it> (permalink)
References <sZ6Or-7I1-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Richard Guy Briggs <rgb@redhat.com>
Date: Fri, 13 Jan 2017 04:51:48 -0500

> diff --git a/include/linux/audit.h b/include/linux/audit.h
> index 9d4443f..43d8003 100644
> --- a/include/linux/audit.h
> +++ b/include/linux/audit.h
> @@ -387,6 +387,18 @@ static inline int audit_socketcall(int nargs, unsigned long *args)
>  		return __audit_socketcall(nargs, args);
>  	return 0;
>  }
> +static inline int audit_socketcall_compat(int nargs, u32 *args)
> +{

Please put an empty line between function definitions.

> +	if (unlikely(!audit_dummy_context())) {
> +		int i;
> +		unsigned long a[AUDITSC_ARGS];

Please order local variable declarations from longest to shortest line.

> +
> +		for (i=0; i<nargs; i++)

Please put a space around operators such as "=" and "<".

> +			a[i] = (unsigned long)args[i];
> +		return __audit_socketcall(nargs, a);
> +	}
> +	return 0;
> +}
>  static inline int audit_sockaddr(int len, void *addr)

Again, empty line between function definitions please.

> @@ -781,14 +782,24 @@ COMPAT_SYSCALL_DEFINE5(recvmmsg, int, fd, struct compat_mmsghdr __user *, mmsg,
>  
>  COMPAT_SYSCALL_DEFINE2(socketcall, int, call, u32 __user *, args)
>  {
> +	unsigned int len;
>  	int ret;
> -	u32 a[6];
> +	u32 a[AUDITSC_ARGS];
>  	u32 a0, a1;

Longest to shortest line for local variable declarations please.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V2] audit: log 32-bit socketcalls Richard Guy Briggs <rgb@redhat.com> - 2017-01-13 11:00 +0100
  Re: [PATCH V2] audit: log 32-bit socketcalls Eric Paris <eparis@redhat.com> - 2017-01-13 15:50 +0100
    Re: [PATCH V2] audit: log 32-bit socketcalls Richard Guy Briggs <rgb@redhat.com> - 2017-01-13 16:10 +0100
      Re: [PATCH V2] audit: log 32-bit socketcalls Eric Paris <eparis@redhat.com> - 2017-01-13 16:20 +0100
        Re: [PATCH V2] audit: log 32-bit socketcalls Richard Guy Briggs <rgb@redhat.com> - 2017-01-13 16:30 +0100
    Re: [PATCH V2] audit: log 32-bit socketcalls Paul Moore <paul@paul-moore.com> - 2017-01-16 21:10 +0100
      Re: [PATCH V2] audit: log 32-bit socketcalls Richard Guy Briggs <rgb@redhat.com> - 2017-01-17 05:00 +0100
        Re: [PATCH V2] audit: log 32-bit socketcalls Paul Moore <paul@paul-moore.com> - 2017-01-17 15:10 +0100
  Re: [PATCH V2] audit: log 32-bit socketcalls David Miller <davem@davemloft.net> - 2017-01-16 19:40 +0100
    Re: [PATCH V2] audit: log 32-bit socketcalls Paul Moore <paul@paul-moore.com> - 2017-01-16 21:40 +0100
      Re: [PATCH V2] audit: log 32-bit socketcalls David Miller <davem@davemloft.net> - 2017-01-16 23:00 +0100
    Re: [PATCH V2] audit: log 32-bit socketcalls Richard Guy Briggs <rgb@redhat.com> - 2017-01-17 05:10 +0100

csiph-web