From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761311AbdAIOyl (ORCPT ); Mon, 9 Jan 2017 09:54:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44180 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932536AbdAIOyf (ORCPT ); Mon, 9 Jan 2017 09:54:35 -0500 Date: Mon, 9 Jan 2017 08:54:33 -0600 From: Josh Poimboeuf To: Miroslav Benes Cc: jeyu@redhat.com, jikos@kernel.org, pmladek@suse.com, corbet@lwn.net, live-patching@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Documentation/livepatch: remove the limitation for schedule() patching Message-ID: <20170109145433.xiopfww5q37ndzdz@treble> References: <20170106140045.26331-1-mbenes@suse.cz> <20170106191301.5mlctz7zr7hvzkl5@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 09 Jan 2017 14:54:35 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 09, 2017 at 01:50:19PM +0100, Miroslav Benes wrote: > There is still one thing which I don't understand. Why __schedule() > (patched or the original) is not on the stack. The actual "sleep" > should happen in __switch_to_asm() which is C function now. And there is a > call to __switch_to_asm() in __schedule(). __schedule() thus should be on > the stack, shouldn't it? What am I missing? __switch_to_asm() pushes %rbp > on the stack... Ah, this is an unwinder bug. get_frame_pointer() needs to be fixed so that for an inactive task it returns a pointer to inactive_task_frame.bp rather than the value of inactive_task_frame.bp itself. Will fix it. -- Josh