Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5875473imu; Wed, 30 Jan 2019 05:11:42 -0800 (PST) X-Google-Smtp-Source: ALg8bN5qQaTIV571OdHPFHI6K8fOnMNK/wVGUrp4dQov8jBSs6kvmEkgUASqzkL3co4V//yQ7TnM X-Received: by 2002:a17:902:bf03:: with SMTP id bi3mr30370971plb.83.1548853902503; Wed, 30 Jan 2019 05:11:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548853902; cv=none; d=google.com; s=arc-20160816; b=gyJdtMOXfsr5B6iZLqqAdV94Q9eu1NLvxj5H6bcH1xICvfz6fzHrGs/tkU24FAHbI+ HjUz3kdrlxd4pRf+07jGA2KfJI+IHarYXwtHPe6fXC3qXRzlLvoQAmB4Z/o6eCpEPtU9 i8uvKnyQ1iOgN0/Il1qYmkNAJQY+wY/P/WXjSlTKFvs0Hs1mjjKRvwjNmZJUAK1id/Bg r+Tdx7Ghpli7AH7VGPRLN+EtAhe3+WwOzPGRUjX/O962RVC2bxUizDP/u+SX9ZdjItS6 2V1tOtcjHzTYoAZQZdFhdDqMwVtZ8V8pd1DkfFuDhvbRq6MRKy8i4VXCy5N7hRKXFYlP qfAQ== 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=bVYsJ79IcJvnzklN3T/I6BAEieq2T9HaXf4OqBvk3hw=; b=NdLLVd13pBYYC+gWAXCpD1tB+BRpjRTN2dr1T90BvvzCtvDSLTVf8MWM1qiFD5bIsk yByVBV8/FMC/NbNo00njD8yuDkxjHWxKqpY3XanTjCJ9UVLzxgmv9WSUikHdMGrNVp+M iaWIsnYBazSTWFGfHZSqDfBVnU9UzN3F9HoV/7XsJLRLaOKWB/IMVtSlcQOt+ZVQ1PKU 2+wtmFbZ9hByF82Ld4yt6hvYeYGNija/MFACSfV4XuEdVEsvfuz1W7absJLbkyzRODCk vCy0X7NgyIPrJw+cz2BB878OXIXA5d1bNrtD2d6GH+9OmWPfx5GrkxOejzTs7rTJ888A bSRA== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y4si1444719pfk.172.2019.01.30.05.11.25; Wed, 30 Jan 2019 05:11:42 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730673AbfA3NK5 (ORCPT + 99 others); Wed, 30 Jan 2019 08:10:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34698 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726246AbfA3NK5 (ORCPT ); Wed, 30 Jan 2019 08:10:57 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1D464142BE4; Wed, 30 Jan 2019 13:10:57 +0000 (UTC) Received: from treble (ovpn-120-91.rdu2.redhat.com [10.10.120.91]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9C70B608C4; Wed, 30 Jan 2019 13:10:51 +0000 (UTC) Date: Wed, 30 Jan 2019 07:10:49 -0600 From: Josh Poimboeuf To: Petr Mladek Cc: Joe Lawrence , 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] livepatch: core: Return ENOTSUPP instead of ENOSYS Message-ID: <20190130131049.gnhge73xvh62p3gl@treble> References: <20190126192630.6163-1-alicef@alicef.me> <20190128194943.GA18515@redhat.com> <20190129165054.vyi7n6in5v2omkpu@treble> <20190130124156.qjtbvrkjctu6wi62@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190130124156.qjtbvrkjctu6wi62@pathway.suse.cz> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 30 Jan 2019 13:10:57 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 30, 2019 at 01:41:56PM +0100, Petr Mladek wrote: > Hmm, the error code is passed to the syscall, for example: > > + SYSCALL_DEFINE3(init_module > + load_module() > + do_init_module() > + do_one_initcall(mod->init); > > I am not sure if we are allowed to return -ENOTSUPP (-524). > It is defined in the internal include/linux/errno.h. There > is the following commnent: > > /* > * These should never be seen by user programs... > > > > I tried to find a better alternative and found: > > #define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ > > > There is the following note in man errno: > > ENOTSUP Operation not supported (POSIX.1) > > EOPNOTSUPP Operation not supported on socket (POSIX.1) > (ENOTSUP and EOPNOTSUPP have the same value > on Linux, but according to POSIX.1 these error > values should be distinct.) > > And it looks that -EOPNOTSUPP is used widely in many subsystes (not > only network). Yes, you are right. It's confusing that ENOTSUPP and ENOTSUP are not the same thing. EOPNOTSUPP sounds good. -- Josh