Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1751740ybg; Thu, 4 Jun 2020 18:54:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynuzjwVBGd2qYYFucOB5Q2nrJgYZZ2Ucw2pzbi959kBj/cH9NYrPk9NQ1Mrnkw3PnmW57z X-Received: by 2002:a17:906:c828:: with SMTP id dd8mr6691952ejb.550.1591322045429; Thu, 04 Jun 2020 18:54:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591322045; cv=none; d=google.com; s=arc-20160816; b=z/ClKuAFiJqbNac/Rcte0CvKfn1gR2gCtYPHdyS8CYL0vPj5ztZo/7e74RZ040d4NU /ly5QMx7iF0m4qcXEpXPQfmXkl7CYBntwRtcWqn3EqCtsaIeJqC+Dyrk42CFMYYb/bLh 2gSbKdRQzr5b0SjUM1sq9P4TDGqUc5+h/ydSGTKxWzqLRV4zKjcDcZDEIhvYpI3ulhTa o11UboLBfNirvHodQ+rnSvsTCNegqK079ge6q4IyuTRnTxUiiyOU7j0qtymRqlVgx0MU K1PxcfqjbjZy0xsl9hChW8T1I6ajgo14QsE7nfedVc84U5sbssV+0iOuyNz2cW1xfCbJ XGSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=XLPiv7eRXPQEFdxOH5OwppbO6pOFLO5NTxZhwc7MbDw=; b=fFxNRmeV/L9183vgB4sGfj9FMBOEj1xe5TW94Tw+ZXRpnjsRxjxGi4pCidutxEJ00f 0cVi+yN/lh7doEXKiINhmZEw7GT5rQ48gLFFTy/dalkaRH6QosnKlRsmmdiaMhYjBoxU QboP2YrGZHXn1d1hA+sJOk33eUo77Sa5XbLzKJUU7u3HcoppgWDkiwHV3pv/A+qwJsLx sW5Y4FqqaiSdIYuMed5BlS8eZEDzVurtqqYUMWhIjn8b555Q6d7laAXa+NOtuCSQf0Rk I0UIhNY4HMxyNXq+Z0GplMeu0zZC45/tfJgQwJBiEupdiY1lmAyAOwbPBsM7oPgOO91W tjMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YSHDeCIB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d14si2591513edu.369.2020.06.04.18.53.42; Thu, 04 Jun 2020 18:54:05 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YSHDeCIB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725986AbgFEBvz (ORCPT + 99 others); Thu, 4 Jun 2020 21:51:55 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:48036 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725601AbgFEBvy (ORCPT ); Thu, 4 Jun 2020 21:51:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591321914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XLPiv7eRXPQEFdxOH5OwppbO6pOFLO5NTxZhwc7MbDw=; b=YSHDeCIBwStkx587DhJNGtHkTIcnu/vtJZyhmUOIK7e6rDh+lFtoWoefo3TjsxUrue4UNN ua1H7zprdjEFpsxASQNLaK9zGuDeM+fu8X+wZXWwY1HlL3BIj/VKy8xt7tzrBO+LETSqYA cmifz3CkmrRILJ9mnPxcND5Jh8FBLXs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-130-PqnXVEdDMtWq6gB6qeZxXA-1; Thu, 04 Jun 2020 21:51:50 -0400 X-MC-Unique: PqnXVEdDMtWq6gB6qeZxXA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9461D835B8B; Fri, 5 Jun 2020 01:51:48 +0000 (UTC) Received: from treble (ovpn-116-170.rdu2.redhat.com [10.10.116.170]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4592B6AD0C; Fri, 5 Jun 2020 01:51:43 +0000 (UTC) Date: Thu, 4 Jun 2020 20:51:42 -0500 From: Josh Poimboeuf To: "Wangshaobo (bobo)" Cc: huawei.libin@huawei.com, xiexiuqi@huawei.com, cj.chengjian@huawei.com, mingo@redhat.com, x86@kernel.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, mbenes@suse.cz, devel@etsukata.com, viro@zeniv.linux.org.uk, esyr@redhat.com Subject: Re: Question: livepatch failed for new fork() task stack unreliable Message-ID: <20200605015142.w65uu5wxfmrun2ro@treble> References: <20200529174433.wpkknhypx2bmjika@treble> <20200601180538.o5agg5trbdssqken@treble> <20200602131450.oydrydelpdaval4h@treble> <1353648b-f3f7-5b8d-f0bb-28bdb1a66f0f@huawei.com> <20200603153358.2ezz2pgxxxld7mj7@treble> <2225bc83-95f2-bf3d-7651-fdd10a3ddd00@huawei.com> <20200604024051.6ovbr6tbrowwg6jr@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 05, 2020 at 09:26:42AM +0800, Wangshaobo (bobo) wrote: > > > So, I want to ask is there any side effects if i modify like this ? this > > > modification is based on > > > > > > your fix. It looks like ok with proper test. > > > > > > diff --git a/arch/x86/kernel/unwind_orc.c b/arch/x86/kernel/unwind_orc.c > > > index e9cc182aa97e..ecce5051e8fd 100644 > > > --- a/arch/x86/kernel/unwind_orc.c > > > +++ b/arch/x86/kernel/unwind_orc.c > > > @@ -620,6 +620,7 @@ void __unwind_start(struct unwind_state *state, struct > > > task_struct *task, > > >                 state->sp = task->thread.sp; > > >                 state->bp = READ_ONCE_NOCHECK(frame->bp); > > >                 state->ip = READ_ONCE_NOCHECK(frame->ret_addr); > > > +              state->signal = ((void *)state->ip == ret_from_fork); > > >         } > > > > > > diff --git a/arch/x86/kernel/unwind_orc.c b/arch/x86/kernel/unwind_orc.c > > > index 7f969b2d240f..d7396431261a 100644 > > > --- a/arch/x86/kernel/unwind_orc.c > > > +++ b/arch/x86/kernel/unwind_orc.c > > > @@ -540,7 +540,7 @@ bool unwind_next_frame(struct unwind_state *state) > > >          state->sp = sp; > > >          state->regs = NULL; > > >          state->prev_regs = NULL; > > > -        state->signal = ((void *)state->ip == ret_from_fork); > > > +        state->signal = false; > > >          break; > > Yes that's correct. > > Hi, josh > > Could i ask when are you free to send the patch, all the tests are passed > by. I want to run some regression tests, so it will probably be next week. -- Josh