From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752403AbdJTPwA (ORCPT ); Fri, 20 Oct 2017 11:52:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:42796 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751698AbdJTPv7 (ORCPT ); Fri, 20 Oct 2017 11:51:59 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1AC9921923 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mhiramat@kernel.org Date: Sat, 21 Oct 2017 00:51:55 +0900 From: Masami Hiramatsu To: Ingo Molnar Cc: Linus Torvalds , Peter Zijlstra , Alexei Starovoitov , Ananth N Mavinakayanahalli , "Paul E . McKenney" , Steven Rostedt , Thomas Gleixner , LKML , "H . Peter Anvin" , Anil S Keshavamurthy , "David S . Miller" , Kees Cook , Ian McDonald , Vlad Yasevich , Stephen Hemminger Subject: Re: [RFC PATCH -tip 1/5] kprobes: Use ENOTSUPP instead of ENOSYS Message-Id: <20171021005155.d65ded09654664f76f43e12f@kernel.org> In-Reply-To: <20171020085722.n422sxot6k7kipjy@gmail.com> References: <150724519527.5014.10207042218696587159.stgit@devbox> <150724523678.5014.7179010055808035742.stgit@devbox> <20171020085722.n422sxot6k7kipjy@gmail.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 20 Oct 2017 10:57:22 +0200 Ingo Molnar wrote: > > * Masami Hiramatsu wrote: > > > Use ENOTSUPP instead of ENOSYS because ENOSYS is reserved > > only for invalid syscall number. > > Is this actually true? We use -ENOSYS in a ton of code in kernel/ already, not > just for non-existing syscall number. I got a warning from checkpatches.pl, also in include/uapi/asm-generic/errno.h, /* * This error code is special: arch syscall entry code will return * -ENOSYS if users try to call a syscall that doesn't exist. To keep * failures of syscalls that really do exist distinguishable from * failures due to attempts to use a nonexistent syscall, syscall * implementations should refrain from returning -ENOSYS. */ #define ENOSYS 38 /* Invalid system call number */ So, I decided not to use ENOSYS for this error. Thank you, > > Ingo -- Masami Hiramatsu