From patchwork Thu Mar 24 12:13:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1608996 Return-Path: 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=IpGefPs9; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=sipsolutions.net header.i=@sipsolutions.net header.a=rsa-sha256 header.s=mail header.b=XIe4p60e; 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=) 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 4KPPKJ2dcWz9sBy for ; Thu, 24 Mar 2022 23:14:12 +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: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:In-Reply-To:References: List-Owner; bh=vWF7LGUoYroLHdZwItUiWkn6qdBwSvPssRZ3DHnlHXM=; b=IpGefPs9i5Zahc s5UbzPRGVT9C7nuGP0lH0VQi1U1nKyZIzXrR2brsvVpOvxJ5dO7nfxbwXpKPqCntUfusrNHiQZv6l 0qgjcuWBEsyLY7L9Df/8jOLsZHqXtH3rpmr7URAH+M1XPLt7WMvom5EfdRiDt4WE/24zJ84IpMW5l 1SWGuBKDjqdxh5+bYQ2LH3E3XBxt3uSTHhlrQzNdrSfJT6BY/FAHTYJbOBVhWjZqhn87GNURmVWTC snGK7pf4lEntqNg5OCm2SnV1sRUjV/gaeHTb7/MVNzhDoHc8itO8NsVqaiSuLoeADltIZVGFACorm MK/EBJVT9CILgjlCJs5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nXMLo-00GRb7-JH; Thu, 24 Mar 2022 12:14:00 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nXMLl-00GRZm-G6 for linux-um@lists.infradead.org; Thu, 24 Mar 2022 12:13:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-To:Resent-Cc: Resent-Message-ID:In-Reply-To:References; bh=WEfFwbOAvHcuhOUw3aBbyyins3JAI/07uHJncUtPJck=; t=1648124033; x=1649333633; b=XIe4p60ed0Mjngm4LaxwRBArt+ZAJXBB+OPhHP83IpAMWkUYbFLqlr2w65cQiFkKOCvxoK+GUXm cV0q5LEwrwBqmSi8IN3uGUUJEiIW1Oo8GvRV1BEaigSaZH3ksiM+Un+3CfX+eWDuyaZwrIJ7gdz5O NIh80fEu+0IdS95V5P5RQnwy9nP2vvmAZgBlAEx+SxaOMC2zaEvEqJIehlr/jre9PVlWSZ6CBN/yE bC5udUDcZtUeuTM5vsWi8oRFSgB5qBq+1HVcUJXyj3M6R8IZ5dtch3RgxuF7lfQSYfxKkDKRwc+Qg ZVRlu7YkIAIAijQ7Pj0yy9YE7FzU168jX+hw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1nXMLd-00HVID-QL; Thu, 24 Mar 2022 13:13:49 +0100 From: Johannes Berg To: linux-um@lists.infradead.org Cc: Ritesh Raj Sarraf , Johannes Berg Subject: [PATCH 1/2] um: xterm: make default terminal emulator configurable Date: Thu, 24 Mar 2022 13:13:43 +0100 Message-Id: <20220324131344.b7608507865f.I4f78dca5973127790f8dc5757ff5f021078b2c62@changeid> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220324_051357_562296_547A6A9B X-CRM114-Status: UNSURE ( 9.59 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) 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: From: Johannes Berg Make the default terminal emulator configurable so e.g. Debian can set it to x-terminal-emulator instead of the current default of xterm. Signed-off-by: Johannes Berg --- arch/um/drivers/Kconfig | 7 +++++++ arch/um/drivers/Makefile | 2 ++ arch/um/drivers/xterm.c | 7 ++++--- 3 files changed, 13 insertions(+), 3 [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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 -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg Make the default terminal emulator configurable so e.g. Debian can set it to x-terminal-emulator instead of the current default of xterm. Signed-off-by: Johannes Berg Acked-By: Anton Ivanov Tested-by: Ritesh Raj Sarraf --- arch/um/drivers/Kconfig | 7 +++++++ arch/um/drivers/Makefile | 2 ++ arch/um/drivers/xterm.c | 7 ++++--- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/arch/um/drivers/Kconfig b/arch/um/drivers/Kconfig index f145842c40b9..521ae0d46076 100644 --- a/arch/um/drivers/Kconfig +++ b/arch/um/drivers/Kconfig @@ -64,6 +64,13 @@ config XTERM_CHAN its own xterm. It is safe to say 'Y' here. +config XTERM_CHAN_DEFAULT_EMULATOR + string "xterm channel default terminal emulator" + depends on XTERM_CHAN + default "xterm" + help + This option allows changing the default terminal emulator. + config NOCONFIG_CHAN bool default !(XTERM_CHAN && TTY_CHAN && PTY_CHAN && PORT_CHAN && NULL_CHAN) diff --git a/arch/um/drivers/Makefile b/arch/um/drivers/Makefile index 803666e85414..e1dc4292bd22 100644 --- a/arch/um/drivers/Makefile +++ b/arch/um/drivers/Makefile @@ -70,4 +70,6 @@ obj-$(CONFIG_UML_PCI_OVER_VIRTIO) += virt-pci.o USER_OBJS := fd.o null.o pty.o tty.o xterm.o slip_common.o pcap_user.o vde_user.o vector_user.o CFLAGS_null.o = -DDEV_NULL=$(DEV_NULL_PATH) +CFLAGS_xterm.o += '-DCONFIG_XTERM_CHAN_DEFAULT_EMULATOR="$(CONFIG_XTERM_CHAN_DEFAULT_EMULATOR)"' + include arch/um/scripts/Makefile.rules diff --git a/arch/um/drivers/xterm.c b/arch/um/drivers/xterm.c index 87ca4a47cd66..6918de5e2956 100644 --- a/arch/um/drivers/xterm.c +++ b/arch/um/drivers/xterm.c @@ -42,7 +42,7 @@ static void *xterm_init(char *str, int device, const struct chan_opts *opts) } /* Only changed by xterm_setup, which is a setup */ -static char *terminal_emulator = "xterm"; +static char *terminal_emulator = CONFIG_XTERM_CHAN_DEFAULT_EMULATOR; static char *title_switch = "-T"; static char *exec_switch = "-e"; @@ -79,8 +79,9 @@ __uml_setup("xterm=", xterm_setup, " respectively. The title switch must have the form ' title',\n" " not '=title'. Similarly, the exec switch must have the form\n" " ' command arg1 arg2 ...'.\n" -" The default values are 'xterm=xterm,-T,-e'. Values for gnome-terminal\n" -" are 'xterm=gnome-terminal,-t,-x'.\n\n" +" The default values are 'xterm=" CONFIG_XTERM_CHAN_DEFAULT_EMULATOR + ",-T,-e'.\n" +" Values for gnome-terminal are 'xterm=gnome-terminal,-t,-x'.\n\n" ); static int xterm_open(int input, int output, int primary, void *d, From patchwork Thu Mar 24 12:13:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1608995 Return-Path: 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=J5gGzQC2; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=sipsolutions.net header.i=@sipsolutions.net header.a=rsa-sha256 header.s=mail header.b=TExVslcU; 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=) 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 4KPPKG4s7Qz9s5V for ; Thu, 24 Mar 2022 23:14:10 +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=GfUv42vy538DWbVNzDqGe+jN9+4V2m0WCcnQh7d7tdc=; b=J5gGzQC2ZgJh1c PITjJKJTuoY+bGBjhF6NBzZMXSnr1HUlof7o7Fi1Fql8/BrbKspWPWbUN5XkIZuFGAR0Nhdq1uwSZ v4Ja49Ct2oYIqvGJHBF676We+nju9A9hORIb8r72TJaVmzZ8asLtmLSQBnHvFeir9uINYnxP8UGy9 sxQ/uS95nhPlf0VPM73fjfeegRYCJt17Su5/+2jUSdB5WBQSzbCqwzTj8S1yHJ3Xc6mzrZg5JGT1S 0roExrP72wYZ4grrdfXeMwVJ4XFsFROf9tVAyJ4b6DCegGnlKOL+evh6U0H3Tls7ZWaPVSvxeIL7h aodlS8Bs3IZ+H1JF13Ew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nXMLn-00GRav-C8; Thu, 24 Mar 2022 12:13:59 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nXMLk-00GRZn-KH for linux-um@lists.infradead.org; Thu, 24 Mar 2022 12:13:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=F4IMVbrJ3qaN6UWMrQ8Mf75mq1eozGKIx+3YIoXXxxM=; t=1648124033; x=1649333633; b=TExVslcUcimkL+jRTd5H+bQ4a4jlaNODr/ejtpjxHTzVfTi tSdg2pMsrnz806alsY2PQjAlz/hiXrZyrt7xL3rxppBo2RLVTbX8ewLElQjNcpQHh2yhamNj9phvz OG/waBjuzhluVJy/h+54bQTFyOv8auYfUWClxVtQ7cWtCXpI2Ovmmx6LfgF6/KYQCyTd0qU+ljsy7 tGI8BjBUvPkgmifwDj7uxmnLutdh3GPozcDM28IPQRbc+GVXO+CK8fKepgU8jqa2eVx48b08npzam tYJxIg97RrpeJIbpzyh5ilpzqdPJOGAz/sBszR9jFKLRzchEjVKBV9KhMlvn13pg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1nXMLe-00HVID-4B; Thu, 24 Mar 2022 13:13:50 +0100 From: Johannes Berg To: linux-um@lists.infradead.org Cc: Ritesh Raj Sarraf , Johannes Berg Subject: [PATCH 2/2] um: daemon: make default socket configurable Date: Thu, 24 Mar 2022 13:13:44 +0100 Message-Id: <20220324131344.3cd44e85efab.I8bb1282abea3119025f79507f01c0d951bb1bede@changeid> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220324131344.b7608507865f.I4f78dca5973127790f8dc5757ff5f021078b2c62@changeid> References: <20220324131344.b7608507865f.I4f78dca5973127790f8dc5757ff5f021078b2c62@changeid> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220324_051356_688271_FAD6CEA8 X-CRM114-Status: GOOD ( 10.50 ) X-Spam-Score: -0.2 (/) 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: From: Johannes Berg Even if daemon network is deprecated, some configurations may still use it (e.g. Debian), and not want to default to the /tmp/uml.ctl socket location. Allow configuring the default socket location. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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 -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg Even if daemon network is deprecated, some configurations may still use it (e.g. Debian), and not want to default to the /tmp/uml.ctl socket location. Allow configuring the default socket location. Signed-off-by: Johannes Berg Acked-By: Anton Ivanov Tested-by: Ritesh Raj Sarraf --- arch/um/drivers/Kconfig | 8 ++++++++ arch/um/drivers/daemon_kern.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/um/drivers/Kconfig b/arch/um/drivers/Kconfig index 521ae0d46076..914da774bd39 100644 --- a/arch/um/drivers/Kconfig +++ b/arch/um/drivers/Kconfig @@ -238,6 +238,14 @@ config UML_NET_DAEMON If unsure, say N. +config UML_NET_DAEMON_DEFAULT_SOCK + string "Default socket for daemon transport" + default "/tmp/uml.ctl" + depends on UML_NET_DAEMON + help + This option allows setting the default socket for the daemon + transport, normally it defaults to /tmp/uml.ctl. + config UML_NET_VECTOR bool "Vector I/O high performance network devices" depends on UML_NET diff --git a/arch/um/drivers/daemon_kern.c b/arch/um/drivers/daemon_kern.c index fd2402669c49..afde1e82c056 100644 --- a/arch/um/drivers/daemon_kern.c +++ b/arch/um/drivers/daemon_kern.c @@ -65,7 +65,7 @@ static int daemon_setup(char *str, char **mac_out, void *data) *init = ((struct daemon_init) { .sock_type = "unix", - .ctl_sock = "/tmp/uml.ctl" }); + .ctl_sock = CONFIG_UML_NET_DAEMON_DEFAULT_SOCK }); remain = split_if_spec(str, mac_out, &init->sock_type, &init->ctl_sock, NULL);