Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1716578imj; Fri, 8 Feb 2019 06:16:05 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibzh9mCgNzaGQ9fqrRohu9RM17l1tJDZtsbuwUI2wA3726TJzKmZZYOaqQD+Q0jbAI8W2z8 X-Received: by 2002:a63:4384:: with SMTP id q126mr20436109pga.160.1549635365183; Fri, 08 Feb 2019 06:16:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549635365; cv=none; d=google.com; s=arc-20160816; b=qW+IzBtIg7Z7rCoh7QqOjvYGWh+kWucc8RPenV57Oi7lwR+8BKuApbvLbU7881z97x VlVgepwaO1Wv5pvNg6FMCixJRKAlPdofHXBj7XW0Ao8kz7LhQtdfQZ9OLDDtQRfkbj+A yHYkV+Kk55xta9eftgYCtXy0nFFSzs0RTy4DwO6BqyZrAXeIEjUKEozqgnSC5ie2r20x XcvnsR3Z+LfKEYj9WtQsV83Vb4w/zQXMk1gXjo0J3hA51SGylevC7ggo0+q6HD/opO3s hcyL0gB35n7RLWq2ZByMkw6wkSKJ2BvBDk8dMFhyC/2lPFjIX43SPe3WUJ/EVHwwCDKn rbLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date; bh=p4VReyXL3FZ+XAUMyKRZCR7BPvlP50E4HiqHG820F1Q=; b=YkjBNftUV9Cp3/Ve1jXUEuzdOPL0CZ4UCgKOcj6bgz7uph2P/GkaXxDGJZ/sDUPG3I yFwhK+Yv+36oh6wS3D3pLlUK7OAYzDMvKjajO3ywfIa/f279i2Cvo4o24DkivsmSdZQD ViYcWR9xwdJxyGazHrROAYVr4fiDRjZrhdjPb9dYarkemTwyqpuX/q9hIx44qKuHLvY6 c5xd6s1MJb/m+omYPqAtSKdgFtU3hqJZajI5YIoZvVtP8+FNLgG4hoNja+i49joO86Df 6bM7j56ofoL8uYCRPt/kUOauceRb0To+GIXXejUFsfR0FYLaCnTNsmAT3nk9kgvVcWJ1 7QiQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i189si2392673pfg.265.2019.02.08.06.15.46; Fri, 08 Feb 2019 06:16:05 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727970AbfBHONZ (ORCPT + 99 others); Fri, 8 Feb 2019 09:13:25 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:52488 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727959AbfBHONY (ORCPT ); Fri, 8 Feb 2019 09:13:24 -0500 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x18E99bu043151 for ; Fri, 8 Feb 2019 09:13:23 -0500 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2qhawh1egq-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 08 Feb 2019 09:13:23 -0500 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 8 Feb 2019 14:13:20 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 8 Feb 2019 14:13:15 -0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x18EDELL50528310 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 8 Feb 2019 14:13:14 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BE9FAAE053; Fri, 8 Feb 2019 14:13:14 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 781AEAE057; Fri, 8 Feb 2019 14:13:12 +0000 (GMT) Received: from JAVRIS.in.ibm.com (unknown [9.102.1.73]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Fri, 8 Feb 2019 14:13:12 +0000 (GMT) Date: Fri, 8 Feb 2019 19:43:09 +0530 From: Kamalesh Babulal To: Petr Mladek 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 References: <20190204183324.30775-1-alicef@alicef.me> <20190205155933.r6ey474lq4m5nlmp@treble> <20190206102832.apa7sekkwljo4ejg@pathway.suse.cz> <20190208062005.GA21436@JAVRIS.in.ibm.com> <20190208093445.zvxkgaummsait5z6@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190208093445.zvxkgaummsait5z6@pathway.suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) X-TM-AS-GCONF: 00 x-cbid: 19020814-4275-0000-0000-0000030D1AAE X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19020814-4276-0000-0000-0000381B26E4 Message-Id: <20190208141309.GA2215@JAVRIS.in.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-08_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=968 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902080101 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 08, 2019 at 10:34:45AM +0100, Petr Mladek wrote: > 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. [...] > > 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. Thanks > > > 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? I should have tried drawing the config dependency of CONFIG_STACKTRACE in the mail. It would saved me from nagivating wrong indirections in tricky Kconfigs. You are right, CONFIG_STACKTRACE is not selected via CONFIG_DYNAMIC_FTRACE_WITH_REGS config dependency chain. > > Anyway, it is pretty indirect. I would prefer to add dependency > on STACKTRACE explicitly into config LIVEPATCH. Agree, explicitly listing CONFIG_STACKTRACE as one of the dependencies under config LIVEPATCH will guarantee the dependency is met. On the curious note, digging through the git logs, CONFIG_STACKTRACE_SUPPORT is enabled by default on x86/PowerPC for quite long now. Thanks, Kamalesh