Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757949AbcDHIHS (ORCPT ); Fri, 8 Apr 2016 04:07:18 -0400 Received: from mx2.suse.de ([195.135.220.15]:43285 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757048AbcDHIHN (ORCPT ); Fri, 8 Apr 2016 04:07:13 -0400 Date: Fri, 8 Apr 2016 10:07:10 +0200 From: Petr Mladek To: Josh Poimboeuf Cc: Jiri Kosina , Jessica Yu , Miroslav Benes , linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Vojtech Pavlik Subject: Re: [RFC PATCH v1.9 05/14] sched: horrible way to detect whether a task has been preempted Message-ID: <20160408080710.GF5218@pathway.suse.cz> References: <24db5a6ae5b63dfcd2096a12d18e1399a351348e.1458933243.git.jpoimboe@redhat.com> <20160406130619.GA5218@pathway.suse.cz> <20160406163356.hba6jzkloaukknn4@treble.redhat.com> <20160407094700.GA27670@pathway.suse.cz> <20160407143403.6f7wvjvh2r43e4la@treble.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160407143403.6f7wvjvh2r43e4la@treble.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 847 Lines: 21 On Thu 2016-04-07 09:34:03, Josh Poimboeuf wrote: > On Thu, Apr 07, 2016 at 11:47:00AM +0200, Petr Mladek wrote: > > On Wed 2016-04-06 11:33:56, Josh Poimboeuf wrote: > > > On Wed, Apr 06, 2016 at 03:06:19PM +0200, Petr Mladek wrote: > > We could even move this check into the livepatch code but then > > print_context_stack_reliable() will not always give reliable results. > > Why would moving the check to the livepatch code affect the reliability > of print_context_stack_reliable()? print_context_stack_reliable() is a generic function that might eventualy be used also outside livepatch code. If there is preempt_schedule_irq() on the stack, it means that the rest of the stack might be unreliable and it should be detected by the function itself. Let's forget the idea of moving the check into the livepatch code :-) Best Regards, Petr