Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1646636ybx; Thu, 31 Oct 2019 13:45:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqwB2RvAnxMQBOBFznVceuQHPwvem3yHX4XzYvLPXJEH1VMCJ4BPZf+DHHBBVUqx14tkfYmg X-Received: by 2002:a17:906:4dc9:: with SMTP id f9mr6172853ejw.23.1572554718202; Thu, 31 Oct 2019 13:45:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572554718; cv=none; d=google.com; s=arc-20160816; b=u3rek4kPJlFhEtZUlnSHBL7VWfLf7UEwsXAgZ/QHXUyromP0D5Q9oBYEVKEX9BLrpM OlX/j+GpyzL+S+gX348jl76LSlaPZgC+LxnrBc/y3WdvxX6aD7hzazia3f053GEnIonz AoVSoBIID7Nh0F5Vzp7fPr4lkx0olQZJN1q9O4OCuGfd1H+lM6jgkFSRNtyZ2Ek359Sx T5I5oiNmJKALDnTXWNg5K7HbRnJhajpfZzKQh94EkhIb6uBLc2HgU2pfeygrA1meQ1ft D/MNxQA7VnIgiE5KIU2cB+VOAcalsYpru73GAfZTmog55nLDqwgw8auQwYrfMT5U7C6f 34Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date; bh=yJfq5guStfWdLMmypKtiXPJVKV/5Y/m7y2y3n1qGJtc=; b=HujnpttOPzIlMx1GVoBkam5rUC4oNr+4bdBLbGHEd2ZkKqqSJo6Fjm81+zI7jDAxmT RHNgFUUFNUor4a6W8stIHd2ALk8mo4/8/KiqRJK8AurZmA/s88bq7/cSlPsKnnm8PMgZ zRtTZhV40z0CKdw8x6vAfQzRy6WHboMb5uwINYP0dzsOE8DpvCFQdJfl33rF565Lvs5k s1HJUI3tZDsSG/QtNZVcwnqjPisv9IA8vW3weA43OuIkZl/M+H3HQw+VhVnGV6HXu/Zr t1Hn55ycb0jPTAZ6ViQ+2u7+GsXZEDywPAsAVQTitgd5qv+MrRFA1NjIpK2x/KBpjCDs w3Iw== 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 w19si4955249edd.51.2019.10.31.13.44.53; Thu, 31 Oct 2019 13:45:18 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728271AbfJaPZB (ORCPT + 99 others); Thu, 31 Oct 2019 11:25:01 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:25734 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbfJaPZA (ORCPT ); Thu, 31 Oct 2019 11:25:00 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x9VFKZDd137346 for ; Thu, 31 Oct 2019 11:24:59 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2vyym1ekx1-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 31 Oct 2019 11:24:59 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 31 Oct 2019 15:24:57 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 31 Oct 2019 15:24:53 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x9VFOpWo61145192 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 31 Oct 2019 15:24:51 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4D3FB4C044; Thu, 31 Oct 2019 15:24:51 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E0D874C04A; Thu, 31 Oct 2019 15:24:50 +0000 (GMT) Received: from osiris (unknown [9.152.212.85]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 31 Oct 2019 15:24:50 +0000 (GMT) Date: Thu, 31 Oct 2019 16:24:49 +0100 From: Heiko Carstens To: Miroslav Benes Cc: gor@linux.ibm.com, borntraeger@de.ibm.com, jpoimboe@redhat.com, joe.lawrence@redhat.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, jikos@kernel.org, pmladek@suse.com, nstange@suse.de, live-patching@vger.kernel.org Subject: Re: [PATCH v2 0/3] s390/livepatch: Implement reliable stack tracing for the consistency model References: <20191029143904.24051-1-mbenes@suse.cz> <20191029163450.GI5646@osiris> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 x-cbid: 19103115-4275-0000-0000-0000037996D8 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19103115-4276-0000-0000-0000388CD60A Message-Id: <20191031152449.GA6133@osiris> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-10-31_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=521 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910310155 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 30, 2019 at 11:12:00AM +0100, Miroslav Benes wrote: > On Tue, 29 Oct 2019, Heiko Carstens wrote: > > > On Tue, Oct 29, 2019 at 03:39:01PM +0100, Miroslav Benes wrote: > > > - I tried to use the existing infrastructure as much as possible with > > > one exception. I kept unwind_next_frame_reliable() next to the > > > ordinary unwind_next_frame(). I did not come up with a nice solution > > > how to integrate it. The reliable unwinding is executed on a task > > > stack only, which leads to a nice simplification. My integration > > > attempts only obfuscated the existing unwind_next_frame() which is > > > already not easy to read. Ideas are definitely welcome. > > > > Ah, now I see. So patch 2 seems to be leftover(?). Could you just send > > how the result would look like? > > > > I'd really like to have only one function, since some of the sanity > > checks you added also make sense for what we already have - so code > > would diverge from the beginning. > > Ok, that is understandable. I tried a bit harder and the outcome does not > look as bad as my previous attempts (read, I gave up too early). > > I deliberately split unwind_reliable/!unwind_reliable case in "No > back-chain, look for a pt_regs structure" branch, because the purpose is > different there. In !unwind_reliable case we can continue on a different > stack (if I understood the code correctly when I analyzed it in the past. > I haven't found a good documentation unfortunately :(). While in > unwind_realiable case we just check if there are pt_regs in the right > place on a task stack and stop. If there are not, error out. > > It applies on top of the patch set. Only compile tested though. If it > looks ok-ish to you, I'll work on it. Yes, that looks much better. Note, from a coding style perspective the 80 characters per line limit is _not_ enforced on s390 kernel code; so that might be a possibility to make the code a bit more readable. Also it _might_ make sense to split the function into two or more functions (without duplicating code). Not sure if that would really increase readability though. FWIW, I just applied your first patch, since it makes sense anyway.