Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1455749imj; Fri, 8 Feb 2019 01:37:04 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ6Zzi1uFWCn1fdFH2NFZZhvVugdKYTM10T958NGQggtjqrKLzKMT/pD0kZLqm+6Cv2CXaT X-Received: by 2002:a17:902:3283:: with SMTP id z3mr21949405plb.76.1549618624553; Fri, 08 Feb 2019 01:37:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549618624; cv=none; d=google.com; s=arc-20160816; b=x5xsLKEvT5er85b5DEKSouFJMB3SASS3/DvGYu5M7qszdvTOGdrgwlQqgcISGI3pIs DjiCxTlUPL02BDaz0TxB0kpXLsQNHXXqSmbm51hu2n1c+EG/wMsT1gVS05+R7Y4el0BQ f4A3oy9+dxi8E16fVY75nrjsmtIONuHiglA2dGPDwCV40CWvVr956YB9RXIF8IN18+kY Tz4OihhrYxWLICz/xkeoB0sXehCOyejUDPD45egQM+ovqXizVC3VzUorAfIDYC5Og7XY vkLVf4OXQAiRlBWNHWdboBTiRcBZy4x3FGfJQcZKDTLmx6HKyst7qluCwHFVJiyyBwLR zQPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Q5GUaQrMBXYztRCys0eXR0cUTA//DymvoJC5Hgh6eQc=; b=erHOJOMcv2BZ9WOyzg7ZbS2ww71HdK6YYwiPenNMBK0s9GHW3IbeEHQ3ihGMBARb6y wWfZliz9Fvs5gpq2N3sExet/FLuO1O4zIwCWjqa0iC0bouXYMqpkrEkFATdqVxNmgGNE BQ4vxgUf6GePq/UlO7Ksu94YhCopMcBXT4bnOm/PV3E0F0/xR5wwfAe6Xlcs3VwuZWkG d13J3he7jnPMQP+HSahZVRUyPZCnNJFSHuRIcmtYXbk7Wj5uz5PTGy/8lFH2VGVpfpVM 8NmuSZ/eMxONQL7+1PMsUS/G/khxCRKBq3/ke5JyuhqvgQeQs9IDs2s34cqg24Tu3ovO RgRw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x38si1711679pgl.419.2019.02.08.01.36.47; Fri, 08 Feb 2019 01:37:04 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727380AbfBHJer (ORCPT + 99 others); Fri, 8 Feb 2019 04:34:47 -0500 Received: from mx2.suse.de ([195.135.220.15]:43794 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725998AbfBHJer (ORCPT ); Fri, 8 Feb 2019 04:34:47 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id F23ADAD72; Fri, 8 Feb 2019 09:34:45 +0000 (UTC) Date: Fri, 8 Feb 2019 10:34:45 +0100 From: Petr Mladek To: Kamalesh Babulal Cc: Josh Poimboeuf , Alice Ferrazzi , jeyu@kernel.org, jikos@kernel.org, mbenes@suse.cz, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Alice Ferrazzi Subject: Re: [PATCH v2] livepatch: core: Return EOPNOTSUPP instead of ENOSYS Message-ID: <20190208093445.zvxkgaummsait5z6@pathway.suse.cz> References: <20190204183324.30775-1-alicef@alicef.me> <20190205155933.r6ey474lq4m5nlmp@treble> <20190206102832.apa7sekkwljo4ejg@pathway.suse.cz> <20190208062005.GA21436@JAVRIS.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190208062005.GA21436@JAVRIS.in.ibm.com> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 2019-02-08 11:50:05, Kamalesh Babulal wrote: > On Wed, Feb 06, 2019 at 11:28:32AM +0100, Petr Mladek wrote: > > On Tue 2019-02-05 09:59:33, Josh Poimboeuf wrote: > > > On Tue, Feb 05, 2019 at 03:33:28AM +0900, Alice Ferrazzi wrote: > > > > From: Alice Ferrazzi > > > > > > > > As a result of an unsupported operation is better to use EOPNOTSUPP > > > > as error code. > > > > ENOSYS is only used for 'invalid syscall nr' and nothing else. > > > > > > > > Signed-off-by: Alice Ferrazzi > > > > > > Acked-by: Josh Poimboeuf > > > > I have applied the patch into for-5.1/atomic-replace branch. > > Sorry to jump into the discussion so late. Thinking a little more about > the check itself, previously with immediate flag an architecture can do > livepatching with limitations and without the reliable stack trace > implemented yet. > > After removal of the immediate flag by > commit d0807da78e11 ("livepatch: Remove immediate feature"), every > architecture enabling livepatching is required to have implemented > reliable stack trace. Is it a better idea to make > HAVE_RELIABLE_STACKTRACE a config dependency, which will disable > livepatching support for architectures without reliable stack trace > function during kernel build? > > The idea is to remove klp_have_reliable_stack() by moving > CONFIG_HAVE_RELIABLE_STACKTRACE as a config dependency to Kconfig > file Looks like a nice cleanup. > and adding the other CONFIG_STACKTRACE as a config dependency is not > required, as it's selected via CONFIG_DYNAMIC_FTRACE_WITH_REGS > dependency chain. With the patch on architecture without > HAVE_RELIABLE_STACKTRACE, the user should see: Hmm, I see the following in kernel/trace/Kconfig: config TRACING [...] select STACKTRACE if STACKTRACE_SUPPORT It seems that the depency is not guaranted. Or do I miss anything? Anyway, it is pretty indirect. I would prefer to add dependency on STACKTRACE explicitly into config LIVEPATCH. Best Regards, Petr