diff mbox

build: save generated config in /boot

Message ID 1450474548-26428-1-git-send-email-cardoe@cardoe.com (mailing list archive)
State New, archived
Headers show

Commit Message

Douglas Goldstein Dec. 18, 2015, 9:35 p.m. UTC
Since we now support changing Xen options with Kconfig, we should save
the configuration that was used to build up Xen. This will save it in
/boot alongside the installed xen.gz and call it
xen-$(FULLVERSION).config

Suggested-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
---
 xen/Makefile | 1 +
 1 file changed, 1 insertion(+)

Comments

Jan Beulich Dec. 21, 2015, 12:11 p.m. UTC | #1
>>> On 18.12.15 at 22:35, <cardoe@cardoe.com> wrote:
> Since we now support changing Xen options with Kconfig, we should save
> the configuration that was used to build up Xen. This will save it in
> /boot alongside the installed xen.gz and call it
> xen-$(FULLVERSION).config
> 
> Suggested-by: Ian Campbell <ian.campbell@citrix.com>
> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
> ---
>  xen/Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/xen/Makefile b/xen/Makefile
> index 9023863..460b977 100644
> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -58,6 +58,7 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
>  	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
>  	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
>  	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
> +	$(INSTALL_DATA) $(KCONFIG_CONFIG) $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION).config

Was it really suggested to put this into /boot? It has no business
being there...

Jan
Andrew Cooper Dec. 21, 2015, 12:40 p.m. UTC | #2
On 21/12/15 12:11, Jan Beulich wrote:
>>>> On 18.12.15 at 22:35, <cardoe@cardoe.com> wrote:
>> Since we now support changing Xen options with Kconfig, we should save
>> the configuration that was used to build up Xen. This will save it in
>> /boot alongside the installed xen.gz and call it
>> xen-$(FULLVERSION).config
>>
>> Suggested-by: Ian Campbell <ian.campbell@citrix.com>
>> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
>> ---
>>  xen/Makefile | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/xen/Makefile b/xen/Makefile
>> index 9023863..460b977 100644
>> --- a/xen/Makefile
>> +++ b/xen/Makefile
>> @@ -58,6 +58,7 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
>>  	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
>>  	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
>>  	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
>> +	$(INSTALL_DATA) $(KCONFIG_CONFIG) $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION).config
> Was it really suggested to put this into /boot? It has no business
> being there...

A typical Linux has:

andrewcoop@andrewcoop:/local/xen.git/xen$ ls -lA /boot/
total 21044
-rw-r--r--  1 root root   157726 Dec 15 15:40 config-3.16.0-4-amd64
drwxr-xr-x  5 root root     4096 Dec 18 07:53 grub
-rw-r--r--  1 root root 15535038 Dec 18 07:52 initrd.img-3.16.0-4-amd64
drwx------  2 root root    16384 Oct 19 11:11 lost+found
-rw-r--r--  1 root root  2676277 Dec 15 15:40 System.map-3.16.0-4-amd64
-rw-r--r--  1 root root  3118928 Dec 15 15:37 vmlinuz-3.16.0-4-amd64

which at the very least is consistent between Debian and RHEL derivatives.

IMO, doing the same for Xen is sensible.

~Andrew
Jan Beulich Dec. 21, 2015, 12:53 p.m. UTC | #3
>>> On 21.12.15 at 13:40, <andrew.cooper3@citrix.com> wrote:
> On 21/12/15 12:11, Jan Beulich wrote:
>>>>> On 18.12.15 at 22:35, <cardoe@cardoe.com> wrote:
>>> Since we now support changing Xen options with Kconfig, we should save
>>> the configuration that was used to build up Xen. This will save it in
>>> /boot alongside the installed xen.gz and call it
>>> xen-$(FULLVERSION).config
>>>
>>> Suggested-by: Ian Campbell <ian.campbell@citrix.com>
>>> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
>>> ---
>>>  xen/Makefile | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/xen/Makefile b/xen/Makefile
>>> index 9023863..460b977 100644
>>> --- a/xen/Makefile
>>> +++ b/xen/Makefile
>>> @@ -58,6 +58,7 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
>>>  	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
>>>  	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
>>>  	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
>>> +	$(INSTALL_DATA) $(KCONFIG_CONFIG) 
> $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION).config
>> Was it really suggested to put this into /boot? It has no business
>> being there...
> 
> A typical Linux has:
> 
> andrewcoop@andrewcoop:/local/xen.git/xen$ ls -lA /boot/
> total 21044
> -rw-r--r--  1 root root   157726 Dec 15 15:40 config-3.16.0-4-amd64
> drwxr-xr-x  5 root root     4096 Dec 18 07:53 grub
> -rw-r--r--  1 root root 15535038 Dec 18 07:52 initrd.img-3.16.0-4-amd64
> drwx------  2 root root    16384 Oct 19 11:11 lost+found
> -rw-r--r--  1 root root  2676277 Dec 15 15:40 System.map-3.16.0-4-amd64
> -rw-r--r--  1 root root  3118928 Dec 15 15:37 vmlinuz-3.16.0-4-amd64
> 
> which at the very least is consistent between Debian and RHEL derivatives.
> 
> IMO, doing the same for Xen is sensible.

I'm afraid I have to disagree - just because Linux does things a
certain way doesn't mean that the only (sensible) way. Imo /boot
should hold exclusively stuff needed for booting. Remember how
we moved xen-syms out of there not so long ago? You could have
objected to that change too, considering that Linux puts
System.map and sometimes also the uncompressed vmlinux there.
Yet I think it was a correct move, and the change here should
follow that model instead of Linux'es.

Jan
Douglas Goldstein Dec. 21, 2015, 2:35 p.m. UTC | #4
On 12/21/15 6:11 AM, Jan Beulich wrote:
>>>> On 18.12.15 at 22:35, <cardoe@cardoe.com> wrote:
>> Since we now support changing Xen options with Kconfig, we should save
>> the configuration that was used to build up Xen. This will save it in
>> /boot alongside the installed xen.gz and call it
>> xen-$(FULLVERSION).config
>>
>> Suggested-by: Ian Campbell <ian.campbell@citrix.com>
>> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
>> ---
>>  xen/Makefile | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/xen/Makefile b/xen/Makefile
>> index 9023863..460b977 100644
>> --- a/xen/Makefile
>> +++ b/xen/Makefile
>> @@ -58,6 +58,7 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
>>  	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
>>  	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
>>  	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
>> +	$(INSTALL_DATA) $(KCONFIG_CONFIG) $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION).config
> 
> Was it really suggested to put this into /boot? It has no business
> being there...
> 
> Jan
> 

Yes. By multiple people. Ian Campbell was the first person to suggest it
in that location.
Jan Beulich Dec. 21, 2015, 2:51 p.m. UTC | #5
>>> On 21.12.15 at 15:35, <cardoe@cardoe.com> wrote:
> On 12/21/15 6:11 AM, Jan Beulich wrote:
>>>>> On 18.12.15 at 22:35, <cardoe@cardoe.com> wrote:
>>> Since we now support changing Xen options with Kconfig, we should save
>>> the configuration that was used to build up Xen. This will save it in
>>> /boot alongside the installed xen.gz and call it
>>> xen-$(FULLVERSION).config
>>>
>>> Suggested-by: Ian Campbell <ian.campbell@citrix.com>
>>> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
>>> ---
>>>  xen/Makefile | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/xen/Makefile b/xen/Makefile
>>> index 9023863..460b977 100644
>>> --- a/xen/Makefile
>>> +++ b/xen/Makefile
>>> @@ -58,6 +58,7 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
>>>  	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
>>>  	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
>>>  	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
>>> +	$(INSTALL_DATA) $(KCONFIG_CONFIG) 
> $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION).config
>> 
>> Was it really suggested to put this into /boot? It has no business
>> being there...
> 
> Yes. By multiple people. Ian Campbell was the first person to suggest it
> in that location.

Okay, so I've looked it up, and no, he didn't. He just gave this as one
possibility:

"It occurred to me this morning that we probably ought to stash the .config
 somewhere on install in such a way that it can be associated with the Xen
 binary (i.e. with the same full suffix as the binary itself, not the
 abridged symlink names), maybe as $(BOOT_DIR)/$(T)-
 $(XEN_FULLVERSION).config?"

But yes, I'm sorry for not noticing this as an undesirable place right
away.

Jan
Douglas Goldstein Dec. 21, 2015, 3:20 p.m. UTC | #6
On 12/21/15 8:51 AM, Jan Beulich wrote:
>>>> On 21.12.15 at 15:35, <cardoe@cardoe.com> wrote:
>> On 12/21/15 6:11 AM, Jan Beulich wrote:
>>>>>> On 18.12.15 at 22:35, <cardoe@cardoe.com> wrote:
>>>> Since we now support changing Xen options with Kconfig, we should save
>>>> the configuration that was used to build up Xen. This will save it in
>>>> /boot alongside the installed xen.gz and call it
>>>> xen-$(FULLVERSION).config
>>>>
>>>> Suggested-by: Ian Campbell <ian.campbell@citrix.com>
>>>> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
>>>> ---
>>>>  xen/Makefile | 1 +
>>>>  1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/xen/Makefile b/xen/Makefile
>>>> index 9023863..460b977 100644
>>>> --- a/xen/Makefile
>>>> +++ b/xen/Makefile
>>>> @@ -58,6 +58,7 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
>>>>  	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
>>>>  	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
>>>>  	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
>>>> +	$(INSTALL_DATA) $(KCONFIG_CONFIG) 
>> $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION).config
>>>
>>> Was it really suggested to put this into /boot? It has no business
>>> being there...
>>
>> Yes. By multiple people. Ian Campbell was the first person to suggest it
>> in that location.
> 
> Okay, so I've looked it up, and no, he didn't. He just gave this as one
> possibility:
> 
> "It occurred to me this morning that we probably ought to stash the .config
>  somewhere on install in such a way that it can be associated with the Xen
>  binary (i.e. with the same full suffix as the binary itself, not the
>  abridged symlink names), maybe as $(BOOT_DIR)/$(T)-
>  $(XEN_FULLVERSION).config?"
> 
> But yes, I'm sorry for not noticing this as an undesirable place right
> away.
> 
> Jan
> 
> 

Ok well I'm at a loss here because the quote clearly shows him
suggesting that location. Do you have a suggested location because so
far I've just got a no from you on the only suggested location.
Jan Beulich Dec. 21, 2015, 3:35 p.m. UTC | #7
>>> On 21.12.15 at 16:20, <cardoe@cardoe.com> wrote:
> On 12/21/15 8:51 AM, Jan Beulich wrote:
>>>>> On 21.12.15 at 15:35, <cardoe@cardoe.com> wrote:
>>> On 12/21/15 6:11 AM, Jan Beulich wrote:
>>>>>>> On 18.12.15 at 22:35, <cardoe@cardoe.com> wrote:
>>>>> Since we now support changing Xen options with Kconfig, we should save
>>>>> the configuration that was used to build up Xen. This will save it in
>>>>> /boot alongside the installed xen.gz and call it
>>>>> xen-$(FULLVERSION).config
>>>>>
>>>>> Suggested-by: Ian Campbell <ian.campbell@citrix.com>
>>>>> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
>>>>> ---
>>>>>  xen/Makefile | 1 +
>>>>>  1 file changed, 1 insertion(+)
>>>>>
>>>>> diff --git a/xen/Makefile b/xen/Makefile
>>>>> index 9023863..460b977 100644
>>>>> --- a/xen/Makefile
>>>>> +++ b/xen/Makefile
>>>>> @@ -58,6 +58,7 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
>>>>>  	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
>>>>>  	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
>>>>>  	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
>>>>> +	$(INSTALL_DATA) $(KCONFIG_CONFIG) 
>>> $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION).config
>>>>
>>>> Was it really suggested to put this into /boot? It has no business
>>>> being there...
>>>
>>> Yes. By multiple people. Ian Campbell was the first person to suggest it
>>> in that location.
>> 
>> Okay, so I've looked it up, and no, he didn't. He just gave this as one
>> possibility:
>> 
>> "It occurred to me this morning that we probably ought to stash the .config
>>  somewhere on install in such a way that it can be associated with the Xen
>>  binary (i.e. with the same full suffix as the binary itself, not the
>>  abridged symlink names), maybe as $(BOOT_DIR)/$(T)-
>>  $(XEN_FULLVERSION).config?"
>> 
>> But yes, I'm sorry for not noticing this as an undesirable place right
>> away.
> 
> Ok well I'm at a loss here because the quote clearly shows him
> suggesting that location. Do you have a suggested location because so
> far I've just got a no from you on the only suggested location.

Match the xen-syms location?

Jan
Douglas Goldstein Dec. 22, 2015, 12:45 p.m. UTC | #8
On 12/21/15 6:53 AM, Jan Beulich wrote:
>>>> On 21.12.15 at 13:40, <andrew.cooper3@citrix.com> wrote:
>> On 21/12/15 12:11, Jan Beulich wrote:
>>>>>> On 18.12.15 at 22:35, <cardoe@cardoe.com> wrote:
>>>> Since we now support changing Xen options with Kconfig, we should save
>>>> the configuration that was used to build up Xen. This will save it in
>>>> /boot alongside the installed xen.gz and call it
>>>> xen-$(FULLVERSION).config
>>>>
>>>> Suggested-by: Ian Campbell <ian.campbell@citrix.com>
>>>> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
>>>> ---
>>>>  xen/Makefile | 1 +
>>>>  1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/xen/Makefile b/xen/Makefile
>>>> index 9023863..460b977 100644
>>>> --- a/xen/Makefile
>>>> +++ b/xen/Makefile
>>>> @@ -58,6 +58,7 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
>>>>  	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
>>>>  	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
>>>>  	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
>>>> +	$(INSTALL_DATA) $(KCONFIG_CONFIG) 
>> $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION).config
>>> Was it really suggested to put this into /boot? It has no business
>>> being there...
>>
>> A typical Linux has:
>>
>> andrewcoop@andrewcoop:/local/xen.git/xen$ ls -lA /boot/
>> total 21044
>> -rw-r--r--  1 root root   157726 Dec 15 15:40 config-3.16.0-4-amd64
>> drwxr-xr-x  5 root root     4096 Dec 18 07:53 grub
>> -rw-r--r--  1 root root 15535038 Dec 18 07:52 initrd.img-3.16.0-4-amd64
>> drwx------  2 root root    16384 Oct 19 11:11 lost+found
>> -rw-r--r--  1 root root  2676277 Dec 15 15:40 System.map-3.16.0-4-amd64
>> -rw-r--r--  1 root root  3118928 Dec 15 15:37 vmlinuz-3.16.0-4-amd64
>>
>> which at the very least is consistent between Debian and RHEL derivatives.
>>
>> IMO, doing the same for Xen is sensible.
> 
> I'm afraid I have to disagree - just because Linux does things a
> certain way doesn't mean that the only (sensible) way. Imo /boot
> should hold exclusively stuff needed for booting. Remember how
> we moved xen-syms out of there not so long ago? You could have
> objected to that change too, considering that Linux puts
> System.map and sometimes also the uncompressed vmlinux there.
> Yet I think it was a correct move, and the change here should
> follow that model instead of Linux'es.
> 
> Jan
> 

I don't think you're correct here Jan. Looking at most distros I have at
hand (I'll admit I don't have SuSE available to me). The uncompressed
kernel is not in /boot. In fact all of them use /usr/lib/debug so Xen
did follow Linux here.
Douglas Goldstein Dec. 22, 2015, 12:45 p.m. UTC | #9
On 12/21/15 9:35 AM, Jan Beulich wrote:
>>>> On 21.12.15 at 16:20, <cardoe@cardoe.com> wrote:
>> On 12/21/15 8:51 AM, Jan Beulich wrote:
>>>>>> On 21.12.15 at 15:35, <cardoe@cardoe.com> wrote:
>>>> On 12/21/15 6:11 AM, Jan Beulich wrote:
>>>>>>>> On 18.12.15 at 22:35, <cardoe@cardoe.com> wrote:
>>>>>> Since we now support changing Xen options with Kconfig, we should save
>>>>>> the configuration that was used to build up Xen. This will save it in
>>>>>> /boot alongside the installed xen.gz and call it
>>>>>> xen-$(FULLVERSION).config
>>>>>>
>>>>>> Suggested-by: Ian Campbell <ian.campbell@citrix.com>
>>>>>> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
>>>>>> ---
>>>>>>  xen/Makefile | 1 +
>>>>>>  1 file changed, 1 insertion(+)
>>>>>>
>>>>>> diff --git a/xen/Makefile b/xen/Makefile
>>>>>> index 9023863..460b977 100644
>>>>>> --- a/xen/Makefile
>>>>>> +++ b/xen/Makefile
>>>>>> @@ -58,6 +58,7 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
>>>>>>  	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
>>>>>>  	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
>>>>>>  	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
>>>>>> +	$(INSTALL_DATA) $(KCONFIG_CONFIG) 
>>>> $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION).config
>>>>>
>>>>> Was it really suggested to put this into /boot? It has no business
>>>>> being there...
>>>>
>>>> Yes. By multiple people. Ian Campbell was the first person to suggest it
>>>> in that location.
>>>
>>> Okay, so I've looked it up, and no, he didn't. He just gave this as one
>>> possibility:
>>>
>>> "It occurred to me this morning that we probably ought to stash the .config
>>>  somewhere on install in such a way that it can be associated with the Xen
>>>  binary (i.e. with the same full suffix as the binary itself, not the
>>>  abridged symlink names), maybe as $(BOOT_DIR)/$(T)-
>>>  $(XEN_FULLVERSION).config?"
>>>
>>> But yes, I'm sorry for not noticing this as an undesirable place right
>>> away.
>>
>> Ok well I'm at a loss here because the quote clearly shows him
>> suggesting that location. Do you have a suggested location because so
>> far I've just got a no from you on the only suggested location.
> 
> Match the xen-syms location?
> 
> Jan
> 

I guess I fail to grasp the rationale behind not putting it in /boot.
Jan Beulich Dec. 22, 2015, 12:50 p.m. UTC | #10
>>> On 22.12.15 at 13:45, <cardoe@cardoe.com> wrote:
> On 12/21/15 6:53 AM, Jan Beulich wrote:
>>>>> On 21.12.15 at 13:40, <andrew.cooper3@citrix.com> wrote:
>>> On 21/12/15 12:11, Jan Beulich wrote:
>>>>>>> On 18.12.15 at 22:35, <cardoe@cardoe.com> wrote:
>>>>> Since we now support changing Xen options with Kconfig, we should save
>>>>> the configuration that was used to build up Xen. This will save it in
>>>>> /boot alongside the installed xen.gz and call it
>>>>> xen-$(FULLVERSION).config
>>>>>
>>>>> Suggested-by: Ian Campbell <ian.campbell@citrix.com>
>>>>> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
>>>>> ---
>>>>>  xen/Makefile | 1 +
>>>>>  1 file changed, 1 insertion(+)
>>>>>
>>>>> diff --git a/xen/Makefile b/xen/Makefile
>>>>> index 9023863..460b977 100644
>>>>> --- a/xen/Makefile
>>>>> +++ b/xen/Makefile
>>>>> @@ -58,6 +58,7 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
>>>>>  	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
>>>>>  	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
>>>>>  	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
>>>>> +	$(INSTALL_DATA) $(KCONFIG_CONFIG) 
>>> $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION).config
>>>> Was it really suggested to put this into /boot? It has no business
>>>> being there...
>>>
>>> A typical Linux has:
>>>
>>> andrewcoop@andrewcoop:/local/xen.git/xen$ ls -lA /boot/
>>> total 21044
>>> -rw-r--r--  1 root root   157726 Dec 15 15:40 config-3.16.0-4-amd64
>>> drwxr-xr-x  5 root root     4096 Dec 18 07:53 grub
>>> -rw-r--r--  1 root root 15535038 Dec 18 07:52 initrd.img-3.16.0-4-amd64
>>> drwx------  2 root root    16384 Oct 19 11:11 lost+found
>>> -rw-r--r--  1 root root  2676277 Dec 15 15:40 System.map-3.16.0-4-amd64
>>> -rw-r--r--  1 root root  3118928 Dec 15 15:37 vmlinuz-3.16.0-4-amd64
>>>
>>> which at the very least is consistent between Debian and RHEL derivatives.
>>>
>>> IMO, doing the same for Xen is sensible.
>> 
>> I'm afraid I have to disagree - just because Linux does things a
>> certain way doesn't mean that the only (sensible) way. Imo /boot
>> should hold exclusively stuff needed for booting. Remember how
>> we moved xen-syms out of there not so long ago? You could have
>> objected to that change too, considering that Linux puts
>> System.map and sometimes also the uncompressed vmlinux there.
>> Yet I think it was a correct move, and the change here should
>> follow that model instead of Linux'es.
> 
> I don't think you're correct here Jan. Looking at most distros I have at
> hand (I'll admit I don't have SuSE available to me). The uncompressed
> kernel is not in /boot.

Note how I said "sometimes"? And I suppose you will agree that
System.map is unnecessary for booting, despite it getting put in
/boot quite commonly as it looks.

Jan
Jan Beulich Dec. 22, 2015, 12:52 p.m. UTC | #11
>>> On 22.12.15 at 13:45, <cardoe@cardoe.com> wrote:
> On 12/21/15 9:35 AM, Jan Beulich wrote:
>>>>> On 21.12.15 at 16:20, <cardoe@cardoe.com> wrote:
>>> On 12/21/15 8:51 AM, Jan Beulich wrote:
>>>>>>> On 21.12.15 at 15:35, <cardoe@cardoe.com> wrote:
>>>>> On 12/21/15 6:11 AM, Jan Beulich wrote:
>>>>>>>>> On 18.12.15 at 22:35, <cardoe@cardoe.com> wrote:
>>>>>>> Since we now support changing Xen options with Kconfig, we should save
>>>>>>> the configuration that was used to build up Xen. This will save it in
>>>>>>> /boot alongside the installed xen.gz and call it
>>>>>>> xen-$(FULLVERSION).config
>>>>>>>
>>>>>>> Suggested-by: Ian Campbell <ian.campbell@citrix.com>
>>>>>>> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
>>>>>>> ---
>>>>>>>  xen/Makefile | 1 +
>>>>>>>  1 file changed, 1 insertion(+)
>>>>>>>
>>>>>>> diff --git a/xen/Makefile b/xen/Makefile
>>>>>>> index 9023863..460b977 100644
>>>>>>> --- a/xen/Makefile
>>>>>>> +++ b/xen/Makefile
>>>>>>> @@ -58,6 +58,7 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
>>>>>>>  	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
>>>>>>>  	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
>>>>>>>  	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
>>>>>>> +	$(INSTALL_DATA) $(KCONFIG_CONFIG) 
>>>>> $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION).config
>>>>>>
>>>>>> Was it really suggested to put this into /boot? It has no business
>>>>>> being there...
>>>>>
>>>>> Yes. By multiple people. Ian Campbell was the first person to suggest it
>>>>> in that location.
>>>>
>>>> Okay, so I've looked it up, and no, he didn't. He just gave this as one
>>>> possibility:
>>>>
>>>> "It occurred to me this morning that we probably ought to stash the .config
>>>>  somewhere on install in such a way that it can be associated with the Xen
>>>>  binary (i.e. with the same full suffix as the binary itself, not the
>>>>  abridged symlink names), maybe as $(BOOT_DIR)/$(T)-
>>>>  $(XEN_FULLVERSION).config?"
>>>>
>>>> But yes, I'm sorry for not noticing this as an undesirable place right
>>>> away.
>>>
>>> Ok well I'm at a loss here because the quote clearly shows him
>>> suggesting that location. Do you have a suggested location because so
>>> far I've just got a no from you on the only suggested location.
>> 
>> Match the xen-syms location?
> 
> I guess I fail to grasp the rationale behind not putting it in /boot.

It's the other way around really - you'd have to provide a reason
(other than "Linux does so too") for putting it in /boot.

Jan
Andrew Cooper Dec. 22, 2015, 2:46 p.m. UTC | #12
On 22/12/15 12:52, Jan Beulich wrote:
>>>> On 22.12.15 at 13:45, <cardoe@cardoe.com> wrote:
>> On 12/21/15 9:35 AM, Jan Beulich wrote:
>>>>>> On 21.12.15 at 16:20, <cardoe@cardoe.com> wrote:
>>>> On 12/21/15 8:51 AM, Jan Beulich wrote:
>>>>>>>> On 21.12.15 at 15:35, <cardoe@cardoe.com> wrote:
>>>>>> On 12/21/15 6:11 AM, Jan Beulich wrote:
>>>>>>>>>> On 18.12.15 at 22:35, <cardoe@cardoe.com> wrote:
>>>>>>>> Since we now support changing Xen options with Kconfig, we should save
>>>>>>>> the configuration that was used to build up Xen. This will save it in
>>>>>>>> /boot alongside the installed xen.gz and call it
>>>>>>>> xen-$(FULLVERSION).config
>>>>>>>>
>>>>>>>> Suggested-by: Ian Campbell <ian.campbell@citrix.com>
>>>>>>>> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
>>>>>>>> ---
>>>>>>>>  xen/Makefile | 1 +
>>>>>>>>  1 file changed, 1 insertion(+)
>>>>>>>>
>>>>>>>> diff --git a/xen/Makefile b/xen/Makefile
>>>>>>>> index 9023863..460b977 100644
>>>>>>>> --- a/xen/Makefile
>>>>>>>> +++ b/xen/Makefile
>>>>>>>> @@ -58,6 +58,7 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
>>>>>>>>  	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
>>>>>>>>  	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
>>>>>>>>  	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
>>>>>>>> +	$(INSTALL_DATA) $(KCONFIG_CONFIG) 
>>>>>> $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION).config
>>>>>>> Was it really suggested to put this into /boot? It has no business
>>>>>>> being there...
>>>>>> Yes. By multiple people. Ian Campbell was the first person to suggest it
>>>>>> in that location.
>>>>> Okay, so I've looked it up, and no, he didn't. He just gave this as one
>>>>> possibility:
>>>>>
>>>>> "It occurred to me this morning that we probably ought to stash the .config
>>>>>  somewhere on install in such a way that it can be associated with the Xen
>>>>>  binary (i.e. with the same full suffix as the binary itself, not the
>>>>>  abridged symlink names), maybe as $(BOOT_DIR)/$(T)-
>>>>>  $(XEN_FULLVERSION).config?"
>>>>>
>>>>> But yes, I'm sorry for not noticing this as an undesirable place right
>>>>> away.
>>>> Ok well I'm at a loss here because the quote clearly shows him
>>>> suggesting that location. Do you have a suggested location because so
>>>> far I've just got a no from you on the only suggested location.
>>> Match the xen-syms location?
>> I guess I fail to grasp the rationale behind not putting it in /boot.
> It's the other way around really - you'd have to provide a reason
> (other than "Linux does so too") for putting it in /boot.

I disagree.

Xen being consistent with Linux in this regard is in the best interest
of the users of Xen, as they end up finding similar information in
similar places.

The onus is on you to provide a reason why we should deliberately do
something different.

~Andrew
Jan Beulich Dec. 22, 2015, 3:59 p.m. UTC | #13
>>> On 22.12.15 at 15:46, <andrew.cooper3@citrix.com> wrote:
> On 22/12/15 12:52, Jan Beulich wrote:
>>>>> On 22.12.15 at 13:45, <cardoe@cardoe.com> wrote:
>>> On 12/21/15 9:35 AM, Jan Beulich wrote:
>>>>>>> On 21.12.15 at 16:20, <cardoe@cardoe.com> wrote:
>>>>> On 12/21/15 8:51 AM, Jan Beulich wrote:
>>>>>>>>> On 21.12.15 at 15:35, <cardoe@cardoe.com> wrote:
>>>>>>> On 12/21/15 6:11 AM, Jan Beulich wrote:
>>>>>>>>>>> On 18.12.15 at 22:35, <cardoe@cardoe.com> wrote:
>>>>>>>>> Since we now support changing Xen options with Kconfig, we should save
>>>>>>>>> the configuration that was used to build up Xen. This will save it in
>>>>>>>>> /boot alongside the installed xen.gz and call it
>>>>>>>>> xen-$(FULLVERSION).config
>>>>>>>>>
>>>>>>>>> Suggested-by: Ian Campbell <ian.campbell@citrix.com>
>>>>>>>>> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
>>>>>>>>> ---
>>>>>>>>>  xen/Makefile | 1 +
>>>>>>>>>  1 file changed, 1 insertion(+)
>>>>>>>>>
>>>>>>>>> diff --git a/xen/Makefile b/xen/Makefile
>>>>>>>>> index 9023863..460b977 100644
>>>>>>>>> --- a/xen/Makefile
>>>>>>>>> +++ b/xen/Makefile
>>>>>>>>> @@ -58,6 +58,7 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
>>>>>>>>>  	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
>>>>>>>>>  	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
>>>>>>>>>  	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
>>>>>>>>> +	$(INSTALL_DATA) $(KCONFIG_CONFIG) 
>>>>>>> $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION).config
>>>>>>>> Was it really suggested to put this into /boot? It has no business
>>>>>>>> being there...
>>>>>>> Yes. By multiple people. Ian Campbell was the first person to suggest it
>>>>>>> in that location.
>>>>>> Okay, so I've looked it up, and no, he didn't. He just gave this as one
>>>>>> possibility:
>>>>>>
>>>>>> "It occurred to me this morning that we probably ought to stash the .config
>>>>>>  somewhere on install in such a way that it can be associated with the Xen
>>>>>>  binary (i.e. with the same full suffix as the binary itself, not the
>>>>>>  abridged symlink names), maybe as $(BOOT_DIR)/$(T)-
>>>>>>  $(XEN_FULLVERSION).config?"
>>>>>>
>>>>>> But yes, I'm sorry for not noticing this as an undesirable place right
>>>>>> away.
>>>>> Ok well I'm at a loss here because the quote clearly shows him
>>>>> suggesting that location. Do you have a suggested location because so
>>>>> far I've just got a no from you on the only suggested location.
>>>> Match the xen-syms location?
>>> I guess I fail to grasp the rationale behind not putting it in /boot.
>> It's the other way around really - you'd have to provide a reason
>> (other than "Linux does so too") for putting it in /boot.
> 
> I disagree.
> 
> Xen being consistent with Linux in this regard is in the best interest
> of the users of Xen, as they end up finding similar information in
> similar places.
> 
> The onus is on you to provide a reason why we should deliberately do
> something different.

I'm sorry, but no - why would we slavishly follow what Linux does, no
matter whether it makes sense?

Jan
Douglas Goldstein Dec. 22, 2015, 4:02 p.m. UTC | #14
On 12/22/15 9:59 AM, Jan Beulich wrote:
>>>> On 22.12.15 at 15:46, <andrew.cooper3@citrix.com> wrote:
>> On 22/12/15 12:52, Jan Beulich wrote:
>>>>>> On 22.12.15 at 13:45, <cardoe@cardoe.com> wrote:
>>>> On 12/21/15 9:35 AM, Jan Beulich wrote:
>>>>>>>> On 21.12.15 at 16:20, <cardoe@cardoe.com> wrote:
>>>>>> On 12/21/15 8:51 AM, Jan Beulich wrote:
>>>>>>>>>> On 21.12.15 at 15:35, <cardoe@cardoe.com> wrote:
>>>>>>>> On 12/21/15 6:11 AM, Jan Beulich wrote:
>>>>>>>>>>>> On 18.12.15 at 22:35, <cardoe@cardoe.com> wrote:
>>>>>>>>>> Since we now support changing Xen options with Kconfig, we should save
>>>>>>>>>> the configuration that was used to build up Xen. This will save it in
>>>>>>>>>> /boot alongside the installed xen.gz and call it
>>>>>>>>>> xen-$(FULLVERSION).config
>>>>>>>>>>
>>>>>>>>>> Suggested-by: Ian Campbell <ian.campbell@citrix.com>
>>>>>>>>>> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
>>>>>>>>>> ---
>>>>>>>>>>  xen/Makefile | 1 +
>>>>>>>>>>  1 file changed, 1 insertion(+)
>>>>>>>>>>
>>>>>>>>>> diff --git a/xen/Makefile b/xen/Makefile
>>>>>>>>>> index 9023863..460b977 100644
>>>>>>>>>> --- a/xen/Makefile
>>>>>>>>>> +++ b/xen/Makefile
>>>>>>>>>> @@ -58,6 +58,7 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
>>>>>>>>>>  	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
>>>>>>>>>>  	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
>>>>>>>>>>  	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
>>>>>>>>>> +	$(INSTALL_DATA) $(KCONFIG_CONFIG) 
>>>>>>>> $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION).config
>>>>>>>>> Was it really suggested to put this into /boot? It has no business
>>>>>>>>> being there...
>>>>>>>> Yes. By multiple people. Ian Campbell was the first person to suggest it
>>>>>>>> in that location.
>>>>>>> Okay, so I've looked it up, and no, he didn't. He just gave this as one
>>>>>>> possibility:
>>>>>>>
>>>>>>> "It occurred to me this morning that we probably ought to stash the .config
>>>>>>>  somewhere on install in such a way that it can be associated with the Xen
>>>>>>>  binary (i.e. with the same full suffix as the binary itself, not the
>>>>>>>  abridged symlink names), maybe as $(BOOT_DIR)/$(T)-
>>>>>>>  $(XEN_FULLVERSION).config?"
>>>>>>>
>>>>>>> But yes, I'm sorry for not noticing this as an undesirable place right
>>>>>>> away.
>>>>>> Ok well I'm at a loss here because the quote clearly shows him
>>>>>> suggesting that location. Do you have a suggested location because so
>>>>>> far I've just got a no from you on the only suggested location.
>>>>> Match the xen-syms location?
>>>> I guess I fail to grasp the rationale behind not putting it in /boot.
>>> It's the other way around really - you'd have to provide a reason
>>> (other than "Linux does so too") for putting it in /boot.
>>
>> I disagree.
>>
>> Xen being consistent with Linux in this regard is in the best interest
>> of the users of Xen, as they end up finding similar information in
>> similar places.
>>
>> The onus is on you to provide a reason why we should deliberately do
>> something different.
> 
> I'm sorry, but no - why would we slavishly follow what Linux does, no
> matter whether it makes sense?
> 
> Jan
> 

How does it not make sense in this case? That's what Andrew and I are
asking you to explain.
Jan Beulich Dec. 22, 2015, 4:09 p.m. UTC | #15
>>> On 22.12.15 at 17:02, <cardoe@cardoe.com> wrote:
> How does it not make sense in this case? That's what Andrew and I are
> asking you to explain.

But I already explained it: The file isn't needed for booting.

Jan
Ian Campbell Jan. 4, 2016, 11:27 a.m. UTC | #16
On Mon, 2015-12-21 at 08:35 -0600, Doug Goldstein wrote:
> On 12/21/15 6:11 AM, Jan Beulich wrote:
> > > > > On 18.12.15 at 22:35, <cardoe@cardoe.com> wrote:
> > > Since we now support changing Xen options with Kconfig, we should
> > > save
> > > the configuration that was used to build up Xen. This will save it in
> > > /boot alongside the installed xen.gz and call it
> > > xen-$(FULLVERSION).config
> > > 
> > > Suggested-by: Ian Campbell <ian.campbell@citrix.com>
> > > Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
> > > ---
> > >  xen/Makefile | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/xen/Makefile b/xen/Makefile
> > > index 9023863..460b977 100644
> > > --- a/xen/Makefile
> > > +++ b/xen/Makefile
> > > @@ -58,6 +58,7 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
> > >  	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z)
> > > $(D)$(BOOT_DIR)/$(T)$(Z)
> > >  	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
> > >  	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-
> > > $(XEN_FULLVERSION)
> > > +	$(INSTALL_DATA) $(KCONFIG_CONFIG) $(D)$(BOOT_DIR)/$(T)-
> > > $(XEN_FULLVERSION).config
> > 
> > Was it really suggested to put this into /boot? It has no business
> > being there...
> > 
> > Jan
> > 
> 
> Yes. By multiple people. Ian Campbell was the first person to suggest it
> in that location.

I don't really care where it goes so long as it is somewhere which is (or
can become) well known.

IOW: I don't care to join in the argument about the location.

Ian.
Douglas Goldstein Jan. 5, 2016, 4:53 p.m. UTC | #17
On 12/22/15 10:09 AM, Jan Beulich wrote:
>>>> On 22.12.15 at 17:02, <cardoe@cardoe.com> wrote:
>> How does it not make sense in this case? That's what Andrew and I are
>> asking you to explain.
> 
> But I already explained it: The file isn't needed for booting.
> 
> Jan
> 

Jan,

One use of it in /boot would be to check the file in 20_linux_xen like
we check the kernel config for different options to add different
parameters.
Jan Beulich Jan. 6, 2016, 9:22 a.m. UTC | #18
>>> On 05.01.16 at 17:53, <cardoe@cardoe.com> wrote:
> On 12/22/15 10:09 AM, Jan Beulich wrote:
>>>>> On 22.12.15 at 17:02, <cardoe@cardoe.com> wrote:
>>> How does it not make sense in this case? That's what Andrew and I are
>>> asking you to explain.
>> 
>> But I already explained it: The file isn't needed for booting.
> 
> One use of it in /boot would be to check the file in 20_linux_xen like
> we check the kernel config for different options to add different
> parameters.

Which, if you search for it, is a very controversial thing: I agree
with the side demanding for grub to not inspect the kernel's
.config.

Jan
Ian Campbell Jan. 6, 2016, 10:31 a.m. UTC | #19
On Wed, 2016-01-06 at 02:22 -0700, Jan Beulich wrote:
> > > > On 05.01.16 at 17:53, <cardoe@cardoe.com> wrote:
> > On 12/22/15 10:09 AM, Jan Beulich wrote:
> > > > > > On 22.12.15 at 17:02, <cardoe@cardoe.com> wrote:
> > > > How does it not make sense in this case? That's what Andrew and I
> > > > are
> > > > asking you to explain.
> > > 
> > > But I already explained it: The file isn't needed for booting.
> > 
> > One use of it in /boot would be to check the file in 20_linux_xen like
> > we check the kernel config for different options to add different
> > parameters.
> 
> Which, if you search for it, is a very controversial thing: I agree
> with the side demanding for grub to not inspect the kernel's
> .config.

What is the preferred mechanism for determining from the contents of /boot
whether an XSM entry should be produced or not?

Ian.
Jan Beulich Jan. 6, 2016, 10:38 a.m. UTC | #20
>>> On 06.01.16 at 11:31, <ian.campbell@citrix.com> wrote:
> On Wed, 2016-01-06 at 02:22 -0700, Jan Beulich wrote:
>> > > > On 05.01.16 at 17:53, <cardoe@cardoe.com> wrote:
>> > On 12/22/15 10:09 AM, Jan Beulich wrote:
>> > > > > > On 22.12.15 at 17:02, <cardoe@cardoe.com> wrote:
>> > > > How does it not make sense in this case? That's what Andrew and I
>> > > > are
>> > > > asking you to explain.
>> > > 
>> > > But I already explained it: The file isn't needed for booting.
>> > 
>> > One use of it in /boot would be to check the file in 20_linux_xen like
>> > we check the kernel config for different options to add different
>> > parameters.
>> 
>> Which, if you search for it, is a very controversial thing: I agree
>> with the side demanding for grub to not inspect the kernel's
>> .config.
> 
> What is the preferred mechanism for determining from the contents of /boot
> whether an XSM entry should be produced or not?

I don't think this can be inferred - iirc even an XSM-enabled build
can be booted without unless in some kind of strict mode? IOW
this needs to be configured on the host, not guessed by
inspecting .config. (And as a side note, inspecting .config doesn't
truly require .config to be on the boot partition, unless such
inspection would happen at boot time, which I don't think is the
case.)

Jan
Ian Jackson Jan. 6, 2016, 11:58 a.m. UTC | #21
Jan Beulich writes ("Re: [Xen-devel] [PATCH] build: save generated config in /boot"):
> On 06.01.16 at 11:31, <ian.campbell@citrix.com> wrote:
> > What is the preferred mechanism for determining from the contents of /boot
> > whether an XSM entry should be produced or not?
> 
> I don't think this can be inferred - iirc even an XSM-enabled build
> can be booted without unless in some kind of strict mode? IOW
> this needs to be configured on the host, not guessed by
> inspecting .config. (And as a side note, inspecting .config doesn't
> truly require .config to be on the boot partition, unless such
> inspection would happen at boot time, which I don't think is the
> case.)

Well, actually, it _can_ be inferred.  Therefore it should be.

Ian.
Wei Liu Jan. 6, 2016, 12:17 p.m. UTC | #22
On Wed, Jan 06, 2016 at 03:38:36AM -0700, Jan Beulich wrote:
> >>> On 06.01.16 at 11:31, <ian.campbell@citrix.com> wrote:
> > On Wed, 2016-01-06 at 02:22 -0700, Jan Beulich wrote:
> >> > > > On 05.01.16 at 17:53, <cardoe@cardoe.com> wrote:
> >> > On 12/22/15 10:09 AM, Jan Beulich wrote:
> >> > > > > > On 22.12.15 at 17:02, <cardoe@cardoe.com> wrote:
> >> > > > How does it not make sense in this case? That's what Andrew and I
> >> > > > are
> >> > > > asking you to explain.
> >> > > 
> >> > > But I already explained it: The file isn't needed for booting.
> >> > 
> >> > One use of it in /boot would be to check the file in 20_linux_xen like
> >> > we check the kernel config for different options to add different
> >> > parameters.
> >> 
> >> Which, if you search for it, is a very controversial thing: I agree
> >> with the side demanding for grub to not inspect the kernel's
> >> .config.
> > 
> > What is the preferred mechanism for determining from the contents of /boot
> > whether an XSM entry should be produced or not?
> 
> I don't think this can be inferred - iirc even an XSM-enabled build
> can be booted without unless in some kind of strict mode? IOW
> this needs to be configured on the host, not guessed by
> inspecting .config. (And as a side note, inspecting .config doesn't

It's better to lower the hurdle for XSM adoption by instructing grub to
do sensible default than requiring users to produce entries by hand,
isn't it?

> truly require .config to be on the boot partition, unless such
> inspection would happen at boot time, which I don't think is the
> case.)
> 

Yes and no.

It's true that it can be placed anywhere on the file system as long as
grub (or any other tools that need to inspect it) can find it.

But how would you propose grub to deal with this? The location needs to
be "fixed" from then on and present forever. Either we need to persuade
every distro to accept our new less-well-known location to always place
.config there or we make them patch grub as they package Xen. This is
just unnecessary work.  Anywhere other than /boot is inferior IMHO.

Wei.

> Jan
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
Jan Beulich Jan. 6, 2016, 12:56 p.m. UTC | #23
>>> On 06.01.16 at 12:58, <Ian.Jackson@eu.citrix.com> wrote:
> Jan Beulich writes ("Re: [Xen-devel] [PATCH] build: save generated config in 
> /boot"):
>> On 06.01.16 at 11:31, <ian.campbell@citrix.com> wrote:
>> > What is the preferred mechanism for determining from the contents of /boot
>> > whether an XSM entry should be produced or not?
>> 
>> I don't think this can be inferred - iirc even an XSM-enabled build
>> can be booted without unless in some kind of strict mode? IOW
>> this needs to be configured on the host, not guessed by
>> inspecting .config. (And as a side note, inspecting .config doesn't
>> truly require .config to be on the boot partition, unless such
>> inspection would happen at boot time, which I don't think is the
>> case.)
> 
> Well, actually, it _can_ be inferred.  Therefore it should be.

You mean from the presence of the policy file (which ends up
being a container of garbage for a non-XSM-Xen)? If not -
what else do you think the need for an XSM entry can be
derived from?

Jan
Jan Beulich Jan. 6, 2016, 1:01 p.m. UTC | #24
>>> On 06.01.16 at 13:17, <wei.liu2@citrix.com> wrote:
> On Wed, Jan 06, 2016 at 03:38:36AM -0700, Jan Beulich wrote:
>> >>> On 06.01.16 at 11:31, <ian.campbell@citrix.com> wrote:
>> > On Wed, 2016-01-06 at 02:22 -0700, Jan Beulich wrote:
>> >> > > > On 05.01.16 at 17:53, <cardoe@cardoe.com> wrote:
>> >> > On 12/22/15 10:09 AM, Jan Beulich wrote:
>> >> > > > > > On 22.12.15 at 17:02, <cardoe@cardoe.com> wrote:
>> >> > > > How does it not make sense in this case? That's what Andrew and I
>> >> > > > are
>> >> > > > asking you to explain.
>> >> > > 
>> >> > > But I already explained it: The file isn't needed for booting.
>> >> > 
>> >> > One use of it in /boot would be to check the file in 20_linux_xen like
>> >> > we check the kernel config for different options to add different
>> >> > parameters.
>> >> 
>> >> Which, if you search for it, is a very controversial thing: I agree
>> >> with the side demanding for grub to not inspect the kernel's
>> >> .config.
>> > 
>> > What is the preferred mechanism for determining from the contents of /boot
>> > whether an XSM entry should be produced or not?
>> 
>> I don't think this can be inferred - iirc even an XSM-enabled build
>> can be booted without unless in some kind of strict mode? IOW
>> this needs to be configured on the host, not guessed by
>> inspecting .config. (And as a side note, inspecting .config doesn't
> 
> It's better to lower the hurdle for XSM adoption by instructing grub to
> do sensible default than requiring users to produce entries by hand,
> isn't it?
> 
>> truly require .config to be on the boot partition, unless such
>> inspection would happen at boot time, which I don't think is the
>> case.)
>> 
> 
> Yes and no.
> 
> It's true that it can be placed anywhere on the file system as long as
> grub (or any other tools that need to inspect it) can find it.
> 
> But how would you propose grub to deal with this? The location needs to
> be "fixed" from then on and present forever. Either we need to persuade
> every distro to accept our new less-well-known location to always place
> .config there or we make them patch grub as they package Xen. This is
> just unnecessary work.  Anywhere other than /boot is inferior IMHO.

I think we need to separate the two issues: First we need to
settle on whether inspecting .config for XSM purposes is (a)
necessary and if so (b) the right approach (which I doubt).
See also my other reply to Ian sent a minute or two ago. Only
then do we need to get concerned about whether .config
really has a use when placed on /boot.

Jan
diff mbox

Patch

diff --git a/xen/Makefile b/xen/Makefile
index 9023863..460b977 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -58,6 +58,7 @@  _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
 	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
 	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
 	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
+	$(INSTALL_DATA) $(KCONFIG_CONFIG) $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION).config
 	if [ -r $(TARGET).efi -a -n '$(EFI_DIR)' ]; then \
 		[ -d $(D)$(EFI_DIR) ] || $(INSTALL_DIR) $(D)$(EFI_DIR); \
 		$(INSTALL_DATA) $(TARGET).efi $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi; \