diff mbox series

samples: disable CONFIG_SAMPLES for UML

Message ID 1537243113-1710-1-git-send-email-yamada.masahiro@socionext.com
State Not Applicable
Headers show
Series samples: disable CONFIG_SAMPLES for UML | expand

Commit Message

Masahiro Yamada Sept. 18, 2018, 3:58 a.m. UTC
Some samples require headers installation, so commit 3fca1700c4c3
("kbuild: make samples really depend on headers_install") added
such dependency in the top Makefile.  However, UML fails to build
with CONFIG_SAMPLES=y because UML does not support headers_install.

Fixes: 3fca1700c4c3 ("kbuild: make samples really depend on headers_install")
Reported-by: Kees Cook <keescook@chromium.org>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 samples/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Richard Weinberger Sept. 18, 2018, 8:21 a.m. UTC | #1
Am Dienstag, 18. September 2018, 05:58:33 CEST schrieb Masahiro Yamada:
> Some samples require headers installation, so commit 3fca1700c4c3
> ("kbuild: make samples really depend on headers_install") added
> such dependency in the top Makefile.  However, UML fails to build
> with CONFIG_SAMPLES=y because UML does not support headers_install.
> 
> Fixes: 3fca1700c4c3 ("kbuild: make samples really depend on headers_install")
> Reported-by: Kees Cook <keescook@chromium.org>
> Cc: David Howells <dhowells@redhat.com>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Is there anything UML can do better?
Not sure whether an arch like is supposed to install headers at all,
I guess no. :)

Thanks,
//richard
Anton Ivanov Sept. 18, 2018, 8:28 a.m. UTC | #2
On 09/18/18 09:21, Richard Weinberger wrote:
> Am Dienstag, 18. September 2018, 05:58:33 CEST schrieb Masahiro Yamada:
>> Some samples require headers installation, so commit 3fca1700c4c3
>> ("kbuild: make samples really depend on headers_install") added
>> such dependency in the top Makefile.  However, UML fails to build
>> with CONFIG_SAMPLES=y because UML does not support headers_install.
>>
>> Fixes: 3fca1700c4c3 ("kbuild: make samples really depend on headers_install")
>> Reported-by: Kees Cook <keescook@chromium.org>
>> Cc: David Howells <dhowells@redhat.com>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Is there anything UML can do better?
> Not sure whether an arch like is supposed to install headers at all,
> I guess no. :)

As a side note.

OpenWRT/LEDE patches for their build tree patch UML to do so when 
building UML. IMHO it is a hack, but it works.

A.

>
> Thanks,
> //richard
>
>
>
> _______________________________________________
> linux-um mailing list
> linux-um@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-um
>
Masahiro Yamada Sept. 19, 2018, 6:58 a.m. UTC | #3
Hi.

2018-09-18 17:21 GMT+09:00 Richard Weinberger <richard@nod.at>:
> Am Dienstag, 18. September 2018, 05:58:33 CEST schrieb Masahiro Yamada:
>> Some samples require headers installation, so commit 3fca1700c4c3
>> ("kbuild: make samples really depend on headers_install") added
>> such dependency in the top Makefile.  However, UML fails to build
>> with CONFIG_SAMPLES=y because UML does not support headers_install.
>>
>> Fixes: 3fca1700c4c3 ("kbuild: make samples really depend on headers_install")
>> Reported-by: Kees Cook <keescook@chromium.org>
>> Cc: David Howells <dhowells@redhat.com>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>
> Is there anything UML can do better?
> Not sure whether an arch like is supposed to install headers at all,
> I guess no. :)

I just thought suppressing CONFIG_SAMPLES was a big hammer.

We could install host-arch headers for UML if we like,
but I am not sure whether is is sensible...

Wait for comments in case somebody has a better solution.
Masahiro Yamada Sept. 28, 2018, 6:55 a.m. UTC | #4
2018年9月19日(水) 15:58 Masahiro Yamada <yamada.masahiro@socionext.com>:
>
> Hi.
>
> 2018-09-18 17:21 GMT+09:00 Richard Weinberger <richard@nod.at>:
> > Am Dienstag, 18. September 2018, 05:58:33 CEST schrieb Masahiro Yamada:
> >> Some samples require headers installation, so commit 3fca1700c4c3
> >> ("kbuild: make samples really depend on headers_install") added
> >> such dependency in the top Makefile.  However, UML fails to build
> >> with CONFIG_SAMPLES=y because UML does not support headers_install.
> >>
> >> Fixes: 3fca1700c4c3 ("kbuild: make samples really depend on headers_install")
> >> Reported-by: Kees Cook <keescook@chromium.org>
> >> Cc: David Howells <dhowells@redhat.com>
> >> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> >
> > Is there anything UML can do better?
> > Not sure whether an arch like is supposed to install headers at all,
> > I guess no. :)
>
> I just thought suppressing CONFIG_SAMPLES was a big hammer.
>
> We could install host-arch headers for UML if we like,
> but I am not sure whether is is sensible...
>
> Wait for comments in case somebody has a better solution.
>


I started to think this is a wrong hack.


I posted a different solution:
https://patchwork.kernel.org/patch/10619043/
Masahiro Yamada Oct. 9, 2018, 2:56 p.m. UTC | #5
On Tue, Sep 18, 2018 at 12:59 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> Some samples require headers installation, so commit 3fca1700c4c3
> ("kbuild: make samples really depend on headers_install") added
> such dependency in the top Makefile.  However, UML fails to build
> with CONFIG_SAMPLES=y because UML does not support headers_install.
>
> Fixes: 3fca1700c4c3 ("kbuild: make samples really depend on headers_install")
> Reported-by: Kees Cook <keescook@chromium.org>
> Cc: David Howells <dhowells@redhat.com>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---

I did not get any more comment.
I applied to linux-kbuild/fixes.



>
>  samples/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/samples/Kconfig b/samples/Kconfig
> index bd133ef..ad1ec701 100644
> --- a/samples/Kconfig
> +++ b/samples/Kconfig
> @@ -1,5 +1,6 @@
>  menuconfig SAMPLES
>         bool "Sample kernel code"
> +       depends on !UML
>         help
>           You can build and test sample kernel code here.
>
> --
> 2.7.4
>
diff mbox series

Patch

diff --git a/samples/Kconfig b/samples/Kconfig
index bd133ef..ad1ec701 100644
--- a/samples/Kconfig
+++ b/samples/Kconfig
@@ -1,5 +1,6 @@ 
 menuconfig SAMPLES
 	bool "Sample kernel code"
+	depends on !UML
 	help
 	  You can build and test sample kernel code here.