Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp75676ybt; Tue, 30 Jun 2020 15:09:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsA3i6YCXwU9hNNsTK98u2kcYE/J6uLrfQCDxXi7LhPZPh42eeLjG8E40QrnrFxNlLgM7i X-Received: by 2002:a17:907:11ce:: with SMTP id va14mr11332085ejb.189.1593554611355; Tue, 30 Jun 2020 15:03:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593554611; cv=none; d=google.com; s=arc-20160816; b=ZjEfSrnI+Wzi0OZaBPjpFp1ZyD89exKImDTPzHyvoCairNaGWatxemVFhzTQebvl6V n8lR+U8fE5Jl/ocW3NExY+Mpz9GcCjQ1PWin2UYgnPU9IgW5S3IJ6hU1b5DwAsRJxXnq Rka7WBgxLUW/VSyCT/NbL/3TulEPJCS32FMBCr0FJpmXvhX4ZD/8nNJwANkjNt0SpFUP DxdbHsLCk6OOI+FqkYN5r4Z5sHmwWwxlNvxwMRaa7IYD5FB8FvfXlb9IQnWE4Xd1bGQZ ZG58R9sF/xHYTcMPZVdVsQDA/vAI+qPCabWQ8byO/W2LMC0XZwi+u7vbAKAxpVKwmSkB pubw== 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=T8HFffOX994sg1wvTHx+e4a2JbF0zYztyobMfFyAbl0=; b=EOYa7zJERj99vWik+ywE+cPu6TOjcmGLdAz7oNOPusQaravGVNaNI/JLsfuTJdSB09 Q01UtMKq5N8lXJtoi8Yq/9c4CW6BcphTJY+/lJRS/KTopmRTUTudFCPagl2zKf48USkr wZNWB0iXJ0eZJ+NhFECeVCJCWvcgJmY7C4rtb68DsKgRllR8+wlK4P1Sq/8xZLbxMDLv 4f8wnC2AzootSk0+IZU5SXcT9xpgYhaVMGw2+e9osg0E9WGkNGx51sYA5HSe1v857IEh //ZmlwO67OB9EcPknHPcDQZJdKgbqwN/8tj/z9bzWoW9kOIu+p9Il5xX0vSqEUsVMAgf U2Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IzlEwTGo; 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 y7si2474351edm.24.2020.06.30.15.02.43; Tue, 30 Jun 2020 15:03:31 -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=IzlEwTGo; 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 S1728931AbgF3Vgy (ORCPT + 99 others); Tue, 30 Jun 2020 17:36:54 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:33389 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726907AbgF3Vgx (ORCPT ); Tue, 30 Jun 2020 17:36:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593553012; 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=T8HFffOX994sg1wvTHx+e4a2JbF0zYztyobMfFyAbl0=; b=IzlEwTGo/rSmT6jmTbObC5ixJldR5AUBmwtSrXmuZP8PrONW4nvXE4BWKgwB+AVpkhF+VF 5kOlCQwfZD6MiCEWtoiAdOp8JNXwkELYSdSQJR1CYOhOxmQ0M4vPSW4E2+KfdQXoNf1Szj 47fGjeeQW/KZgmPLBwz7J6RmHW0gzHA= 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-501-PTqCLy6WNKOZnRq2wUANSQ-1; Tue, 30 Jun 2020 17:36:47 -0400 X-MC-Unique: PTqCLy6WNKOZnRq2wUANSQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 177E780183C; Tue, 30 Jun 2020 21:36:46 +0000 (UTC) Received: from treble (ovpn-114-241.rdu2.redhat.com [10.10.114.241]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9653E78137; Tue, 30 Jun 2020 21:36:41 +0000 (UTC) Date: Tue, 30 Jun 2020 16:36:39 -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: <20200630213639.kijctnz4y3zjbkhx@treble> References: <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> <20200605015142.w65uu5wxfmrun2ro@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.14 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 30, 2020 at 09:04:12PM +0800, Wangshaobo (bobo) wrote: > > 在 2020/6/5 9:51, Josh Poimboeuf 写道: > > 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. Sorry, I was away for a bit and I didn't get a chance to send the patch. I should hopefully have it ready soon. -- Josh