Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp323823pxb; Fri, 16 Apr 2021 06:39:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsTJ49l/iDftbALXOAHKlYoEqG9QhMVs678cVZOEX5smPycSMG2aM0UPipOu5BuPRVkwsG X-Received: by 2002:a50:aad9:: with SMTP id r25mr10052274edc.125.1618580357792; Fri, 16 Apr 2021 06:39:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618580357; cv=none; d=google.com; s=arc-20160816; b=yLbNewEuPCd8LwPIp1yAPgT38xyDgIIbxQq45CvFJhbMheLvU8hrR3MZn0iYdf3izV mosrlSwdQk+BgVUj9hN/p0pO90yk16bcRU6FsWBHg7lV8gS9oWDtZ8djQXIHrkrmx67z /D7YyqDLtMoB7hGqRu2gE+nxiBRIJDVmQZ6kpNmsh6WVxCbKc1yt3W2Qa/AooDjDo5+H qP9/h8Ag9+ZmO729KXijyFS/6cqjXf9ubVA6tgCcZ9w4Q0fNzvi1oW8J7/dxocVyfNLB p9c5q9SJ8c7SxAqJoTomj7E/DNH3dZmLZAvH2ME7zdu1tq6v1OU8NIYzUnL4DvoLa5oC IfGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0KF/dzNzZan6fUVFJHuSnh1NdDQwGWSz1Twu2a0uJ5s=; b=lojgn9zCYIUBNAhJPIisq0N0O6ws8poD+jyfvzssfa4GGR+EIURmzGCp34u4Stc05P 4Ku8ByoOkjoXrnVhpOeeikyNN6fqcxw5p3AY6XTvYbdwJBH46gws+qZYI4JeLKauwpZA xuWIDcKrXJyyhrtFeAyLypRBoza7KmMCyi6MxihC+W/mmG8JgbmoStI7gbmtnWaSwCF9 yy4W896u3wMjxr7QxPYYdgy9qLKzhZYusG4MxAfBVz1kqLhiX6/aSEaoiaXwsDMd42cj tdHv3qBgkzTANdOK3rRXMnTzQpHLnzfaCl+61dGbANmDEsLw5+/iY0Roy34MfXoObKoj SP4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AUpU6UU7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oz20si4672789ejb.286.2021.04.16.06.38.55; Fri, 16 Apr 2021 06:39:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AUpU6UU7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242273AbhDPLro (ORCPT + 99 others); Fri, 16 Apr 2021 07:47:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:37687 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240164AbhDPLrm (ORCPT ); Fri, 16 Apr 2021 07:47:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618573637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0KF/dzNzZan6fUVFJHuSnh1NdDQwGWSz1Twu2a0uJ5s=; b=AUpU6UU7uy7Q4wdLa6KoNJbALfsn6C8sNkfTwkGvQCuT1tVVpJyAbchf/752GRFvF7uLRl z/eSSanjqdCL5t5EqrGYDjGNMsndI6bJ86OJb8wbZQlpnRdXs+VlxZzUiA211FIQVYKg/V 4fLtvIy4oGL4IwdqiI33Lb25mKAyYQc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-398-6wZK_FotPSSrRDnITcAqmQ-1; Fri, 16 Apr 2021 07:47:16 -0400 X-MC-Unique: 6wZK_FotPSSrRDnITcAqmQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DEE1580A19E; Fri, 16 Apr 2021 11:47:14 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-55.pek2.redhat.com [10.72.12.55]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 32B455D9C0; Fri, 16 Apr 2021 11:47:11 +0000 (UTC) Date: Fri, 16 Apr 2021 19:47:08 +0800 From: Dave Young To: Mike Galbraith Cc: LKML , Baoquan He , kexec@lists.infradead.org, x86@kernel.org, Andrew Morton Subject: Re: x86/crash: fix crash_setup_memmap_entries() out-of-bounds access Message-ID: <20210416114708.GB79779@dhcp-128-65.nay.redhat.com> References: <9efaad2ba042b8791cbe8c3e7cad491fe05e06eb.camel@gmx.de> <20210416110701.GA3835@dhcp-128-65.nay.redhat.com> <063a63ddea914ac654cbe9a1d1d6c76986af7882.camel@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <063a63ddea914ac654cbe9a1d1d6c76986af7882.camel@gmx.de> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/16/21 at 01:28pm, Mike Galbraith wrote: > On Fri, 2021-04-16 at 19:07 +0800, Dave Young wrote: > > > > > We're excluding two ranges, allocate the scratch space we need to do that. > > > > I think 1 range should be fine, have you tested 1? > > Have now, and vzalloc(struct_size(cmem, ranges, 1)) worked just fine. Ok, thanks for your quick response. Care to resend and cc x86 list and Andrew? Andrew usually takes core kexec/kdump fixes, x86 usually go through x86 maintainer. Thanks Dave