Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2213368yba; Fri, 17 May 2019 12:35:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwMXtyxxfl9rIdgRXVWV7GoQgN/o0gbgrXRy2Xtd3rAuDmhs0iLd027yKFAav8aI6xhtABC X-Received: by 2002:a63:231c:: with SMTP id j28mr58626828pgj.430.1558121732937; Fri, 17 May 2019 12:35:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558121732; cv=none; d=google.com; s=arc-20160816; b=vp1Hl9kPitx6W6mBgfGHW6hdNQpb0017njJlvJ5XdMaluuZHSJhkxCanpm7s5z4Dri OUUB+O4p2a3qFMer9ArU6UF+4h0tGQAYwGI5L5HPwiyKEHRP+BlK3rdm+P8E+gViT1Ax Y/j5WzFWxQaaAkqZWzWAnWBkT1eoLKLdiOCHzGNtEIU8JNOPibR3AV2Z7RAjU5gUpwZP 05Ja0oki0pPivadOLTqZjq2B9JHAiCoSBOAhH2X5Oe9kG/6gXXeu05DOAErwB55NlyLj XyE4qeNw4l1fcnIfyk8JPjG6ttMLgJXNcfAX+ZMGgq9YpK4nTmWaP6LS4wF+hZmIovXi fPOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=6TfnFX050wP9HcOLqLcX7JfwvhYAcEsgUu3Y5cCQtFM=; b=w9mIqRiZPVttJuQqpSF+LCu1vdHPpwUCVinibr9Vr+FJyzhxEf57AgxbTw3rkOCvf4 pEAx5hkvL4uSfreUuanIuTEr/e0WUa2nDHHrF4SS89FsYm3vlQd+jHCt9bRBDNY+353B Vo1BXxpqLplBxLRpjXRIO5tjv21PTC17NS1IxZmd/mmtDxB9equD7FH5+VqMW3KyWUvf 5IjgKucy7UNZiYHZKjKr0xfiItvcqDyOjri5rVL7wrEtu6oACPgOIOX3dumO4WPDXfXO P1uY8w+ykmxx3q63JmfhgElL5iopVXk+Fi9wDzBytcOheBCEzk5Wkwn4hfF7yiGyQp1U P9ng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m8si2976464pgt.140.2019.05.17.12.35.17; Fri, 17 May 2019 12:35:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728783AbfEQTKR (ORCPT + 99 others); Fri, 17 May 2019 15:10:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33178 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725954AbfEQTKQ (ORCPT ); Fri, 17 May 2019 15:10:16 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8E67D81F0D; Fri, 17 May 2019 19:10:16 +0000 (UTC) Received: from treble (ovpn-125-173.rdu2.redhat.com [10.10.125.173]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 963406085B; Fri, 17 May 2019 19:10:13 +0000 (UTC) Date: Fri, 17 May 2019 14:10:11 -0500 From: Josh Poimboeuf To: Joe Lawrence Cc: live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, jikos@kernel.org, pmladek@suse.com, tglx@linutronix.de Subject: Re: [PATCH] stacktrace: fix CONFIG_ARCH_STACKWALK stack_trace_save_tsk_reliable return Message-ID: <20190517191011.oe3g57vxwkf4gupa@treble> References: <20190517185117.24642-1-joe.lawrence@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190517185117.24642-1-joe.lawrence@redhat.com> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 17 May 2019 19:10:16 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 17, 2019 at 02:51:17PM -0400, Joe Lawrence wrote: > Miroslav reported that the livepatch self-tests were failing, > specifically a case in which the consistency model ensures that we do > not patch a current executing function, "TEST: busy target module". > > Recent renovations to stack_trace_save_tsk_reliable() left it returning > only an -ERRNO success indication in some configuration combinations: > > klp_check_stack() > ret = stack_trace_save_tsk_reliable() > #ifdef CONFIG_ARCH_STACKWALK && CONFIG_HAVE_RELIABLE_STACKTRACE > stack_trace_save_tsk_reliable() > ret = arch_stack_walk_reliable() > return 0 > return -EINVAL > ... > return ret; > ... > if (ret < 0) > /* stack_trace_save_tsk_reliable error */ > nr_entries = ret; << 0 > > Previously (and currently for !CONFIG_ARCH_STACKWALK && > CONFIG_HAVE_RELIABLE_STACKTRACE) stack_trace_save_tsk_reliable() > returned the number of entries that it consumed in the passed storage > array. > > In the case of the above config and trace, be sure to return the > stacktrace_cookie.len on stack_trace_save_tsk_reliable() success. > > Fixes: 25e39e32b0a3f ("livepatch: Simplify stack trace retrieval") > Reported-by: Miroslav Benes > Signed-off-by: Joe Lawrence It's great to see the livepatch selftests working and finding regressions. Acked-by: Josh Poimboeuf -- Josh