Accepting request 699778 from hardware
OBS-URL: https://build.opensuse.org/request/show/699778 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/qclib?expand=0&rev=4
This commit is contained in:
commit
b222e13db9
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:4b5ef6e9ddccb13fc6f9d94fdcf098a75987ff6744c93fe5cf8d2eb7930f86ac
|
|
||||||
size 74070
|
|
3
qclib-1.4.1.tgz
Normal file
3
qclib-1.4.1.tgz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:4bbce5648cc26ac6469fd60ef477204d0352e187773164d5e77f1296a0bdb500
|
||||||
|
size 77198
|
@ -2,5 +2,5 @@ addFilter("qclib.* no-binary")
|
|||||||
addFilter("libqclib1.* shlib-policy-missing-lib")
|
addFilter("libqclib1.* shlib-policy-missing-lib")
|
||||||
addFilter("file-contains-date-and-time /usr/share/doc/packages/qclib/*")
|
addFilter("file-contains-date-and-time /usr/share/doc/packages/qclib/*")
|
||||||
addFilter("files-duplicate /usr/share/doc/packages/qclib/html/ftv2*")
|
addFilter("files-duplicate /usr/share/doc/packages/qclib/html/ftv2*")
|
||||||
addFilter("files-duplicate /usr/share/doc/packages/qclib/html/search/all_[12].js")
|
addFilter("files-duplicate /usr/share/doc/packages/qclib/html/search/all_[0-4].js")
|
||||||
addFilter("files-duplicate /usr/share/doc/packages/qclib/html/search/classes_[04].js")
|
addFilter("files-duplicate /usr/share/doc/packages/qclib/html/search/classes_[0-4].js")
|
||||||
|
@ -1,147 +0,0 @@
|
|||||||
commit 13d7aafb0cb8946880abbb73725b0340bec1cd3a
|
|
||||||
Author: Stefan Raspl <stefan.raspl@de.ibm.com>
|
|
||||||
Date: Fri Dec 8 22:11:29 2017 +0100
|
|
||||||
|
|
||||||
STHYI: Fix mismatch case with STHYI and /proc/sysinfo data
|
|
||||||
|
|
||||||
Reported via Bz162324. Symptom was that qclib wouldn't work on a z/VM 5.4.
|
|
||||||
Analysis revealed that although the STHYI instruction wasn't available, the
|
|
||||||
newly added STHYI syscall would work, but (as intended) reported only layers
|
|
||||||
up to LPAR. In contrast, /proc/sysinfo would report all layers, including the
|
|
||||||
z/VM layer. Some detection logic kicked in and reported an error.
|
|
||||||
The problem was rooted in a bizarr combination of multiple glitches:
|
|
||||||
* An (unnecessary) extra handling for z/VM that was previously added would
|
|
||||||
raise an error on mismatching layer counts in STHYI and /proc/sysinfo. This
|
|
||||||
was to detect cases with more than 3 levels of nested virtualization. But the
|
|
||||||
check just was for mismatching counts and didn't check for the 3 layers
|
|
||||||
reported by STHYI at all.
|
|
||||||
* Furthermore, the check mentioned above was unnecessary to begin with: When
|
|
||||||
STHYI reports data for 3 VM layers, and /proc/sysinfo for more, then the
|
|
||||||
extra layers will simply not get any data from STHYI - no harm done.
|
|
||||||
* STHYI in KVM worked like a charm ever since, though it is supposed to fail
|
|
||||||
with the same error as z/VM since STHYI in KVM (and likewise the syscall in
|
|
||||||
LPARs) cannot report data beyond the LPAR layer - it should result in the
|
|
||||||
same mismatch that z/VM experienced. However, the respective routines would
|
|
||||||
only ever consider VM layers in z/VM and ignore the ones in KVM! Hence all
|
|
||||||
layers beyond LPAR wouldn't be accounted for on KVM!
|
|
||||||
To fix, we're ripping out the extra check, and rewrite the remaining code to
|
|
||||||
handle z/VM and KVM alike.
|
|
||||||
Furthermore, we rename "STHYI@VM" to "STHYI instruction", and "STHYI@LPAR" to
|
|
||||||
"STHYI syscall" for improved clarity.
|
|
||||||
|
|
||||||
diff --git a/query_capacity_sthyi.c b/query_capacity_sthyi.c
|
|
||||||
index b3bd9e8..688062f 100644
|
|
||||||
--- a/query_capacity_sthyi.c
|
|
||||||
+++ b/query_capacity_sthyi.c
|
|
||||||
@@ -91,16 +91,16 @@ static int qc_sthyi_lpar(struct qc_handle *hdl, struct sthyi_priv *priv) {
|
|
||||||
#ifdef __NR_s390_sthyi
|
|
||||||
sthyi = __NR_s390_sthyi
|
|
||||||
#endif
|
|
||||||
- qc_debug(hdl, "Try STHYI@LPAR\n");
|
|
||||||
+ qc_debug(hdl, "Try STHYI syscall\n");
|
|
||||||
if (syscall(sthyi, 0, priv->data, &cc, 0) || cc) {
|
|
||||||
if (errno == ENOSYS) {
|
|
||||||
- qc_debug(hdl, "STHYI@LPAR is not available\n");
|
|
||||||
+ qc_debug(hdl, "STHYI syscall is not available\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
- qc_debug(hdl, "Error: STHYI@LPAR execution failed: errno='%s', cc=%" PRIu64 "\n", strerror(errno), cc);
|
|
||||||
+ qc_debug(hdl, "Error: STHYI syscall execution failed: errno='%s', cc=%" PRIu64 "\n", strerror(errno), cc);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
- qc_debug(hdl, "STHYI@LPAR succeeded\n");
|
|
||||||
+ qc_debug(hdl, "STHYI syscall succeeded\n");
|
|
||||||
priv->avail = STHYI_AVAILABLE;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -281,25 +281,15 @@ static int qc_parse_sthyi_guest(struct qc_handle *gst, struct inf0gst *guest) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static int qc_get_num_vm_layers(struct qc_handle *hdl, int *rc) {
|
|
||||||
- int i;
|
|
||||||
-
|
|
||||||
- for (hdl = hdl->root, i = 0; hdl != NULL; hdl = hdl->next) {
|
|
||||||
- if (*(int *)(hdl->layer) == QC_LAYER_TYPE_ZVM_HYPERVISOR)
|
|
||||||
- i++;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- return i;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
/* Returns pointer to the n-th hypervisor handle. num starts at 0, and handles
|
|
||||||
are returned in sequence from handle linked list */
|
|
||||||
static struct qc_handle *qc_get_HV_layer(struct qc_handle *hdl, int num) {
|
|
||||||
struct qc_handle *h = hdl;
|
|
||||||
- int i;
|
|
||||||
+ int i, type;
|
|
||||||
|
|
||||||
for (hdl = hdl->root, i = 0, num++; hdl != NULL; hdl = hdl->next) {
|
|
||||||
- if (*(int *)(hdl->layer) == QC_LAYER_TYPE_ZVM_HYPERVISOR && ++i == num)
|
|
||||||
+ type = *(int *)(hdl->layer);
|
|
||||||
+ if ((type == QC_LAYER_TYPE_ZVM_HYPERVISOR || type == QC_LAYER_TYPE_KVM_HYPERVISOR) && ++i == num)
|
|
||||||
return hdl;
|
|
||||||
}
|
|
||||||
qc_debug(h, "Error: Couldn't find HV layer %d, only %d layer(s) found\n", num, i);
|
|
||||||
@@ -309,7 +299,7 @@ static struct qc_handle *qc_get_HV_layer(struct qc_handle *hdl, int num) {
|
|
||||||
|
|
||||||
static int qc_sthyi_process(struct qc_handle *hdl, char *buf) {
|
|
||||||
struct sthyi_priv *priv = (struct sthyi_priv *)buf;
|
|
||||||
- int no_hyp_gst, num_vm_layers, i, rc = 0;
|
|
||||||
+ int no_hyp_gst, i, rc = 0;
|
|
||||||
struct inf0gst *guest[INF0YGMX];
|
|
||||||
struct inf0hyp *hv[INF0YGMX];
|
|
||||||
struct inf0par *partition;
|
|
||||||
@@ -371,30 +361,14 @@ static int qc_sthyi_process(struct qc_handle *hdl, char *buf) {
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
- num_vm_layers = qc_get_num_vm_layers(hdl, &rc);
|
|
||||||
- if (rc != 0) {
|
|
||||||
- rc = -2;
|
|
||||||
- goto out;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- if (num_vm_layers != no_hyp_gst) {
|
|
||||||
- /* STHYI doesn't support more than 3rd level z/VM */
|
|
||||||
- qc_debug(hdl, "Error: /proc/sysinfo reported %d layers, but STHYI only "
|
|
||||||
- "covers %d\n", num_vm_layers, no_hyp_gst);
|
|
||||||
- rc = -6;
|
|
||||||
- goto out;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
for (i = 0; i < no_hyp_gst; i++) {
|
|
||||||
if ((hdl = qc_get_HV_layer(hdl, i)) == NULL) {
|
|
||||||
rc = -7;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
- if (*(int *)(hdl->layer) == QC_LAYER_TYPE_ZVM_HYPERVISOR) {
|
|
||||||
- if (qc_parse_sthyi_hypervisor(hdl, hv[i]) || qc_parse_sthyi_guest(hdl->next, guest[i])) {
|
|
||||||
- rc = -9;
|
|
||||||
- goto out;
|
|
||||||
- }
|
|
||||||
+ if (qc_parse_sthyi_hypervisor(hdl, hv[i]) || qc_parse_sthyi_guest(hdl->next, guest[i])) {
|
|
||||||
+ rc = -9;
|
|
||||||
+ goto out;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
out:
|
|
||||||
@@ -508,15 +482,15 @@ static int qc_sthyi_open(struct qc_handle *hdl, char **buf) {
|
|
||||||
/* There is no way for us to check programmatically whether
|
|
||||||
we're in an LPAR or in a VM, so we simply try out both */
|
|
||||||
if (qc_is_sthyi_available_vm(hdl)) {
|
|
||||||
- qc_debug(hdl, "Executing STHYI@VM\n");
|
|
||||||
+ qc_debug(hdl, "Executing STHYI instruction\n");
|
|
||||||
/* we assume we are not relocated at this spot, between STFLE and STHYI */
|
|
||||||
if (qc_sthyi_vm(priv)) {
|
|
||||||
- qc_debug(hdl, "Error: STHYI@VM execution failed\n");
|
|
||||||
+ qc_debug(hdl, "Error: STHYI instruction execution failed\n");
|
|
||||||
rc = -3;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
- qc_debug(hdl, "STHYI@VM is not available\n");
|
|
||||||
+ qc_debug(hdl, "STHYI instruction is not available\n");
|
|
||||||
rc = qc_sthyi_lpar(hdl, priv);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,20 +1,58 @@
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Dec 8 22:07:04 UTC 2017 - mpost@suse.com
|
Mon Apr 22 19:57:20 UTC 2019 - Mark Post <mpost@suse.com>
|
||||||
|
|
||||||
- Added qclib-sles15-fix-mismatch-case-with-STHYI.patch (bsc#1071687).
|
- Upgraded to version 1.4.1 (jsc#SLE-5908)
|
||||||
|
Version 1.4.1
|
||||||
|
Bug fixes:
|
||||||
|
* qc_dump: Don't abort the dump in case qc_test fails.
|
||||||
|
* Attributes qc_cp_weight_capping and qc_ifl_weight_capping were set even
|
||||||
|
when initial capping was not set in the LPAR's activation profile.
|
||||||
|
Version 1.4.0
|
||||||
|
Changes:
|
||||||
|
* Added SMT support by properly differentiating between cores and CPUs.
|
||||||
|
* Added new attributes qc_num_threads_cp and qc_num_threads_ifl to layers
|
||||||
|
CEC, LPAR and ZVM_HYPERVISOR.
|
||||||
|
* Deprecated attribute qc_mobility_eligible (remains valid for now) and
|
||||||
|
replaced with qc_mobility_enabled to match z/VM terminology. Likewise
|
||||||
|
switched QC_LAYER_TYPE_ZVM_CPU_POOL to QC_LAYER_TYPE_ZVM_RESOURCE_POOL.
|
||||||
|
* Moved build customization defines (e.g. CONFIG_V1_COMPATIBILITY) to
|
||||||
|
query_capacity.h.
|
||||||
|
* Don't build with textual hypfs per default anymore due to unrecoverable
|
||||||
|
issues (see section 'Bug fixes').
|
||||||
|
Bug fixes:
|
||||||
|
* Added an exception to consistency check to ignore inconsistencies between
|
||||||
|
textual hypfs and STHYI for attributes qc_num_cp_total and
|
||||||
|
qc_num_ifl_total in the LPAR layer.
|
||||||
|
Version 1.3.1
|
||||||
|
Bug fixes:
|
||||||
|
* Security: Fix PATH attack vulnerability when dumping (see QC_DEBUG=2)
|
||||||
|
* STHYI: Add fallback for pre-glibc 2.16 (not using getauxval())
|
||||||
|
* Handle mismatching STHYI and /proc/sysinfo layer counts
|
||||||
|
* On LPAR, fix incomplete dump of binary hypfs when textual hypfs is mounted
|
||||||
|
- Dropped obsolete qclib-sles15-fix-mismatch-case-with-STHYI.patch.
|
||||||
|
- Updated qclib.makefile.libdir.patch to apply cleanly to the new version.
|
||||||
|
- Made numerous changes to the spec file based on the output from
|
||||||
|
spec-cleaner.
|
||||||
|
- Updated qclib-rpmlintrc file to catch all duplicate file messages
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 9 23:14:55 UTC 2018 - mpost@suse.com
|
||||||
|
|
||||||
|
- Added qclib-sles15-fix-mismatch-case-with-STHYI.patch
|
||||||
|
(bsc#1071687, bsc#1104304).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Nov 2 20:03:27 UTC 2017 - mpost@suse.com
|
Wed Aug 1 23:15:13 UTC 2018 - mpost@suse.com
|
||||||
|
|
||||||
- Upgraded to version 1.3.0
|
- Upgraded to version 1.3.0 (Fate#325039)
|
||||||
Changes:
|
Changes:
|
||||||
* Added STHYI support in LPAR
|
* Added STHYI support in LPAR
|
||||||
* Added new env variable QC_DEBUG_FILE (see qc_open())
|
* Added new env variable QC_DEBUG_FILE (see qc_open())
|
||||||
Note: Failure to open a file for logging is now treated as a fatal error
|
Note: Failure to open a file for logging is now treated as a fatal error
|
||||||
* Added script qc_dump to collect debug data in a standardized manner
|
* Added script qc_dump to collect debug data in a standardized manner
|
||||||
* Added attributes qc_layer_uuid and qc_layer_extended_name to LPAR layer
|
* Added attributes qc_layer_uuid and qc_layer_extended_name to LPAR layer
|
||||||
* /proc/sysinfo parsing: Switch from "KVM/Linux" to the less strict "KVM"
|
* /proc/sysinfo parsing: Switch from "KVM/Linux" to the less strict "KVM"
|
||||||
to detect KVM systems
|
to detect KVM systems
|
||||||
* Detect unregistered and closed handles
|
* Detect unregistered and closed handles
|
||||||
* Makefile: Compile SONAME into shared library
|
* Makefile: Compile SONAME into shared library
|
||||||
Bug fixes:
|
Bug fixes:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- qclib-1.0.0/Makefile 2015-10-26 07:46:09.000000000 +0100
|
--- qclib-1.0.0/Makefile 2015-10-26 07:46:09.000000000 +0100
|
||||||
+++ qclib-1.0.0/Makefile 2015-10-26 07:50:21.000000000 +0100
|
+++ qclib-1.0.0/Makefile 2015-10-26 07:50:21.000000000 +0100
|
||||||
@@ -61,10 +61,10 @@
|
@@ -64,10 +64,10 @@
|
||||||
|
|
||||||
install: libqc.a libqc.so.$(VERSION)
|
install: libqc.a libqc.so.$(VERSION)
|
||||||
echo " INSTALL"
|
echo " INSTALL"
|
||||||
|
19
qclib.spec
19
qclib.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package qclib
|
# spec file for package qclib
|
||||||
#
|
#
|
||||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2017, 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -12,24 +12,22 @@
|
|||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
Name: qclib
|
Name: qclib
|
||||||
Version: 1.3.0
|
Version: 1.4.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Query Capacity library
|
Summary: Query Capacity library
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Url: http://www.ibm.com/developerworks/linux/linux390/qclib.html
|
URL: http://www.ibm.com/developerworks/linux/linux390/qclib.html
|
||||||
Source: %{name}-%{version}.tgz
|
Source: %{name}-%{version}.tgz
|
||||||
Source1: %{name}-rpmlintrc
|
Source1: %{name}-rpmlintrc
|
||||||
Patch1: qclib.makefile.libdir.patch
|
Patch1: qclib.makefile.libdir.patch
|
||||||
Patch2: qclib-sles15-fix-mismatch-case-with-STHYI.patch
|
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
ExclusiveArch: s390 s390x
|
ExclusiveArch: s390 s390x
|
||||||
%if 0%{?suse_version} > 1300
|
%if 0%{?suse_version} > 1300
|
||||||
BuildRequires: glibc-devel-static
|
BuildRequires: glibc-devel-static
|
||||||
@ -97,16 +95,15 @@ Systems.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
MYCFLAGS=$(grep ^CFLAGS Makefile | cut -f2 -d=)
|
MYCFLAGS=$(grep ^CFLAGS Makefile | cut -f2 -d=)
|
||||||
make all CFLAGS="${MYCFLAGS} %{optflags}"
|
make %{?_smp_mflags} all CFLAGS="${MYCFLAGS} %{optflags}"
|
||||||
make doc
|
make %{?_smp_mflags} doc
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make test
|
make %{?_smp_mflags} test
|
||||||
make test-sh
|
make %{?_smp_mflags} test-sh
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install LIBDIR=%{_lib} V=1
|
%make_install LIBDIR=%{_lib} V=1
|
||||||
|
Loading…
Reference in New Issue
Block a user