Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Jeremy Kerr <jk@codeconstruct.com.au>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
	Michal Marek <michal.lkml@markovi.net>,
	netdev@vger.kernel.org, linux-kbuild@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Matt Johnston <matt@codeconstruct.com.au>,
	Andrew Jeffery <andrew@aj.id.au>
Subject: Re: [PATCH net-next v3 01/16] mctp: Add MCTP base
Date: Thu, 12 Aug 2021 11:45:55 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2108121139490.530553@ramsan.of.borg> (raw)
In-Reply-To: <20210723082932.3570396-2-jk@codeconstruct.com.au>

 	Hi Jeremy,

CC kbuild

On Fri, 23 Jul 2021, Jeremy Kerr wrote:
> Add basic Kconfig, an initial (empty) af_mctp source object, and
> {AF,PF}_MCTP definitions, and the required selinux definitions.
>
> Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>

Thanks for your patch, which is now commit bc49d8169aa72295 ("mctp: Add
MCTP base") in net-next.

> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -1330,7 +1330,9 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc
> 			return SECCLASS_SMC_SOCKET;
> 		case PF_XDP:
> 			return SECCLASS_XDP_SOCKET;
> -#if PF_MAX > 45
> +		case PF_MCTP:
> +			return SECCLASS_MCTP_SOCKET;

When building an allmodconfig kernel, I got:

security/selinux/hooks.c: In function 'socket_type_to_security_class':
security/selinux/hooks.c:1334:32: error: 'SECCLASS_MCTP_SOCKET' undeclared (first use in this function); did you mean 'SECCLASS_SCTP_SOCKET'?
  1334 |                         return SECCLASS_MCTP_SOCKET;
       |                                ^~~~~~~~~~~~~~~~~~~~
       |                                SECCLASS_SCTP_SOCKET

> +#if PF_MAX > 46
> #error New address family defined, please update this function.
> #endif
> 		}
> diff --git a/security/selinux/include/classmap.h b/security/selinux/include/classmap.h
> index 62d19bccf3de..084757ff4390 100644
> --- a/security/selinux/include/classmap.h
> +++ b/security/selinux/include/classmap.h
> @@ -246,6 +246,8 @@ struct security_class_mapping secclass_map[] = {
> 	    NULL } },
> 	{ "xdp_socket",
> 	  { COMMON_SOCK_PERMS, NULL } },
> +	{ "mctp_socket",
> +	  { COMMON_SOCK_PERMS, NULL } },
> 	{ "perf_event",
> 	  { "open", "cpu", "kernel", "tracepoint", "read", "write", NULL } },
> 	{ "lockdown",

The needed definition should be auto-generated from the above file, but
there seems to be an issue with the dependencies, as the file was not
regenerated.

Manually removing security/selinux/flask.h in the build dir fixed the
issue.

I'm building in a separate build directory, using make -j 12.

Gr{oetje,eeting}s,

 						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
 							    -- Linus Torvalds

  reply	other threads:[~2021-08-12  9:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23  8:29 [PATCH net-next v3 00/16] Add Management Component Transport Protocol support Jeremy Kerr
2021-07-23  8:29 ` [PATCH net-next v3 01/16] mctp: Add MCTP base Jeremy Kerr
2021-08-12  9:45   ` Geert Uytterhoeven [this message]
2021-08-12 11:15     ` Jeremy Kerr
2021-08-12 11:32       ` Geert Uytterhoeven
2021-10-03 21:08       ` Steven Rostedt
2021-07-23  8:29 ` [PATCH net-next v3 02/16] mctp: Add base socket/protocol definitions Jeremy Kerr
2021-07-23  8:29 ` [PATCH net-next v3 03/16] mctp: Add base packet definitions Jeremy Kerr
2021-07-23  8:29 ` [PATCH net-next v3 04/16] mctp: Add sockaddr_mctp to uapi Jeremy Kerr
2021-07-23  8:29 ` [PATCH net-next v3 05/16] mctp: Add initial driver infrastructure Jeremy Kerr
2021-07-23  8:29 ` [PATCH net-next v3 06/16] mctp: Add device handling and netlink interface Jeremy Kerr
2021-07-23  8:29 ` [PATCH net-next v3 07/16] mctp: Add initial routing framework Jeremy Kerr
2021-07-23  8:29 ` [PATCH net-next v3 08/16] mctp: Add netlink route management Jeremy Kerr
2021-07-23  8:29 ` [PATCH net-next v3 09/16] mctp: Add neighbour implementation Jeremy Kerr
2021-07-23  8:29 ` [PATCH net-next v3 10/16] mctp: Add neighbour netlink interface Jeremy Kerr
2021-07-23  8:29 ` [PATCH net-next v3 11/16] mctp: Populate socket implementation Jeremy Kerr
2021-07-23  8:29 ` [PATCH net-next v3 12/16] mctp: Implement message fragmentation & reassembly Jeremy Kerr
2021-07-23  8:29 ` [PATCH net-next v3 13/16] mctp: Add dest neighbour lladdr to route output Jeremy Kerr
2021-07-23  8:29 ` [PATCH net-next v3 14/16] mctp: Allow per-netns default networks Jeremy Kerr
2021-07-23  8:29 ` [PATCH net-next v3 15/16] mctp: Allow MCTP on tun devices Jeremy Kerr
2021-07-23  8:29 ` [PATCH net-next v3 16/16] mctp: Add MCTP overview document Jeremy Kerr

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=alpine.DEB.2.22.394.2108121139490.530553@ramsan.of.borg \
    --to=geert@linux-m68k.org \
    --cc=andrew@aj.id.au \
    --cc=jk@codeconstruct.com.au \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=matt@codeconstruct.com.au \
    --cc=michal.lkml@markovi.net \
    --cc=netdev@vger.kernel.org \
    --subject='Re: [PATCH net-next v3 01/16] mctp: Add MCTP base' \
    /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

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).