linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen/privcmd: make option visible in Kconfig
@ 2021-11-16 14:33 Juergen Gross
  2021-11-16 14:55 ` Jan Beulich
  2021-11-16 14:59 ` Thomas Weißschuh
  0 siblings, 2 replies; 10+ messages in thread
From: Juergen Gross @ 2021-11-16 14:33 UTC (permalink / raw)
  To: xen-devel, linux-kernel
  Cc: linux, Juergen Gross, Boris Ostrovsky, Stefano Stabellini

This configuration option provides a misc device as an API to userspace.
Make this API usable without having to select the module as a transitive
dependency.

This also fixes an issue where localyesconfig would select
CONFIG_XEN_PRIVCMD=m because it was not visible and defaulted to
building as module.

Based-on-patch-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Juergen Gross <jgross@suse.com>
---
 drivers/xen/Kconfig | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
index a1b11c62da9e..a2e91d3ca372 100644
--- a/drivers/xen/Kconfig
+++ b/drivers/xen/Kconfig
@@ -259,9 +259,14 @@ config XEN_SCSI_BACKEND
 	  if guests need generic access to SCSI devices.
 
 config XEN_PRIVCMD
-	tristate
+	tristate "Xen hypercall passthrough driver"
 	depends on XEN
 	default m
+	help
+	  The hypercall passthrough driver allows user land programs to perform
+	  Xen hypercalls. This driver is normally required for systems running
+	  as Dom0 to perform privileged operations, but in some disaggregated
+	  Xen setups this driver might be needed for other domains, too.
 
 config XEN_ACPI_PROCESSOR
 	tristate "Xen ACPI processor"
-- 
2.26.2


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

* Re: [PATCH] xen/privcmd: make option visible in Kconfig
  2021-11-16 14:33 [PATCH] xen/privcmd: make option visible in Kconfig Juergen Gross
@ 2021-11-16 14:55 ` Jan Beulich
  2021-11-16 15:01   ` Juergen Gross
  2021-11-16 14:59 ` Thomas Weißschuh
  1 sibling, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2021-11-16 14:55 UTC (permalink / raw)
  To: Juergen Gross
  Cc: linux, Boris Ostrovsky, Stefano Stabellini, xen-devel, linux-kernel

On 16.11.2021 15:33, Juergen Gross wrote:
> This configuration option provides a misc device as an API to userspace.
> Make this API usable without having to select the module as a transitive
> dependency.
> 
> This also fixes an issue where localyesconfig would select
> CONFIG_XEN_PRIVCMD=m because it was not visible and defaulted to
> building as module.
> 
> Based-on-patch-by: Thomas Weißschuh <linux@weissschuh.net>
> Signed-off-by: Juergen Gross <jgross@suse.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>

> --- a/drivers/xen/Kconfig
> +++ b/drivers/xen/Kconfig
> @@ -259,9 +259,14 @@ config XEN_SCSI_BACKEND
>  	  if guests need generic access to SCSI devices.
>  
>  config XEN_PRIVCMD
> -	tristate
> +	tristate "Xen hypercall passthrough driver"
>  	depends on XEN
>  	default m
> +	help
> +	  The hypercall passthrough driver allows user land programs to perform

Maybe worth adding "privileged" here? Albeit of course that's different
from the use of the word ...

> +	  Xen hypercalls. This driver is normally required for systems running
> +	  as Dom0 to perform privileged operations, but in some disaggregated

... here, so there'd be a small risk of confusion.

Jan

> +	  Xen setups this driver might be needed for other domains, too.
>  
>  config XEN_ACPI_PROCESSOR
>  	tristate "Xen ACPI processor"
> 


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

* Re: [PATCH] xen/privcmd: make option visible in Kconfig
  2021-11-16 14:33 [PATCH] xen/privcmd: make option visible in Kconfig Juergen Gross
  2021-11-16 14:55 ` Jan Beulich
@ 2021-11-16 14:59 ` Thomas Weißschuh
  1 sibling, 0 replies; 10+ messages in thread
From: Thomas Weißschuh @ 2021-11-16 14:59 UTC (permalink / raw)
  To: Juergen Gross
  Cc: xen-devel, linux-kernel, Boris Ostrovsky, Stefano Stabellini

Thanks!

On 2021-11-16 15:33+0100, Juergen Gross wrote:
> This configuration option provides a misc device as an API to userspace.
> Make this API usable without having to select the module as a transitive
> dependency.
> 
> This also fixes an issue where localyesconfig would select
> CONFIG_XEN_PRIVCMD=m because it was not visible and defaulted to
> building as module.
> 
> Based-on-patch-by: Thomas Weißschuh <linux@weissschuh.net>
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
>  drivers/xen/Kconfig | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
> index a1b11c62da9e..a2e91d3ca372 100644
> --- a/drivers/xen/Kconfig
> +++ b/drivers/xen/Kconfig
> @@ -259,9 +259,14 @@ config XEN_SCSI_BACKEND
>  	  if guests need generic access to SCSI devices.
>  
>  config XEN_PRIVCMD
> -	tristate
> +	tristate "Xen hypercall passthrough driver"
>  	depends on XEN
>  	default m
> +	help
> +	  The hypercall passthrough driver allows user land programs to perform
> +	  Xen hypercalls. This driver is normally required for systems running
> +	  as Dom0 to perform privileged operations, but in some disaggregated
> +	  Xen setups this driver might be needed for other domains, too.
>  
>  config XEN_ACPI_PROCESSOR
>  	tristate "Xen ACPI processor"
> -- 
> 2.26.2

Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>

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

* Re: [PATCH] xen/privcmd: make option visible in Kconfig
  2021-11-16 14:55 ` Jan Beulich
@ 2021-11-16 15:01   ` Juergen Gross
  2021-11-16 16:05     ` Jan Beulich
  0 siblings, 1 reply; 10+ messages in thread
From: Juergen Gross @ 2021-11-16 15:01 UTC (permalink / raw)
  To: Jan Beulich
  Cc: linux, Boris Ostrovsky, Stefano Stabellini, xen-devel, linux-kernel


[-- Attachment #1.1.1: Type: text/plain, Size: 1237 bytes --]

On 16.11.21 15:55, Jan Beulich wrote:
> On 16.11.2021 15:33, Juergen Gross wrote:
>> This configuration option provides a misc device as an API to userspace.
>> Make this API usable without having to select the module as a transitive
>> dependency.
>>
>> This also fixes an issue where localyesconfig would select
>> CONFIG_XEN_PRIVCMD=m because it was not visible and defaulted to
>> building as module.
>>
>> Based-on-patch-by: Thomas Weißschuh <linux@weissschuh.net>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
> 
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
> 
>> --- a/drivers/xen/Kconfig
>> +++ b/drivers/xen/Kconfig
>> @@ -259,9 +259,14 @@ config XEN_SCSI_BACKEND
>>   	  if guests need generic access to SCSI devices.
>>   
>>   config XEN_PRIVCMD
>> -	tristate
>> +	tristate "Xen hypercall passthrough driver"
>>   	depends on XEN
>>   	default m
>> +	help
>> +	  The hypercall passthrough driver allows user land programs to perform
> 
> Maybe worth adding "privileged" here? Albeit of course that's different
> from the use of the word ...

I guess you mean "... allows privileged user programs ..." (another
variant might be "The privileged hypercall passthrough ...")?


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

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

* Re: [PATCH] xen/privcmd: make option visible in Kconfig
  2021-11-16 15:01   ` Juergen Gross
@ 2021-11-16 16:05     ` Jan Beulich
  2021-11-16 22:33       ` Boris Ostrovsky
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2021-11-16 16:05 UTC (permalink / raw)
  To: Juergen Gross
  Cc: linux, Boris Ostrovsky, Stefano Stabellini, xen-devel, linux-kernel

On 16.11.2021 16:01, Juergen Gross wrote:
> On 16.11.21 15:55, Jan Beulich wrote:
>> On 16.11.2021 15:33, Juergen Gross wrote:
>>> This configuration option provides a misc device as an API to userspace.
>>> Make this API usable without having to select the module as a transitive
>>> dependency.
>>>
>>> This also fixes an issue where localyesconfig would select
>>> CONFIG_XEN_PRIVCMD=m because it was not visible and defaulted to
>>> building as module.
>>>
>>> Based-on-patch-by: Thomas Weißschuh <linux@weissschuh.net>
>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>
>> Reviewed-by: Jan Beulich <jbeulich@suse.com>
>>
>>> --- a/drivers/xen/Kconfig
>>> +++ b/drivers/xen/Kconfig
>>> @@ -259,9 +259,14 @@ config XEN_SCSI_BACKEND
>>>   	  if guests need generic access to SCSI devices.
>>>   
>>>   config XEN_PRIVCMD
>>> -	tristate
>>> +	tristate "Xen hypercall passthrough driver"
>>>   	depends on XEN
>>>   	default m
>>> +	help
>>> +	  The hypercall passthrough driver allows user land programs to perform
>>
>> Maybe worth adding "privileged" here? Albeit of course that's different
>> from the use of the word ...
> 
> I guess you mean "... allows privileged user programs ..." (another
> variant might be "The privileged hypercall passthrough ...")?

The former, yes.

Jan


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

* Re: [PATCH] xen/privcmd: make option visible in Kconfig
  2021-11-16 16:05     ` Jan Beulich
@ 2021-11-16 22:33       ` Boris Ostrovsky
  2021-11-17 16:05         ` Boris Ostrovsky
  0 siblings, 1 reply; 10+ messages in thread
From: Boris Ostrovsky @ 2021-11-16 22:33 UTC (permalink / raw)
  To: Jan Beulich, Juergen Gross
  Cc: linux, Stefano Stabellini, xen-devel, linux-kernel


On 11/16/21 11:05 AM, Jan Beulich wrote:
> On 16.11.2021 16:01, Juergen Gross wrote:
>> On 16.11.21 15:55, Jan Beulich wrote:
>>> On 16.11.2021 15:33, Juergen Gross wrote:
>>>
>>>>    
>>>>    config XEN_PRIVCMD
>>>> -	tristate
>>>> +	tristate "Xen hypercall passthrough driver"
>>>>    	depends on XEN
>>>>    	default m
>>>> +	help
>>>> +	  The hypercall passthrough driver allows user land programs to perform
>>> Maybe worth adding "privileged" here? Albeit of course that's different
>>> from the use of the word ...
>> I guess you mean "... allows privileged user programs ..." (another
>> variant might be "The privileged hypercall passthrough ...")?
> The former, yes.


I can apply with this change, no need to resend.


-boris


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

* Re: [PATCH] xen/privcmd: make option visible in Kconfig
  2021-11-16 22:33       ` Boris Ostrovsky
@ 2021-11-17 16:05         ` Boris Ostrovsky
  0 siblings, 0 replies; 10+ messages in thread
From: Boris Ostrovsky @ 2021-11-17 16:05 UTC (permalink / raw)
  To: Jan Beulich, Juergen Gross
  Cc: linux, Stefano Stabellini, xen-devel, linux-kernel


On 11/16/21 5:33 PM, Boris Ostrovsky wrote:
>
> On 11/16/21 11:05 AM, Jan Beulich wrote:
>> On 16.11.2021 16:01, Juergen Gross wrote:
>>> On 16.11.21 15:55, Jan Beulich wrote:
>>>> On 16.11.2021 15:33, Juergen Gross wrote:
>>>>
>>>>>       config XEN_PRIVCMD
>>>>> -    tristate
>>>>> +    tristate "Xen hypercall passthrough driver"
>>>>>        depends on XEN
>>>>>        default m
>>>>> +    help
>>>>> +      The hypercall passthrough driver allows user land programs to perform
>>>> Maybe worth adding "privileged" here? Albeit of course that's different
>>>> from the use of the word ...
>>> I guess you mean "... allows privileged user programs ..." (another
>>> variant might be "The privileged hypercall passthrough ...")?
>> The former, yes.
>
>
> I can apply with this change, no need to resend.
>
>


Applied to for-linus-5.16c


-boris


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

* Re: [PATCH] xen/privcmd: make option visible in Kconfig
  2021-11-15 10:02 ` Jan Beulich
@ 2021-11-15 10:25   ` Thomas Weißschuh
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Weißschuh @ 2021-11-15 10:25 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Boris Ostrovsky, Juergen Gross, Stefano Stabellini, xen-devel,
	linux-kernel

On 2021-11-15 11:02+0100, Jan Beulich wrote:
> On 13.11.2021 09:38, Thomas Weißschuh wrote:
> > This configuration option provides a misc device as an API to userspace.
> > Make this API usable without having to select the module as a transitive
> > dependency.
> > 
> > This also fixes an issue where localyesconfig would select
> > CONFIG_XEN_PRIVCMD=m because it was not visible and defaulted to
> > building as module.
> > 
> > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> > 
> > ---
> > 
> > Note: If CONFIG_XEN_PRIVCMD really is only meant to be selected by
> > XENFS, then the issue can be fixed by removing its "default m"
> > definition.
> > ---
> >  drivers/xen/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
> > index a1b11c62da9e..c14d8631b8f6 100644
> > --- a/drivers/xen/Kconfig
> > +++ b/drivers/xen/Kconfig
> > @@ -259,7 +259,7 @@ config XEN_SCSI_BACKEND
> >  	  if guests need generic access to SCSI devices.
> >  
> >  config XEN_PRIVCMD
> > -	tristate
> > +	tristate "Xen privileged domain-0 commands"
> >  	depends on XEN
> >  	default m
> 
> While I agree with adding a prompt here, I'm not sure why you've added
> "domain-0" to its wording. Aiui this interface is equally available in
> DomU-s, just that they would be able to only (successfully) use a more
> restricted set of hypercalls. Otherwise the XEN dependency would need
> to be changed to XEN_DOM0 at the same time as adding a prompt, or the
> prompt's visibility be restricted to XEN_DOM0.

I got it from comment at the top of privcmd.c.

To be honest I have no knowledge about Xen and only submitted this patch to get
rid of the spurious module in my localyesconfig.

I can try to find a better wording and submit a v2 but would also be happy if
somebody more knowledgeable about this module wrote a patch, which would
probably be easiest for everybody.

Thanks,
Thomas

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

* Re: [PATCH] xen/privcmd: make option visible in Kconfig
  2021-11-13  8:38 Thomas Weißschuh
@ 2021-11-15 10:02 ` Jan Beulich
  2021-11-15 10:25   ` Thomas Weißschuh
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2021-11-15 10:02 UTC (permalink / raw)
  To: Thomas Weißschuh, Boris Ostrovsky, Juergen Gross,
	Stefano Stabellini, xen-devel
  Cc: linux-kernel

On 13.11.2021 09:38, Thomas Weißschuh wrote:
> This configuration option provides a misc device as an API to userspace.
> Make this API usable without having to select the module as a transitive
> dependency.
> 
> This also fixes an issue where localyesconfig would select
> CONFIG_XEN_PRIVCMD=m because it was not visible and defaulted to
> building as module.
> 
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> 
> ---
> 
> Note: If CONFIG_XEN_PRIVCMD really is only meant to be selected by
> XENFS, then the issue can be fixed by removing its "default m"
> definition.
> ---
>  drivers/xen/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
> index a1b11c62da9e..c14d8631b8f6 100644
> --- a/drivers/xen/Kconfig
> +++ b/drivers/xen/Kconfig
> @@ -259,7 +259,7 @@ config XEN_SCSI_BACKEND
>  	  if guests need generic access to SCSI devices.
>  
>  config XEN_PRIVCMD
> -	tristate
> +	tristate "Xen privileged domain-0 commands"
>  	depends on XEN
>  	default m

While I agree with adding a prompt here, I'm not sure why you've added
"domain-0" to its wording. Aiui this interface is equally available in
DomU-s, just that they would be able to only (successfully) use a more
restricted set of hypercalls. Otherwise the XEN dependency would need
to be changed to XEN_DOM0 at the same time as adding a prompt, or the
prompt's visibility be restricted to XEN_DOM0.

Jan


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

* [PATCH] xen/privcmd: make option visible in Kconfig
@ 2021-11-13  8:38 Thomas Weißschuh
  2021-11-15 10:02 ` Jan Beulich
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Weißschuh @ 2021-11-13  8:38 UTC (permalink / raw)
  To: Boris Ostrovsky, Juergen Gross, Stefano Stabellini, xen-devel
  Cc: Thomas Weißschuh, linux-kernel

This configuration option provides a misc device as an API to userspace.
Make this API usable without having to select the module as a transitive
dependency.

This also fixes an issue where localyesconfig would select
CONFIG_XEN_PRIVCMD=m because it was not visible and defaulted to
building as module.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>

---

Note: If CONFIG_XEN_PRIVCMD really is only meant to be selected by
XENFS, then the issue can be fixed by removing its "default m"
definition.
---
 drivers/xen/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
index a1b11c62da9e..c14d8631b8f6 100644
--- a/drivers/xen/Kconfig
+++ b/drivers/xen/Kconfig
@@ -259,7 +259,7 @@ config XEN_SCSI_BACKEND
 	  if guests need generic access to SCSI devices.
 
 config XEN_PRIVCMD
-	tristate
+	tristate "Xen privileged domain-0 commands"
 	depends on XEN
 	default m
 

base-commit: 66f4beaa6c1d28161f534471484b2daa2de1dce0
-- 
2.33.1


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

end of thread, other threads:[~2021-11-17 16:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16 14:33 [PATCH] xen/privcmd: make option visible in Kconfig Juergen Gross
2021-11-16 14:55 ` Jan Beulich
2021-11-16 15:01   ` Juergen Gross
2021-11-16 16:05     ` Jan Beulich
2021-11-16 22:33       ` Boris Ostrovsky
2021-11-17 16:05         ` Boris Ostrovsky
2021-11-16 14:59 ` Thomas Weißschuh
  -- strict thread matches above, loose matches on Subject: below --
2021-11-13  8:38 Thomas Weißschuh
2021-11-15 10:02 ` Jan Beulich
2021-11-15 10:25   ` Thomas Weißschuh

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