Re: [PATCH] sysctl: XSM hook should not cause XEN_SYSCTL_getdomaininfolist to (appear to) fail

2023-05-02 Thread Jan Beulich
On 02.05.2023 15:13, Daniel P. Smith wrote: > On 5/2/23 07:00, Roger Pau Monné wrote: >> On Tue, May 02, 2023 at 06:43:33AM -0400, Daniel P. Smith wrote: >>> On 5/2/23 03:17, Jan Beulich wrote: Unlike for XEN_DOMCTL_getdomaininfo, where the XSM check is intended to cause the operation to

Re: [PATCH] sysctl: XSM hook should not cause XEN_SYSCTL_getdomaininfolist to (appear to) fail

2023-05-02 Thread Jan Beulich
On 02.05.2023 14:54, Daniel P. Smith wrote: > On 5/2/23 06:59, Jan Beulich wrote: >> On 02.05.2023 12:43, Daniel P. Smith wrote: >>> On 5/2/23 03:17, Jan Beulich wrote: Unlike for XEN_DOMCTL_getdomaininfo, where the XSM check is intended to cause the operation to fail, in the loop here

Re: [PATCH] sysctl: XSM hook should not cause XEN_SYSCTL_getdomaininfolist to (appear to) fail

2023-05-02 Thread Daniel P. Smith
On 5/2/23 07:00, Roger Pau Monné wrote: On Tue, May 02, 2023 at 06:43:33AM -0400, Daniel P. Smith wrote: On 5/2/23 03:17, Jan Beulich wrote: Unlike for XEN_DOMCTL_getdomaininfo, where the XSM check is intended to cause the operation to fail, in the loop here it ought to merely determine

Re: [PATCH] sysctl: XSM hook should not cause XEN_SYSCTL_getdomaininfolist to (appear to) fail

2023-05-02 Thread Daniel P. Smith
On 5/2/23 06:59, Jan Beulich wrote: On 02.05.2023 12:43, Daniel P. Smith wrote: On 5/2/23 03:17, Jan Beulich wrote: Unlike for XEN_DOMCTL_getdomaininfo, where the XSM check is intended to cause the operation to fail, in the loop here it ought to merely determine whether information for the

Re: [PATCH] sysctl: XSM hook should not cause XEN_SYSCTL_getdomaininfolist to (appear to) fail

2023-05-02 Thread Roger Pau Monné
On Tue, May 02, 2023 at 06:43:33AM -0400, Daniel P. Smith wrote: > > > On 5/2/23 03:17, Jan Beulich wrote: > > Unlike for XEN_DOMCTL_getdomaininfo, where the XSM check is intended to > > cause the operation to fail, in the loop here it ought to merely > > determine whether information for the

Re: [PATCH] sysctl: XSM hook should not cause XEN_SYSCTL_getdomaininfolist to (appear to) fail

2023-05-02 Thread Jan Beulich
On 02.05.2023 12:43, Daniel P. Smith wrote: > On 5/2/23 03:17, Jan Beulich wrote: >> Unlike for XEN_DOMCTL_getdomaininfo, where the XSM check is intended to >> cause the operation to fail, in the loop here it ought to merely >> determine whether information for the domain at hand may be reported

Re: [PATCH] sysctl: XSM hook should not cause XEN_SYSCTL_getdomaininfolist to (appear to) fail

2023-05-02 Thread Daniel P. Smith
On 5/2/23 03:17, Jan Beulich wrote: Unlike for XEN_DOMCTL_getdomaininfo, where the XSM check is intended to cause the operation to fail, in the loop here it ought to merely determine whether information for the domain at hand may be reported back. Therefore if on the last iteration the hook

Re: [PATCH] sysctl: XSM hook should not cause XEN_SYSCTL_getdomaininfolist to (appear to) fail

2023-05-02 Thread Jan Beulich
On 02.05.2023 11:33, Roger Pau Monné wrote: > On Tue, May 02, 2023 at 10:27:39AM +0100, Andrew Cooper wrote: >> On 02/05/2023 8:17 am, Jan Beulich wrote: >>> The hook being able to deny access to data for certain domains means >>> that no caller can assume to have a system-wide picture when

Re: [PATCH] sysctl: XSM hook should not cause XEN_SYSCTL_getdomaininfolist to (appear to) fail

2023-05-02 Thread Andrew Cooper
On 02/05/2023 10:33 am, Roger Pau Monné wrote: > On Tue, May 02, 2023 at 10:27:39AM +0100, Andrew Cooper wrote: >> On 02/05/2023 8:17 am, Jan Beulich wrote: >>> The hook being able to deny access to data for certain domains means >>> that no caller can assume to have a system-wide picture when

Re: [PATCH] sysctl: XSM hook should not cause XEN_SYSCTL_getdomaininfolist to (appear to) fail

2023-05-02 Thread Roger Pau Monné
On Tue, May 02, 2023 at 10:27:39AM +0100, Andrew Cooper wrote: > On 02/05/2023 8:17 am, Jan Beulich wrote: > > The hook being able to deny access to data for certain domains means > > that no caller can assume to have a system-wide picture when holding the > > results. > > > > Wouldn't it make

Re: [PATCH] sysctl: XSM hook should not cause XEN_SYSCTL_getdomaininfolist to (appear to) fail

2023-05-02 Thread Andrew Cooper
On 02/05/2023 8:17 am, Jan Beulich wrote: > The hook being able to deny access to data for certain domains means > that no caller can assume to have a system-wide picture when holding the > results. > > Wouldn't it make sense to permit the function to merely "count" domains? > While racy in

[PATCH] sysctl: XSM hook should not cause XEN_SYSCTL_getdomaininfolist to (appear to) fail

2023-05-02 Thread Jan Beulich
Unlike for XEN_DOMCTL_getdomaininfo, where the XSM check is intended to cause the operation to fail, in the loop here it ought to merely determine whether information for the domain at hand may be reported back. Therefore if on the last iteration the hook results in denial, this should not affect