Message ID | 94ce8a8b0cac5c5142b802c4e777b2aaa8a1e682.1646292328.git.development@efficientek.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=TBS8rPlX; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=efficientek-com.20210112.gappssmtp.com header.i=@efficientek-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=GtNC7H26; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K8NYq4861z9sFN for <incoming@patchwork.ozlabs.org>; Thu, 3 Mar 2022 18:54:55 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=d2+0Di5tmJENd/315/ooKSG5E5NQNJnMNj4/RtNl1+M=; b=TBS8rPlXYAPnUu yD34lkG97INNRWSnDv3XhwwdVVRrKIkkO9FUSN/ZUAJbL1IVCJU5SGZZ6FBD21klyZMA7ihHjE8dk SgbEcFdcN1rHGxJeTp0EzK3GI7ZGzOhfAVeoHjScx0idPEeVKXzK6CyLTHEMe90Di7/nnuIRbJhLd MBwJSkCsaNJT5iN/QQtZdQubwIMRVCuprqOAlg3tKMVw6/IYHayZWXLTKI7k41/IyX+cZBRoHcs9b ac2Ld4eOM9xLS3GLHRRsjETlheS4u8GMhjCf8Z8Ls3wGCtP0eZ0Fslq2btrIAEzlDVfvKIKenz93L sRDeDuL2hA+OW7zgP5nQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPgIQ-005dbY-Qo; Thu, 03 Mar 2022 07:54:46 +0000 Received: from mail-qv1-xf2b.google.com ([2607:f8b0:4864:20::f2b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPgIO-005dZP-5S for linux-um@lists.infradead.org; Thu, 03 Mar 2022 07:54:45 +0000 Received: by mail-qv1-xf2b.google.com with SMTP id x3so3493073qvd.8 for <linux-um@lists.infradead.org>; Wed, 02 Mar 2022 23:54:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ad2x3VSAPzpGtH7KDvJgZW0jBFtw1iFAFxWNBECg+Ag=; b=GtNC7H26pNPFRYYFKRq9GMliDC2XJ9lOUVjxJFixUGpQ3W6QveRYMOlM+UWAuOlcQ/ xcpqQJMT9+PdvnR86EXNq58vM+6NRJh9Y98v12QGHAK1YYh6x85OXVqcOPVN5IEuII3B MmXhKdFBvp/1IdWF2dm/CEoy0RcKtt+MaSVuoUKUqt6kh09p64ZXPMw9r+7afndHK/tI L/FMqLAP2tXh7imqV0tU1lWAXvvygG3x64yf22uXaNU920WzpiJwjqbL8khQ+1hFZE1S dShiKRYpVCt2gfb1YKAOKsh5i265NgFbHRnFFH+wvcT6pYytxMts+NUQnv14FKI6LTl9 YjNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ad2x3VSAPzpGtH7KDvJgZW0jBFtw1iFAFxWNBECg+Ag=; b=IVb76S0HnbjU9Htpwdmx48yvCsR3KO6laMx7d2+bznnEqojdCbDD1TY7T65wofbt59 HvK+ROKoFe6TpPGwdEmbxH5l5fx10iIKjyiF3UPiy7rP8r69MyFzRd6naCjgbHiiC2NW ZPONpcas93tUx3jGunXF+a4JRPde0K12St9cD1PB+Z3oWWcOefYCJz45wgVAwlEO7Hm9 1dblE+tzmuceor56kdzFpTq7pDGJUfFKrgWb7VDjIw38Ea71sVw6U1xPAigtFnipeBlX 1BX4hDsKeq+bbJgt+q/IwpNEnJ5CDplgFVMlqqu5hyyRAZ/1EdsCrn5Ssu8CFP/smzYQ 99nA== X-Gm-Message-State: AOAM532odQHps55Gn1ZrT4MC7NJe6hEDql0O8h8MdDMLUVj580f2hPBF gZmH8LglrWNUz+XauswNyKKg6l6GqS7isA== X-Google-Smtp-Source: ABdhPJxc5933MCqlxqZx5zgMhzr8uGJrY9D+hZfui5PBSfP9sHLwi8Cv6FwK4IGicDJmzg4UYtAavQ== X-Received: by 2002:a0c:e3cb:0:b0:435:195b:cc4f with SMTP id e11-20020a0ce3cb000000b00435195bcc4fmr6092072qvl.110.1646294083355; Wed, 02 Mar 2022 23:54:43 -0800 (PST) Received: from localhost.localdomain (garza.riseup.net. [198.252.153.109]) by smtp.gmail.com with ESMTPSA id o21-20020a05622a009500b002de9437a361sm1044295qtw.51.2022.03.02.23.54.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 23:54:43 -0800 (PST) From: Glenn Washburn <development@efficientek.com> To: linux-um <linux-um@lists.infradead.org> Cc: Glenn Washburn <development@efficientek.com> Subject: [PATCH 4/4] um: run_helper: Write error message to kernel log on exec failure on host Date: Thu, 3 Mar 2022 01:53:33 -0600 Message-Id: <94ce8a8b0cac5c5142b802c4e777b2aaa8a1e682.1646292328.git.development@efficientek.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <cover.1646292328.git.development@efficientek.com> References: <cover.1646292328.git.development@efficientek.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220302_235444_234041_5B65ACC9 X-CRM114-Status: GOOD ( 13.49 ) X-Spam-Score: 0.0 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The best place to log errors from the host side is in the kernel log within the UML guest. Letting the user now that exec() failed and why is very helpful when the user is trying to determine why some [...] Content analysis details: (0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:f2b listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-um.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-um>, <mailto:linux-um-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-um/> List-Post: <mailto:linux-um@lists.infradead.org> List-Help: <mailto:linux-um-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-um>, <mailto:linux-um-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-um" <linux-um-bounces@lists.infradead.org> Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
[1/4] um: port_user: Search for in.telnetd in PATH
|
expand
|
diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c index 32e88baf18dd..b459745f52e2 100644 --- a/arch/um/os-Linux/helper.c +++ b/arch/um/os-Linux/helper.c @@ -4,6 +4,7 @@ */ #include <stdlib.h> +#include <string.h> #include <unistd.h> #include <errno.h> #include <sched.h> @@ -99,6 +100,10 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv) CATCH_EINTR(waitpid(pid, NULL, __WALL)); } + if (ret < 0) + printk(UM_KERN_ERR "run_helper : failed to exec %s on host: %s\n", + argv[0], strerror(-ret)); + out_free2: kfree(data.buf); out_close:
The best place to log errors from the host side is in the kernel log within the UML guest. Letting the user now that exec() failed and why is very helpful when the user is trying to determine why some aspect of UML is not working. For instance, when telneting into the UML instance, if the connection is established and then immediately dropped, this may be due to exec() failing because in.telnetd is not found. Signed-off-by: Glenn Washburn <development@efficientek.com> --- arch/um/os-Linux/helper.c | 5 +++++ 1 file changed, 5 insertions(+)