Skip to content

Commit 6520fed

Browse files
Vasily Gorbikgregkh
authored andcommitted
s390/hypfs: include z/VM guests with access control group set
commit 663d34c upstream. Currently if z/VM guest is allowed to retrieve hypervisor performance data globally for all guests (privilege class B) the query is formed in a way to include all guests but the group name is left empty. This leads to that z/VM guests which have access control group set not being included in the results (even local vm). Change the query group identifier from empty to "any" to retrieve information about all guests from any groups (or without a group set). Cc: stable@vger.kernel.org Fixes: 31cb4bd ("[S390] Hypervisor filesystem (s390_hypfs) for z/VM") Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c10e062 commit 6520fed

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎arch/s390/hypfs/hypfs_vm.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
static char local_guest[] = " ";
2222
static char all_guests[] = "* ";
23+
static char *all_groups = all_guests;
2324
static char *guest_query;
2425

2526
struct diag2fc_data {
@@ -62,10 +63,11 @@ static int diag2fc(int size, char* query, void *addr)
6263

6364
memcpy(parm_list.userid, query, NAME_LEN);
6465
ASCEBC(parm_list.userid, NAME_LEN);
65-
parm_list.addr = (unsigned long) addr ;
66+
memcpy(parm_list.aci_grp, all_groups, NAME_LEN);
67+
ASCEBC(parm_list.aci_grp, NAME_LEN);
68+
parm_list.addr = (unsigned long)addr;
6669
parm_list.size = size;
6770
parm_list.fmt = 0x02;
68-
memset(parm_list.aci_grp, 0x40, NAME_LEN);
6971
rc = -1;
7072

7173
diag_stat_inc(DIAG_STAT_X2FC);

0 commit comments

Comments
 (0)