All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selinux: make header files self-including
@ 2023-05-11 12:32 Christian Göttsche
  2023-05-12  2:13 ` kernel test robot
  2023-05-12  9:21 ` [PATCH v2] " Christian Göttsche
  0 siblings, 2 replies; 4+ messages in thread
From: Christian Göttsche @ 2023-05-11 12:32 UTC (permalink / raw)
  To: selinux; +Cc: Paul Moore, Stephen Smalley, Eric Paris, linux-kernel

Include all necessary headers in header files to enable third party
applications, like LSP servers, to resolve all used symbols.

ibpkey.h: include "../flask.h" for SECINITSID_UNLABELED
initial_sid_to_string.h: include <linux/stddef.h> for NULL

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 security/selinux/include/ibpkey.h                | 1 +
 security/selinux/include/initial_sid_to_string.h | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/security/selinux/include/ibpkey.h b/security/selinux/include/ibpkey.h
index c992f83b0aae..f8a791b07092 100644
--- a/security/selinux/include/ibpkey.h
+++ b/security/selinux/include/ibpkey.h
@@ -15,6 +15,7 @@
 #define _SELINUX_IB_PKEY_H
 
 #include <linux/types.h>
+#include "../flask.h"
 
 #ifdef CONFIG_SECURITY_INFINIBAND
 void sel_ib_pkey_flush(void);
diff --git a/security/selinux/include/initial_sid_to_string.h b/security/selinux/include/initial_sid_to_string.h
index 60820517aa43..ecc6e74fa09b 100644
--- a/security/selinux/include/initial_sid_to_string.h
+++ b/security/selinux/include/initial_sid_to_string.h
@@ -1,4 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0 */
+
+#include <linux/stddef.h>
+
 static const char *const initial_sid_to_string[] = {
 	NULL,
 	"kernel",
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] selinux: make header files self-including
  2023-05-11 12:32 [PATCH] selinux: make header files self-including Christian Göttsche
@ 2023-05-12  2:13 ` kernel test robot
  2023-05-12  9:21 ` [PATCH v2] " Christian Göttsche
  1 sibling, 0 replies; 4+ messages in thread
From: kernel test robot @ 2023-05-12  2:13 UTC (permalink / raw)
  To: Christian Göttsche, selinux
  Cc: oe-kbuild-all, Paul Moore, Stephen Smalley, Eric Paris, linux-kernel

Hi Christian,

kernel test robot noticed the following build errors:

[auto build test ERROR on pcmoore-selinux/next]
[also build test ERROR on linus/master v6.4-rc1 next-20230511]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Christian-G-ttsche/selinux-make-header-files-self-including/20230511-203619
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git next
patch link:    https://lore.kernel.org/r/20230511123236.723025-1-cgzones%40googlemail.com
patch subject: [PATCH] selinux: make header files self-including
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20230512/202305121044.Q88iF2NQ-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/2b237d995d423baa5707fe9f59441d4744892eda
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Christian-G-ttsche/selinux-make-header-files-self-including/20230511-203619
        git checkout 2b237d995d423baa5707fe9f59441d4744892eda
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202305121044.Q88iF2NQ-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from security/selinux/ibpkey.c:26:
>> security/selinux/include/ibpkey.h:18:10: fatal error: ../flask.h: No such file or directory
      18 | #include "../flask.h"
         |          ^~~~~~~~~~~~
   compilation terminated.


vim +18 security/selinux/include/ibpkey.h

    16	
    17	#include <linux/types.h>
  > 18	#include "../flask.h"
    19	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] selinux: make header files self-including
  2023-05-11 12:32 [PATCH] selinux: make header files self-including Christian Göttsche
  2023-05-12  2:13 ` kernel test robot
@ 2023-05-12  9:21 ` Christian Göttsche
  2023-05-18 18:14   ` Paul Moore
  1 sibling, 1 reply; 4+ messages in thread
From: Christian Göttsche @ 2023-05-12  9:21 UTC (permalink / raw)
  To: selinux; +Cc: Paul Moore, Stephen Smalley, Eric Paris, linux-kernel

Include all necessary headers in header files to enable third party
applications, like LSP servers, to resolve all used symbols.

ibpkey.h: include "flask.h" for SECINITSID_UNLABELED
initial_sid_to_string.h: include <linux/stddef.h> for NULL

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
v2:
    use raw flask.h instead of ../flask.h
    Link: https://lore.kernel.org/oe-kbuild-all/202305121044.Q88iF2NQ-lkp@intel.com/
---
 security/selinux/include/ibpkey.h                | 1 +
 security/selinux/include/initial_sid_to_string.h | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/security/selinux/include/ibpkey.h b/security/selinux/include/ibpkey.h
index c992f83b0aae..875b055849e1 100644
--- a/security/selinux/include/ibpkey.h
+++ b/security/selinux/include/ibpkey.h
@@ -15,6 +15,7 @@
 #define _SELINUX_IB_PKEY_H
 
 #include <linux/types.h>
+#include "flask.h"
 
 #ifdef CONFIG_SECURITY_INFINIBAND
 void sel_ib_pkey_flush(void);
diff --git a/security/selinux/include/initial_sid_to_string.h b/security/selinux/include/initial_sid_to_string.h
index 60820517aa43..ecc6e74fa09b 100644
--- a/security/selinux/include/initial_sid_to_string.h
+++ b/security/selinux/include/initial_sid_to_string.h
@@ -1,4 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0 */
+
+#include <linux/stddef.h>
+
 static const char *const initial_sid_to_string[] = {
 	NULL,
 	"kernel",
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] selinux: make header files self-including
  2023-05-12  9:21 ` [PATCH v2] " Christian Göttsche
@ 2023-05-18 18:14   ` Paul Moore
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Moore @ 2023-05-18 18:14 UTC (permalink / raw)
  To: Christian Göttsche, selinux
  Cc: Stephen Smalley, Eric Paris, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1616 bytes --]

On May 12, 2023 =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com> wrote:
> 
> Include all necessary headers in header files to enable third party
> applications, like LSP servers, to resolve all used symbols.
> 
> ibpkey.h: include "flask.h" for SECINITSID_UNLABELED
> initial_sid_to_string.h: include <linux/stddef.h> for NULL
> 
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
> ---
> v2:
>     use raw flask.h instead of ../flask.h
>     Link: https://lore.kernel.org/oe-kbuild-all/202305121044.Q88iF2NQ-lkp@intel.com/
> ---
>  security/selinux/include/ibpkey.h                | 1 +
>  security/selinux/include/initial_sid_to_string.h | 3 +++
>  2 files changed, 4 insertions(+)

Merged into selinux/next, thanks.

> diff --git a/security/selinux/include/ibpkey.h b/security/selinux/include/ibpkey.h
> index c992f83b0aae..875b055849e1 100644
> --- a/security/selinux/include/ibpkey.h
> +++ b/security/selinux/include/ibpkey.h
> @@ -15,6 +15,7 @@
>  #define _SELINUX_IB_PKEY_H
>  
>  #include <linux/types.h>
> +#include "flask.h"
>  
>  #ifdef CONFIG_SECURITY_INFINIBAND
>  void sel_ib_pkey_flush(void);
> diff --git a/security/selinux/include/initial_sid_to_string.h b/security/selinux/include/initial_sid_to_string.h
> index 60820517aa43..ecc6e74fa09b 100644
> --- a/security/selinux/include/initial_sid_to_string.h
> +++ b/security/selinux/include/initial_sid_to_string.h
> @@ -1,4 +1,7 @@
>  /* SPDX-License-Identifier: GPL-2.0 */
> +
> +#include <linux/stddef.h>
> +
>  static const char *const initial_sid_to_string[] = {
>  	NULL,
>  	"kernel",
> -- 
> 2.40.1

--
paul-moore.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-18 18:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-11 12:32 [PATCH] selinux: make header files self-including Christian Göttsche
2023-05-12  2:13 ` kernel test robot
2023-05-12  9:21 ` [PATCH v2] " Christian Göttsche
2023-05-18 18:14   ` Paul Moore

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.