On Ubuntu and Debian, the hardened build passes the following flags to the compilation
through env. variables.
Hence several formatting strings are mandatory. Also for that to work, the Makefile
needs to handle the env. variables.
$ dpkg-buildflags
CFLAGS=-g -O3 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
CPPFLAGS=-D_FORTIFY_SOURCE=2
CXXFLAGS=-g -O3 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
FFLAGS=-g -O3 -fstack-protector --param=ssp-buffer-size=4
GCJFLAGS=-g -O3 -fstack-protector --param=ssp-buffer-size=4
LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro
Signed-off-by: Frédéric Bonnard <frediz@linux.vnet.ibm.com>
<pci/pci.h> was being included, but not actually used in any meaningful
way. Since libpci is distributed under the GPL which is not compatible
with iprutils' licence, it would be a good idea to avoid this
dependency.
iprutils was however relying on the u8, u16, u32, and u64 types defined
by <pci/types.h>. Define these locally (using <stdint.h>) instead.
Signed-off-by: Colin Watson <cjwatson@debian.org>
---
libsysfs is unmaintained and just adds an oerhead for very little
gain. So implement the core functions ourselves and drop libsysfs.
Signed-off-by: Hannes Reinecke <hare@suse.de>
When creating array to perform dual adapter tests, iprlib.c had a
flawed ipr_update_qac_with_zeroed_devs function, which was not
initializing dev_rcd variable. This commit initializes it and
fixes the crash.
Signed-off-by: Daniel Kreling <kreling@imap.linux.ibm.com>
Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
The patch se "Logical Disk State" feature to track if a devie has been
zeroed to avoid the Zeroed indication.
Signed-off-by: Wen Xiong<wenxiong@linux.vnet.ibm.com>
In testing easy tier, when configuration has valid sdd/hdd capability, creating
an array fails in CLI.
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
Add CLI option to specify a text string label
when creating a RAID array which can then be
later queried.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
In several linux distro, when formatting from JBOD to AF, system hung after
formatting finished. The patch fixes the issue.
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
Disk in VSES on P8 only has single resource path, this is difference with
VSES on P7. This patch fixes the issue and all disks are showed up in
hot swap menu correctly.
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
In get_drive_phy_loc_with_ses_phy_loc() the code assumes that the IOA
has the physical location code information on the struct, but if the
platform does not provide this information the code will break since the
string is not sanity-checked before being used.
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
After commit f2f69447 (iprutils: suspend/resume utility for BlueHawk),
the iprutils output of some screens had the columns header "PCI/SCSI
Location" and "Platform Location" shortened by one character, but the
contents of the columns were not changed, so the contents of the
following columns are not aligned with the header.
This patch fixes the issue by changing the columns content width, so
columns are aligned with their headers.
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
This patch addes support to format 4K disks to RAID or JBOD in iprutils
command line.
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
This patch addes the new description for 4K devices on all the
screens in iprutils GUI interface.
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
In function check_current_config(), when inquiring the IOA to fill the
yl_serial_num structure field, the di_vpd struct is used even if the
call to ipr_inquiry() has failed, which can lead to segmentation fault
since the struct can have any values in it. Other issues can also happen
since pchr is used without checking if strstr() successfully found the
substring.
This patch fixed the problem by checking for the return code from
ipr_inquiry() and the pointer returned by strstr().
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
If removing a disk from an array first, then hotspare disk kicks in.
This causes two issues here:
(1)hotspare disk kicks in but status showed as "Missing"
(2)Concurrent maintence menu got segmentation fault.
This patch fixed both of above issues.
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
The defines used to check if the hop count is 2 or 3 bits were not
defined correctly.
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
In some scenarios the adapters can be wrongly identified as secondaries,
despite the fact that they are not connected to other adapters.
The function get_dual_ioa_state() relies on the information from the
cur_state field of the ipr_dual_ioa_entry struct to set the is_secondary
flag, even though the query multiple adapter status returns 0 as the
number of multiple adapter entries. In this case, if we use the
ioa_entry struct we can wrongly change the is_secondary flag.
This patch fix this issue by not changing the default multi adapter
configuration when the number of multiple adapter entries is 0.
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
The rpm spec file had a wrong date format on the %changelog section,
generating errors when compiling the package. This patch fixes the date
format.
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Not all distros provide an interface to install_initd and remove_initd
that is compliant to the LSB specification, requiring more parameters
to be given than just the path to the init script. In such cases, it is
preferred to use chkconfig when available.
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
This patch fixes the platform location for hard disk. Now platform location
for hard disk is combined location of ses and physical location slot number.
signed-off-by: wenxiong@linux.vnet.ibm.com