Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp197442rdh; Wed, 7 Feb 2024 01:55:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IFINXdENjW5TtQUpA1aYpkUk6syRP9SFx07wsBzkdOw3pxUe94n1Jufc43LEHH7gYXuyCOf X-Received: by 2002:a17:903:2447:b0:1d9:b21f:539e with SMTP id l7-20020a170903244700b001d9b21f539emr4664922pls.59.1707299702168; Wed, 07 Feb 2024 01:55:02 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX4PVHOpLG722yCK/y26wkcAs1rYMkn0ys7KnuG6xFJd9oQTxJPAy7EFPxpaEEncz8QM6W2iku5getHjdPj+f4Rrr4ID5MBF+4BPS88Vw== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i20-20020a17090320d400b001d9a29eff0esi1170591plb.394.2024.02.07.01.55.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 01:55:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56262-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@szeredi.hu header.s=google header.b=F2LU3Stv; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-56262-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56262-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=szeredi.hu Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id ABF42282857 for ; Wed, 7 Feb 2024 09:54:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C719241E2; Wed, 7 Feb 2024 09:54:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=szeredi.hu header.i=@szeredi.hu header.b="F2LU3Stv" Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 31D8B23745 for ; Wed, 7 Feb 2024 09:54:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707299690; cv=none; b=YN/To+HY59LAWqEG5ktileziFeeKjH4065V4XnM8z0pWiSIh3FDw9Tsu/9+z0bFXGp98DnI03XvmQjm286LM1OV4RYIPZ7jwvBnYQ3SB/ZyLaUeW8Po4mTedknWV5xAVs2EOnxwnei7jEVdErAWgNqM26jPSS3AiIA1lkBMnoQc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707299690; c=relaxed/simple; bh=gsrPl8ONKkHgMXOtQ3LNXnXN90QVWA2iAnCCffMCo5Y=; h=MIME-Version:From:Date:Message-ID:Subject:To:Cc:Content-Type; b=TSoK6ezX08f7PkTrJ6D8hkgRAEeIEOZtifrLFt4fZHMosJgBoyLVRnwne9WMuzkg7sYpv0lVwN2xbu2aNQF9xrwE9Z1T5E9VGZ0MrwVdw0TxCqsSdlic6l8KxwMdTJPT5LH8Wp7OGZgExs3VNQoDLGZoQCHntzC7zqhUxmC3td0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=szeredi.hu; spf=pass smtp.mailfrom=szeredi.hu; dkim=pass (1024-bit key) header.d=szeredi.hu header.i=@szeredi.hu header.b=F2LU3Stv; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=szeredi.hu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=szeredi.hu Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a3864258438so88368666b.0 for ; Wed, 07 Feb 2024 01:54:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; t=1707299686; x=1707904486; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=RHDGnGm44fhHZ7pCs6HugzuCEaAY8Qf8wWUN/+3rMqg=; b=F2LU3StvfmH1V+ZOy2mP9Iq5/af1AmYpZG23lOkgKdrDhktZaxdwIfiWlel/wI9PQ+ nGue4OMcADC0FmywqHfmyM9YhIgy2f+9N8otehqYZtRy0OrXjBCkcVCCp5BfEn5SF0SH f846C1jbC0pWLCKqIgGee+lLhbZ5FSlOdQplg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707299686; x=1707904486; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=RHDGnGm44fhHZ7pCs6HugzuCEaAY8Qf8wWUN/+3rMqg=; b=OWaw/ZDjPmGeA0X7vCoEkr7JSSBMoxryfjNEyPA5tchN0kdJXKkVNahy/JQbnMHhVE Q/zAVlkunW9duJTjYJikyH14VmB2ZbxkL0kkrvZGR8K60mNyZsQ2JFI/7yWdWMzYYTa4 br99PBlzVdUIrsa/nN1g0/ZXZbs9Gh9FJAqIdUaAJgLNJyQhW3tZh2JtdnTvl4EJDpYL nZGWXTv197yehYOUSCQzk8NFGTjMqdg6Q2Wn4giX5f9sLFgqMvFE+4zRamtoL8CozlqX vKJujE68zw7QdeO5bTSPA+nhKaIyjaC2ByQUb7loYJYUDjWxzcIWhtiCxCPwwCZEvhtE ZVtg== X-Gm-Message-State: AOJu0YwKwOfvu6pNZxvKR8SzvSIkKZOENBV3oeGUTk/ojfx0orLidMBS n4OAzLYluJaEo19aB7wa+rEbGw+sryATcLTESaURcjYAksej7ak0k1T1cfi6/iKhm6W+IKVyl9q H+05jcerrXeSncCYRLd+sCyn2MigtggCDJSXD3w== X-Received: by 2002:a17:906:ca58:b0:a38:1712:ef2b with SMTP id jx24-20020a170906ca5800b00a381712ef2bmr4496577ejb.21.1707299686008; Wed, 07 Feb 2024 01:54:46 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Miklos Szeredi Date: Wed, 7 Feb 2024 10:54:34 +0100 Message-ID: Subject: [LSF/MM/BPF TOPIC] tracing the source of errors To: lsf-pc Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" [I'm not planning to attend LSF this year, but I thought this topic might be of interest to those who will.] The errno thing is really ancient and yet quite usable. But when trying to find out where a particular EINVAL is coming from, that's often mission impossible. Would it make sense to add infrastructure to allow tracing the source of errors? E.g. strace --errno-trace ls -l foo .. statx(AT_FDCWD, "foo", ...) = -1 ENOENT [fs/namei.c:1852] .. Don't know about others, but this issue comes up quite often for me. I would implement this with macros that record the place where a particular error has originated, and some way to query the last one (which wouldn't be 100% accurate, but good enough I guess). Thanks, Miklos