Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1059471imu; Thu, 22 Nov 2018 09:25:20 -0800 (PST) X-Google-Smtp-Source: AJdET5c71d9t9TqsXRq2Z0QY9uoOSwr3FvBn4jidZ/SVCAf94Osd2U5PMTPqS3BO2ZkziHQNqpUV X-Received: by 2002:a62:ce0e:: with SMTP id y14mr12831587pfg.100.1542907520482; Thu, 22 Nov 2018 09:25:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542907520; cv=none; d=google.com; s=arc-20160816; b=Ok7rSa04qDLsHmH/y0hQxVImGL4qpjCVEHQBkU1ETa4rILUKqKWZp9bXN57sbKNqPg 7Sj7YAp0wIqdLgwDsmz79dy4Grj6LugcAQzkD7IvFSTKh0vkUdJTeJWtVp5I//40WJBK 2vPJlvEs1qbhw+dr7VZY9wpLSKN87LAHyu1eMKFPO2I4kcGPXZEmeLdpCohMYDBVI0Py HLVaN4Dytu0Hh3fBxMS825xTVUhLgSwu3BFektWUtzBpzzq1bjkIxW/lZHLLX9G0UKH7 7Bv1KYa7WV9ojJGVaRJX58QhY/NdWDr+Yc8SayzrkJdqYXrGr5VZaAddJoddmn99e1ZQ MQWA== 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:message-id :mime-version:references:in-reply-to:subject:cc:to:from:date; bh=nYCaTkAMCjm8Qn8q37MX0FmMoEs3ChY43API9zkeO7k=; b=bquA+d5K7rjL3Bo2APuUGOGIQ4LbcAIeexj72NCv8mLz4eq+h/6jhtDVvKoTKuBD2z YRzHryLngUNOg7Fnmy5NXeFS9Q0RDcYe8RBALso21bce3kYrTJ8CkyRzekpDutswqFoA 4ZqvhJEFNeTAsE3FPcsc8WvlkrCByv0//N37jz0CJ+HKe2SakS2XO8JJQFjVUWkzhwjy byJcijVd7G2qyoyrUqx0O/msqCHKb3K13HGBA5mhQdB/BPyVKQUWg3VhsO+lQ85BWQMc OYIpbxblvpDSNUA5czmuYsQymis5gdrclF8uNgJDyRLt+Lpzp1X9it/4rGC3FZLkJodg VHMQ== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be8-v6si50165504plb.143.2018.11.22.09.24.50; Thu, 22 Nov 2018 09:25:20 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730086AbeKVRVb (ORCPT + 99 others); Thu, 22 Nov 2018 12:21:31 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:45974 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726958AbeKVRVb (ORCPT ); Thu, 22 Nov 2018 12:21:31 -0500 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAM6dAx7078764 for ; Thu, 22 Nov 2018 01:43:29 -0500 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2nwq670kmh-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 22 Nov 2018 01:43:29 -0500 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 22 Nov 2018 06:43:27 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 22 Nov 2018 06:43:23 -0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAM6hMN24981112 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 22 Nov 2018 06:43:22 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 11F4742045; Thu, 22 Nov 2018 06:43:22 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 73CD042041; Thu, 22 Nov 2018 06:43:21 +0000 (GMT) Received: from mschwideX1 (unknown [9.145.69.7]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 22 Nov 2018 06:43:21 +0000 (GMT) Date: Thu, 22 Nov 2018 07:43:19 +0100 From: Martin Schwidefsky To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Ingo Molnar , Andrew Morton , Thomas Gleixner , Peter Zijlstra , linux-arch@vger.kernel.org, Joel Fernandes , Masami Hiramatsu , Josh Poimboeuf , Andy Lutomirski , Frederic Weisbecker , Heiko Carstens , Julian Wiedmann , linux-s390@vger.kernel.org, stable@kernel.org Subject: Re: [for-next][PATCH 11/18] s390/function_graph: Simplify with function_graph_entry() In-Reply-To: <20181122003332.940703297@goodmis.org> References: <20181122002801.501220343@goodmis.org> <20181122003332.940703297@goodmis.org> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18112206-0012-0000-0000-000002CE5E2C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18112206-0013-0000-0000-000021038E0F Message-Id: <20181122074319.54d62bc3@mschwideX1> Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-11-22_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811220063 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 21 Nov 2018 19:28:12 -0500 Steven Rostedt wrote: > From: "Steven Rostedt (VMware)" > > The function_graph_entry() function does the work of calling the function > graph hook function and the management of the shadow stack, simplifying the > work done in the architecture dependent prepare_ftrace_return(). > > Have s390 use the new code, and remove the shadow stack management as well as > having to set up the trace structure. > > This is needed to prepare for a fix of a design bug on how the curr_ret_stack > is used. > > Cc: Martin Schwidefsky > Cc: Heiko Carstens > Cc: Julian Wiedmann > Cc: linux-s390@vger.kernel.org > Cc: stable@kernel.org > Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback") > Signed-off-by: Steven Rostedt (VMware) A quick test showed that the patch series works fine on s390. Acked-by: Martin Schwidefsky > --- > arch/s390/kernel/ftrace.c | 13 ++----------- > 1 file changed, 2 insertions(+), 11 deletions(-) > > diff --git a/arch/s390/kernel/ftrace.c b/arch/s390/kernel/ftrace.c > index 84be7f02d0c2..39b13d71a8fe 100644 > --- a/arch/s390/kernel/ftrace.c > +++ b/arch/s390/kernel/ftrace.c > @@ -203,22 +203,13 @@ device_initcall(ftrace_plt_init); > */ > unsigned long prepare_ftrace_return(unsigned long parent, unsigned long ip) > { > - struct ftrace_graph_ent trace; > - > if (unlikely(ftrace_graph_is_dead())) > goto out; > if (unlikely(atomic_read(¤t->tracing_graph_pause))) > goto out; > ip -= MCOUNT_INSN_SIZE; > - trace.func = ip; > - trace.depth = current->curr_ret_stack + 1; > - /* Only trace if the calling function expects to. */ > - if (!ftrace_graph_entry(&trace)) > - goto out; > - if (ftrace_push_return_trace(parent, ip, &trace.depth, 0, > - NULL) == -EBUSY) > - goto out; > - parent = (unsigned long) return_to_handler; > + if (!function_graph_enter(parent, ip, 0, NULL)) > + parent = (unsigned long) return_to_handler; > out: > return parent; > } -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.