Bug#900793: iperf2 crashes with long time run on 40Gb/s NICs

2018-06-04 Thread Manoj Iyer



Package: iperf
Version: 2.0.10+dfsg1-1

iperf segfaults with long runs on 40Gb/s NICs.

iperf -c 192.168.121.2 -P10 -w 130k -t 3600

Client connecting to 192.168.121.2, TCP port 5001
TCP window size: 254 KByte (WARNING: requested 127 KByte)

[ 10] local 192.168.121.3 port 40756 connected with 192.168.121.2 port
5001
[ 12] local 192.168.121.3 port 40760 connected with 192.168.121.2 port
5001
[ 11] local 192.168.121.3 port 40758 connected with 192.168.121.2 port
5001
[ 8] local 192.168.121.3 port 40754 connected with 192.168.121.2 port 5001
[ 9] local 192.168.121.3 port 40752 connected with 192.168.121.2 port 5001
[ 7] local 192.168.121.3 port 40750 connected with 192.168.121.2 port 5001
[ 6] local 192.168.121.3 port 40746 connected with 192.168.121.2 port 5001
[ 5] local 192.168.121.3 port 40748 connected with 192.168.121.2 port 5001
[ 3] local 192.168.121.3 port 40744 connected with 192.168.121.2 port 5001
[ 4] local 192.168.121.3 port 40742 connected with 192.168.121.2 port 5001
Segmentation fault (core dumped)

function byte_snprintf() when calculating SUM, where SUM is in terabyte,
we go past the kLabel_Byte/kLabel_bit array limit (by increment of conv
past kConv_Giga) and this causes iperf to segfault because suffix is
pointing past the array bounds.

A fix for this issue is available in:
https://sourceforge.net/p/iperf2/code/ci/fce3254827eb05fee56aa6a2e9f0d69cbe599a69/

--

Manoj Iyer
Ubuntu/Canonical
ARM Servers - Cloud




Bug#882873: patch to add memhog and migspeed under /usr/bin

2017-11-27 Thread Manoj Iyer


Please consider this patch to add memhog and migspeed under /usr/bin in 
numactl.


Other distros add these utils under /usr/bin or /usr and scripts and tests 
that use them expect to find these utils there. I have attached a patch 
that installs memhog and migspeed under /usr/bin and updated the 
README.debian accordingly.


Regards
--

Manoj Iyer
Ubuntu/Canonical
ARM Servers - Cloud
Description: Install memhog and migspeed under /usr/bin
 Other distros seem to install memhog and migspeed under /usr/bin or /bin, scripts that use them expect these utils to be installed there. This patch installs memhog and migspeed under /usr/bin
Author: Manoj Iyer manoj.i...@canonical.com
Origin: other
Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882873
Forwarded: no
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/debian/README.debian
+++ b/debian/README.debian
@@ -2,9 +2,9 @@ numactl for Debian
 --
 
 Note the example applications, memhog and numademo, are installed in
-/usr/share/doc/numctl/examples.  The upstream source code comes with a
-small test suite which is not included in the Debian package.  You may
-like to investigate this if you are having problems.
+/usr/bin.  The upstream source code comes with a small test suite which
+is not included in the Debian package.  You may like to investigate this
+if you are having problems.
 
 This code is not finalised as yet, so please be sure to report any
 bugs or other mis-behaviour.
--- a/debian/numactl.install
+++ b/debian/numactl.install
@@ -1,3 +1,5 @@
 debian/tmp/usr/bin/numactl
 debian/tmp/usr/bin/numastat
-debian/tmp/usr/bin/migratepages
\ No newline at end of file
+debian/tmp/usr/bin/memhog
+debian/tmp/usr/bin/migratepages
+debian/tmp/usr/bin/migspeed


Bug#882873: numactl - install memhog and migspeed under /usr/bin

2017-11-27 Thread Manoj Iyer


Package: numactl
Version: 2.0.11-2.1
Severity: normal

numactl builds memhog and migspeed during build but does not install it 
when the package is installed. The debian/README.debian suggests that 
these utils be installed under /usr/share/doc/numctl/examples, but 
shipping these utils here results in a compressed memhog.gz and 
migspeed.gz. Other distros installs these utils under /usr/bin, any test 
scripts that use these utils expect these tools to be in /usr/bin.


memhog and migspeed needs to be added to debian/numactl.install file, and 
installed under /usr/bin.


--

Manoj Iyer
Ubuntu/Canonical
ARM Servers - Cloud




Bug#875537: Acknowledgement ([ARM64] openipmi: load ipmi_ssif on ARM64 systems.)

2017-09-12 Thread Manoj Iyer
After I reported this bug I found that ppc64le has a similar issue, so 
I have added logic for that arch as well. Please consider the attached 
patch to fix this bug I reported. I have tested this on arm64 and 
ppc64le systems.


On Mon, Sep 11, 2017 at 7:09 PM, Debian Bug Tracking System 
 wrote:

Thank you for filing a new Bug report with Debian.

You can follow progress on this Bug here: 875537: 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=875537.


This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 Noël Köthe 

If you wish to submit further information on this problem, please
send it to 875...@bugs.debian.org.

Please do not send mail to ow...@bugs.debian.org unless you wish
to report a problem with the Bug-tracking system.

--
875537: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=875537
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems

Description: load ipmi_ssif for arm64 and ipmi_powernv for ppc64le
 arm64 systems use ipmi_ssif and ppc64le systems use ipmi_powernv module,
 in both cases loading the default ipmi_si module would fail, and the 
 openipmi service would fail to start. This patch loads the correct module
 for each of those archs, and the service start does not fail. 
Author: Manoj Iyer 
Origin: other
Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=875537
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/debian/openipmi.init
+++ b/debian/openipmi.init
@@ -43,7 +43,14 @@ MODULE_NAME="ipmi"
 INTF_NUM=0
 
 IPMI_SMB_MODULE_NAME="ipmi_smb"
-IPMI_SI_MODULE_NAME="ipmi_si"
+case $(uname -m) in
+"aarch64")
+IPMI_SI_MODULE_NAME="ipmi_ssif" ;;
+"ppc64le")
+IPMI_SI_MODULE_NAME="ipmi_powernv" ;;
+*)
+IPMI_SI_MODULE_NAME="ipmi_si" ;;
+esac
 kernel=`uname -r | cut -d. -f1-2`
 if [ "${kernel}" == "2.4" ]; then
 IPMI_SMB_MODULE_NAME="ipmi_smb_intf"


Bug#875537: [ARM64] openipmi: load ipmi_ssif on ARM64 systems.

2017-09-11 Thread Manoj Iyer

Package: openipmi
Version: 2.0.22-1.1
Tags: arm64
Severity: important
Usertags: arm64

ARM64 systems use ipmi_ssif instead of ipmi_si. A possible fix is to 
get debian/openipmi.init to load ipmi_ssif if the system is arm64. I 
will submit a patch to this bug for you to consider.


Thanks
Manoj Iyer


Bug#854826: [PATCH] [ARM64] kexec: Increase the upper limit for RAM segments

2017-02-10 Thread Manoj Iyer
The patch applys to ARM64 architecture and does not touch other arch 
code.


The attached patch increases KEXEC_SEGMENT_MAX from hardcoded value of 
16 to 64. The patch was tested on an ARM64 (vm). This patch applies 
cleanly to 2.0.14-1 version of debian kexec-tools: 
https://pastebin.ubuntu.com/23969766/


[TESTING]
root@debian:/home/ubuntu/new# cat /proc/iomem
0900-09000fff : /pl011@900
 0900-09000fff : /pl011@900
0903-09030fff : /pl061@903
0a003c00-0a003dff : a003c00.virtio_mmio
0a003e00-0a003fff : a003e00.virtio_mmio
1000-3efe : /pcie@1000
3f00-3fff : PCI ECAM
4000-bfff : System RAM
 4008-4094 : Kernel code
 40c8-40e25fff : Kernel data
c000- : reserved
1-13858 : System RAM
13859-13874 : reserved
13875-13bc1 : System RAM
13bc2-13bff : reserved
13c00-13fff : System RAM
80-ff : /pcie@1000
root@debian:/home/ubuntu/new#

root@debian:/home/ubuntu/new# dpkg -l | grep kexec-tools
ii  kexec-tools1:2.0.14-1.1
arm64tools to support fast kexec reboots

root@debian:/home/ubuntu/new#

root@debian:/home/ubuntu/new# kexec -d -l /boot/vmlinuz-4.9.0-1-arm64 
--reuse-cmd --initrd=/boot/initrd.img-4.9.0-1-arm64
arch_process_options:141: command_line: 
root=UUID=010a5260-8c6d-444c-82cd-6cf9b0cbc120 ro quiet

arch_process_options:143: initrd: /boot/initrd.img-4.9.0-1-arm64
arch_process_options:144: dtb: (null)
Try gzip decompression.
kernel: 0x8201f010 kernel_size: 0xcffa00
get_memory_ranges_iomem_cb: 4000 - bfff : 
System RAM
get_memory_ranges_iomem_cb: 0001 - 00013858 : 
System RAM
get_memory_ranges_iomem_cb: 00013875 - 00013bc1 : 
System RAM
get_memory_ranges_iomem_cb: 00013c00 - 00013fff : 
System RAM

elf_arm64_probe: Not an ELF executable.
image_arm64_load: kernel_segment: 4000
image_arm64_load: text_offset:0008
image_arm64_load: image_size: 00da6000
image_arm64_load: phys_offset:4000
image_arm64_load: vp_offset:  
image_arm64_load: PE format:  yes
read_1st_dtb: found /sys/firmware/fdt

root@debian:/home/ubuntu/new# kexec -e

Message from syslogd@debian at Feb 10 17:42:22 ...
kernel:[  904.990897] kexec_core: Starting new kernel
[0.464088] kvm [1]: HYP mode not available
/dev/vda2: recovering journal
/dev/vda2: clean, 45371/2342912 files, 556007/9368064 blocks

Debian GNU/Linux 9 debian ttyAMA0

debian login:


diff -Nru kexec-tools-2.0.14/debian/changelog kexec-tools-2.0.14/debian/changelog
--- kexec-tools-2.0.14/debian/changelog	2017-01-25 14:36:57.0 -0500
+++ kexec-tools-2.0.14/debian/changelog	2017-02-10 17:33:07.0 -0500
@@ -1,3 +1,9 @@
+kexec-tools (1:2.0.14-1.1) UNRELEASED; urgency=medium
+
+  * kexec: Increase the upper limit for RAM segments (Closes: #854826)
+
+ -- Manoj Iyer   Fri, 10 Feb 2017 17:33:07 -0500
+
 kexec-tools (1:2.0.14-1) unstable; urgency=medium
 
   * New upstream release
diff -Nru kexec-tools-2.0.14/debian/patches/kexec-Increase-the-upper-limit-for-RAM-segments.patch kexec-tools-2.0.14/debian/patches/kexec-Increase-the-upper-limit-for-RAM-segments.patch
--- kexec-tools-2.0.14/debian/patches/kexec-Increase-the-upper-limit-for-RAM-segments.patch	1969-12-31 19:00:00.0 -0500
+++ kexec-tools-2.0.14/debian/patches/kexec-Increase-the-upper-limit-for-RAM-segments.patch	2017-02-10 17:32:40.0 -0500
@@ -0,0 +1,28 @@
+From 24aa2d93cac316657a2c20f28b8687bbf7e22991 Mon Sep 17 00:00:00 2001
+From: Sameer Goel 
+Date: Wed, 18 Jan 2017 16:15:12 -0700
+Subject: [PATCH] kexec: Increase the upper limit for RAM segments
+
+On a newer UEFI based Qualcomm target the number of system ram regions
+retrieved from /proc/iomem are ~40. So increasing the current hardcoded
+values to 64 from 16.
+
+Signed-off-by: Sameer Goel 
+Signed-off-by: Simon Horman 
+---
+ kexec/arch/arm64/kexec-arm64.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: kexec-tools-2.0.14/kexec/arch/arm64/kexec-arm64.h
+===
+--- kexec-tools-2.0.14.orig/kexec/arch/arm64/kexec-arm64.h
 kexec-tools-2.0.14/kexec/arch/arm64/kexec-arm64.h
+@@ -11,7 +11,7 @@
+ #include "image-header.h"
+ #include "kexec.h"
+ 
+-#define KEXEC_SEGMENT_MAX 16
++#define KEXEC_SEGMENT_MAX 64
+ 
+ #define BOOT_BLOCK_VERSION 17
+ #define BOOT_BLOCK_LAST_COMP_VERSION 16
diff -Nru kexec-tools-2.0.14/debian/patches/series kexec-tools-2.0.14/debian/patches/series
--- kexec-tools-2.0.14/debian/patches/series	2017-01-25 14:36:57.0 -0500
+++ kexec-tools-2.0.14/debian/patches/series	2017-02-10 17:32:29.0 -0500
@@ -7,3 +7,4 @@
 const_string_warning.patch
 powerpcspe_support.patch
 arm64_build.patch
+kexec-Increase-the-upper-limit-for-RAM-segments.patch


Bug#854826: [ARM64] kexec: Increase the upper limit for RAM segments

2017-02-10 Thread Manoj Iyer

Package: kexec-tools
Version: 2.0.14-1
Tags: arm64
Severity: important
Usertags: arm64

On a newer UEFI based Qualcomm target the number of system ram regions 
retrieved from /proc/iomem are ~40. Currently KEXEC_SEGMENT_MAX is set 
to 16, which represents the kexec segments passed to kexec_load 
syscall, like kernel image, initrd image etc. The patch increases the 
value to 64. This enables kexec to see all the "System RAM" as recorded 
in /proc/iomem.


With KEXEC_SEGMENT_MAX hardcoded to 16, currently kexec is unable to 
see all the "System RAM" recorded in /proc/iomem.


Bug#854093: [PATCH] [ARM64] kexec fails to load compressed kernel.

2017-02-03 Thread Manoj Iyer


Attached is a patch that adds compressed kernel support for ARM64. Debian 
does not ship compressed kernels, the test results below show that 
original functionality is maintained. Please review and apply to 
kexec-tools package.


== Before Patch ==
kexec-tools (1:2.0.14-1)

root@debian:/home/ubuntu# kexec -l /boot/vmlinuz-4.9.0-1-arm64 
--initrd=/boot/initrd.img-4.9.0-1-arm64 
--append="root=UUID=010a5260-8c6d-444c-82cd-6cf9b0cbc120 ro"
root@debian:/home/ubuntu# kexec -e

Debian GNU/Linux 9 debian ttyAMA0

debian login: [   26.369875] kexec_core: Starting new kernel
[0.00] Booting Linux on physical CPU 0x0
[0.00] Linux version 4.9.0-1-arm64 (debian-ker...@lists.debian.org) 
(gcc version 6.2.1 20161124 (Debian 6.2.1-5) ) #1 SMP Debian 4.9.2-2+kexec.1 
(2017-01-25)
[0.00] Boot CPU: AArch64 Processor [510f8000]
[0.00] efi: Getting EFI parameters from FDT:
[0.00] efi: EFI v2.60 by EDK II
[0.00] efi:  SMBIOS 3.0=0x13bdb  ACPI 2.0=0x1386d  
MEMATTR=0x13af01898

[  OK  ] Started Update UTMP about System Runlevel Changes.

Debian GNU/Linux 9 debian ttyAMA0

debian login:


== After Patch ==
kexec-tools (1:2.0.14-1.1)

root@debian:/home/ubuntu# kexec -l /boot/vmlinuz-4.9.0-1-arm64 
--initrd=/boot/initrd.img-4.9.0-1-arm64 
--append="root=UUID=010a5260-8c6d-444c-82cd-6cf9b0cbc120 ro"
root@debian:/home/ubuntu# kexec -e

Debian GNU/Linux 9 debian ttyAMA0

debian login: [ 1669.265708] kexec_core: Starting new kernel
[0.00] Booting Linux on physical CPU 0x0
[0.00] Linux version 4.9.0-1-arm64 (debian-ker...@lists.debian.org) 
(gcc version 6.2.1 20161124 (Debian 6.2.1-5) ) #1 SMP Debian 4.9.2-2+kexec.1 
(2017-01-25)
[0.00] Boot CPU: AArch64 Processor [510f8000]
[0.00] efi: Getting EFI parameters from FDT:
[0.00] efi: EFI v2.60 by EDK II
[0.00] efi:  SMBIOS 3.0=0x13bdb  ACPI 2.0=0x1386d  
MEMATTR=0x13af01898
[0.00] psci: probing for conduit method from DT.
[0.00] psci: PSCIv0.2 detected in firmware.
[0.00] psci: Using standard PSCI v0.2 function IDs
[0.00] psci: Trusted OS migration not required

.
[  OK  ] Started Update UTMP about System Runlevel Changes.

Debian GNU/Linux 9 debian ttyAMA0

debian login:

Thanks
--
====
Manoj Iyer
Ubuntu/Canonical
ARM Servers - Cloud
diff -Nru kexec-tools-2.0.14/debian/changelog kexec-tools-2.0.14/debian/changelog
--- kexec-tools-2.0.14/debian/changelog	2017-01-25 14:36:57.0 -0500
+++ kexec-tools-2.0.14/debian/changelog	2017-02-03 18:53:35.0 -0500
@@ -1,3 +1,9 @@
+kexec-tools (1:2.0.14-1.1) UNRELEASED; urgency=medium
+
+  * Enable compressed kernel support for ARM64 (Closes: #854093)
+
+ -- Manoj Iyer   Fri, 03 Feb 2017 18:53:35 -0500
+
 kexec-tools (1:2.0.14-1) unstable; urgency=medium
 
   * New upstream release
diff -Nru kexec-tools-2.0.14/debian/control kexec-tools-2.0.14/debian/control
--- kexec-tools-2.0.14/debian/control	2017-01-25 14:36:57.0 -0500
+++ kexec-tools-2.0.14/debian/control	2017-02-03 18:53:35.0 -0500
@@ -3,7 +3,7 @@
 Homepage: http://kernel.org/pub/linux/utils/kernel/kexec/
 Priority: optional
 Maintainer: Khalid Aziz 
-Build-Depends: debhelper (>= 7.0.0), dh-autoreconf, gnu-efi (>=3.0a-4)[ia64], libz-dev[ia64], po-debconf
+Build-Depends: debhelper (>= 7.0.0), dh-autoreconf, gnu-efi (>=3.0a-4)[ia64], libz-dev [arm64 ia64], po-debconf
 Standards-Version: 3.9.8
 
 Package: kexec-tools


Bug#854093: [ARM64] kexec fails to load compressed kernel.

2017-02-03 Thread Manoj Iyer

Package: kexec-tools
Version: 2.0.14-1
Tags: arm64
Severity: important
Usertags: arm64

kexec-tools has a build dependency on libz-dev on ARM64 architecture. 
It can use interfaces from libz-dev to uncompress a compressed kernel. 
If this built without libz-dev kexec will not be able to uncompress a 
compressed kernel.