Received: by 10.223.185.111 with SMTP id b44csp466423wrg; Fri, 9 Mar 2018 07:55:58 -0800 (PST) X-Google-Smtp-Source: AG47ELsuAkl1JvybnxSKInHD07wCefFrx8sW0wonQcjcXwEKyz5lI6uMqVVbLg/lx+Qm8MvZ9NZE X-Received: by 10.101.73.77 with SMTP id q13mr24375555pgs.336.1520610957939; Fri, 09 Mar 2018 07:55:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520610957; cv=none; d=google.com; s=arc-20160816; b=mNIPKEm6nYnH6oEVVf6UDzVl9xhqhfdREV8VpslVFez9M0e50idPqFsGnQl7SdhisH tkUTWCTrw8x7N9+vKH5+J24wgd3F9BSVpjqWX6wZi4StP//XrpoxwnkIbUiJcJTeLamr 6hL2Rno+oWmbPu3CRDVtpMxK2IOBmf6jY9e5ldQu7wLWti6+3QqcOKMs3CpeW62pyCRe FKoROFdeH2u2mGmORdHhdoW8Y3NI1l8nm26MP0ubtGcVR/C+CcgG975uv3Ed00L/3g7G V2yIFWbRKKg9R+6U9RUf/8ROE+mNkrx3qN4LLkcesm318r/uagtN0sIRUMMj0sOYmNis T/VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=K51aqZYHDobUCiCCPa2tJEkhv5om6vrZguB/IMy1AQc=; b=ahXGMDqx+P6c92iWt4xZgpTz2V+DhM2WnftyKwbwHMtk0S0dic9oZ2OnLG9ljjAyU7 c5z7OkPqIUTgdgn5X/a7Qlwaavq73Jcr1PGDo9CZakC9jrn2Zcm+p53KdMELDoV/3jVo m89zEkydPXScjXOwO9m8Kg0CFJ8lK1JSDwue5EZ5Yy2Qy5qlR7sEABSquuSogpW7UnQ/ u7ONBvagD1M8DhFcoIHxRbOgIgAq1F6rZShZf8OCAG9CVcXS0oZNYUA6NT3Vw2peM5k2 G2hKq4wgTeI6jp6hjMk7uLOTzWgmdSLCH4gmiHe0f68+s7YVwoomEF9oxo3m6kI3Qc08 CXnw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w1-v6si1082232plk.597.2018.03.09.07.55.43; Fri, 09 Mar 2018 07:55:57 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932110AbeCIPyW (ORCPT + 99 others); Fri, 9 Mar 2018 10:54:22 -0500 Received: from verein.lst.de ([213.95.11.211]:41341 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751246AbeCIPyV (ORCPT ); Fri, 9 Mar 2018 10:54:21 -0500 Received: by newverein.lst.de (Postfix, from userid 107) id E43AE9F168; Fri, 9 Mar 2018 16:54:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on newverein.lst.de X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED,BAYES_50 autolearn=disabled version=3.3.1 Received: from blackhole.lan (p5B088633.dip0.t-ipconnect.de [91.8.134.51]) by newverein.lst.de (Postfix) with ESMTPSA id 7861C9F164; Fri, 9 Mar 2018 16:54:17 +0100 (CET) Date: Fri, 9 Mar 2018 16:54:12 +0100 From: Torsten Duwe To: Balbir Singh Cc: Miroslav Benes , Michael Ellerman , Jiri Kosina , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, live-patching@vger.kernel.org Subject: Re: [PATCH 2/2] ppc64le save_stack_trace_tsk_reliable (Was: HAVE_RELIABLE_STACKTRACE) Message-ID: <20180309165412.78646b45@blackhole.lan> In-Reply-To: <20180309084333.23287074@gmail.com> References: <20171004152516.25803-1-kamalesh@linux.vnet.ibm.com> <20171005124313.GA25100@lst.de> <9f388c9a-8d74-865a-b113-f77322918b39@linux.vnet.ibm.com> <20171017144733.GB2136@lst.de> <95e6f942-88b7-0208-0eb0-2f5462aec410@linux.vnet.ibm.com> <20171020120739.GA20306@lst.de> <1508547548.5662.2.camel@gmail.com> <39bb7180-1adf-4df6-c9ba-c6f92754767f@linux.vnet.ibm.com> <20171212113912.GA1907@lst.de> <20180227160924.GA19111@lst.de> <20180309084333.23287074@gmail.com> Organization: LST e.V. X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 9 Mar 2018 08:43:33 +1100 Balbir Singh wrote: > On Tue, 27 Feb 2018 17:09:24 +0100 > Torsten Duwe wrote: > > +save_stack_trace_tsk_reliable(struct task_struct *tsk, > > + struct stack_trace *trace) > > Just double checking this is called under the task_rq_lock, so its > safe to call task_stack_page() as opposed to try_get_task_stack() Yes. IIRC a comment at the call site mentioned it. [...] > > + if (sp < stack_page + sizeof(struct thread_struct) > > + || sp > stack_page + THREAD_SIZE - > > STACK_FRAME_OVERHEAD) > > + return 1; > > Some of this is already present in validate_sp(), it also validates > irq stacks, should we just reuse that? This goes a bit along one of Josh's points; I'll answer there, OK? [...] > Looks good to me otherwise. > > Acked-by: Balbir Singh Thanks. Torsten