From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxaxL-0000jz-PP for qemu-devel@nongnu.org; Fri, 21 Oct 2016 10:38:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxaxH-0006QD-PP for qemu-devel@nongnu.org; Fri, 21 Oct 2016 10:37:59 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:45603) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bxaxH-0006Pi-HW for qemu-devel@nongnu.org; Fri, 21 Oct 2016 10:37:55 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u9LEYKBG013076 for ; Fri, 21 Oct 2016 10:37:54 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 267m4japq1-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 21 Oct 2016 10:37:54 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 21 Oct 2016 15:37:51 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 84EEC1B08069 for ; Fri, 21 Oct 2016 15:39:52 +0100 (BST) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u9LEblpO21233880 for ; Fri, 21 Oct 2016 14:37:47 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u9LEbl5J023142 for ; Fri, 21 Oct 2016 10:37:47 -0400 From: Halil Pasic Date: Fri, 21 Oct 2016 16:37:37 +0200 Message-Id: <20161021143741.8597-1-pasic@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC PATCH 0/4] VMS_ARRAY_OF_POINTER with null pointers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Amit Shah , Juan Quintela , Guenther Hutzl , "Dr. David Alan Gilbert" , Halil Pasic Make VMS_ARRAY_OF_POINTER cope with null pointers. Currently the reward for trying to migrate an array with some null pointers in it is an illegal memory access, that is a swift and painless death of the process. Let's make vmstate cope with this scenario at least for pointers to structs. We need this functionality for the migration of the channel subsystem (hw/s390x/css.c). Halil Pasic (4): tests/test-vmstate.c: add save_buffer util func tests/test-vmstate.c: add array of pointer to struct migration/vmstate: fix array of pointers to struct tests/test-vmstate.c: add array of pointers to struct with NULL include/migration/vmstate.h | 2 + migration/vmstate.c | 91 ++++++++++++++++++----------- tests/test-vmstate.c | 138 ++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 185 insertions(+), 46 deletions(-) -- 2.8.4