Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp342859ybk; Fri, 15 May 2020 02:07:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPkNqUz5KJXwBW04HoH8cFPWMlqdlJ1HZiV1eEllySTqK/NBeXhzZlg8NeGQPiXi0no95b X-Received: by 2002:a50:a7e3:: with SMTP id i90mr1958055edc.6.1589533652713; Fri, 15 May 2020 02:07:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589533652; cv=none; d=google.com; s=arc-20160816; b=0PV4NHRk2DkCtaIv6QjvVmSAb5pWI40vSHoxZmxYBqhb913oHCOy82dR9oWvzYjmW5 eMvXvfZr0PbSczlIFLH4DBo29zr/pXzpgxrHebTl99SQ/6xc+Iau+VqZC4oQAmVCVYa/ lwbGlUHCdduHHzbwCKVLC1ELhQjRXUWZTL9mVTg4slO3BYIAy31+uYj2yyn+Tz6w3onD kFrhx42FaWVEmkp4rXjl07pOBg24vp6p4Ws+R1TFeRrEttBvSa11E6LdUu3cVB1YVRlW 7n5unAygudkO+iubjGvb+FDrFMMSjG/KbZQoisSDXAk5faojlstdFHr+CB5Hc3vW1ZLD x2Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=+her+Gu5xyt6pSnRL+0FinF60R3NWbuPORIah/rUdYA=; b=QssQ73z45kgUxk+IJQ5sWGaVkRIiaIs9nig9NyXh/kmQZF2ARTp9KWR3iJHdrDdXOl 7KoBvFx5HQOpMLdU9nAs54waJuT38XMkXHz+amiZfQGgUGyaqi9RxZUrCVqxlW8paiyc sSTfDkx6K2sVb/ZrwxUgUGnOU539cRvFvd8JJJ3h4NYvQMbjzk9+N57QiMOTZY62Zoev 9qed8wircU/tj8ySY1u0NwCPjGUCzQlRnjZjGAseT0NUaGp3oJVHVJsFo+OVvFx0KgwZ /+kuTEkF2mvj6MaApQZ5rUiLblIb6tWbyD72vVIjNZzaL/0MNIkYU6EcsIWH85kDoXDz sqjw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q9si853514ejx.279.2020.05.15.02.07.07; Fri, 15 May 2020 02:07:32 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727905AbgEOJDV (ORCPT + 99 others); Fri, 15 May 2020 05:03:21 -0400 Received: from mx2.suse.de ([195.135.220.15]:48782 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726722AbgEOJDV (ORCPT ); Fri, 15 May 2020 05:03:21 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 01848B042; Fri, 15 May 2020 09:03:22 +0000 (UTC) Date: Fri, 15 May 2020 11:03:19 +0200 (CEST) From: Miroslav Benes To: Josh Poimboeuf cc: x86@kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Vince Weaver , Dave Jones , Jann Horn , Andy Lutomirski , Thomas Gleixner , Pavel Machek Subject: Re: [PATCH -tip urgent] x86/unwind/orc: Fix error handling in __unwind_start() In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 14 May 2020, Josh Poimboeuf wrote: > The unwind_state 'error' field is used to inform the reliable unwinding > code that the stack trace can't be trusted. Set this field for all > errors in __unwind_start(). > > Also, move the zeroing out of the unwind_state struct to before the ORC > table initialization check, to prevent the caller from reading > uninitialized data if the ORC table is corrupted. > > Fixes: af085d9084b4 ("stacktrace/x86: add function for detecting reliable stack traces") > Fixes: d3a09104018c ("x86/unwinder/orc: Dont bail on stack overflow") > Fixes: 98d0c8ebf77e ("x86/unwind/orc: Prevent unwinding before ORC initialization") > Reported-by: Pavel Machek > Signed-off-by: Josh Poimboeuf Reviewed-by: Miroslav Benes M