From patchwork Fri Jul 21 17:18:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 1811055 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.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=pQt2+Ghv; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=jdVEybrP; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4R6xB64SPHz1yYc for ; Sat, 22 Jul 2023 03:19:26 +1000 (AEST) 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=/mGyaJG8jHceMAgoSGnsSh2j/G6UBNUfvO258FifLIc=; b=pQt2+GhvAKUMwD 9/QVKU2zO2/xkG7HY+YNAX8iUyTawgL6Dd/bR+ZNTgCvYCYZyvtf98rHor9P+2tPqw6OtQm7uvZCP GXD+gjqgYoWWXMTVVw1j3kyFoLFsHUK/Tg7skh8IW0IRlGIqg0GmzdjRoarKz3WM2a/mKOFmFH23q XiBT8DmIpe1MjmJNF6GJqaDRYsnUl0SRemsvYzrtEz73F0QHeapDGq2kj36tfTZLTvjrExKqFUe3r wkPe+MaDMjvKKjlkqK0rkXniNM82HuMEK8BJp6BPCRGVM+3ta+b6ozhk8UfH8JO6+gV+hT7TybAVa 4uX8VXYmmNl7qmtNwuyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qMtmc-00EjxW-2L; Fri, 21 Jul 2023 17:19:14 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qMtmZ-00Ejw7-1l for linux-um@lists.infradead.org; Fri, 21 Jul 2023 17:19:12 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BC7DF61D42; Fri, 21 Jul 2023 17:19:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B330EC433C7; Fri, 21 Jul 2023 17:19:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689959950; bh=rqQYBDs0vqpTTedyTMN83jkJBaQ/Y93Hskjay6OnuvE=; h=From:To:Cc:Subject:Date:From; b=jdVEybrP7L1EQAa1kFGVahsP7XbxLWeBbHkEQ8/2j3bE72eeqexXMm8SP1NcSl60D wCbHBQ4JNk34vVBUDsYjcrSinMflpatKaF7oI14TremTy6vjygaNlZwiOP7LMkNaDY S1dzMsVWwOFWQTi5dLnPoTlnDeDK33O7snbWY0yA+WFnXXO+7rFdLmuaBj8JX6vCYN Wcuuq9ZkJmfsLkTW2osqaPnpdAd/igwkBvR1ebIneqFLnytg7xKQEHHg2ngaRDyCpF 5IBxefKbLbdw2ZA1TJs7uChNcy6mKCkW5l0/580I6SoZuyJz9WBt5ymX108ThKN+R5 qvEaZWlOrYn0w== From: Masahiro Yamada To: Richard Weinberger , Anton Ivanov , Johannes Berg , linux-um@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Jiri Slaby , Masahiro Yamada , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Ingo Molnar , Thomas Gleixner , x86@kernel.org Subject: [PATCH v2 1/2] UML: hard-code the result of 'uname -s' Date: Sat, 22 Jul 2023 02:18:56 +0900 Message-Id: <20230721171857.3612639-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230721_101911_643293_AABCE234 X-CRM114-Status: GOOD ( 10.27 ) X-Spam-Score: -5.4 (-----) 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: We rely on 'uname -s' returning 'Linux' because there are os-Linux/ directories, but no other os-*/. Supporting a non-Linux host is unlikely to happen. Let's hard-code 'Linux'. Content analysis details: (-5.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [139.178.84.217 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_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 -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender 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 We rely on 'uname -s' returning 'Linux' because there are os-Linux/ directories, but no other os-*/. Supporting a non-Linux host is unlikely to happen. Let's hard-code 'Linux'. Signed-off-by: Masahiro Yamada --- (no changes since v1) arch/um/Makefile | 7 +++---- arch/x86/um/Makefile | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/um/Makefile b/arch/um/Makefile index da4d5256af2f..1735a562453d 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -18,14 +18,13 @@ else endif ARCH_DIR := arch/um -OS := $(shell uname -s) # We require bash because the vmlinux link and loader script cpp use bash # features. SHELL := /bin/bash core-y += $(ARCH_DIR)/kernel/ \ $(ARCH_DIR)/drivers/ \ - $(ARCH_DIR)/os-$(OS)/ + $(ARCH_DIR)/os-Linux/ MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/shared/skas @@ -78,7 +77,7 @@ USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -I%,,$(KBUILD_CFLAGS))) \ -idirafter $(objtree)/include -D__KERNEL__ -D__UM_HOST__ #This will adjust *FLAGS accordingly to the platform. -include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) +include $(srctree)/$(ARCH_DIR)/Makefile-os-Linux KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/include \ -I$(srctree)/$(HOST_DIR)/include/uapi \ @@ -155,4 +154,4 @@ archclean: @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \ -o -name '*.gcov' \) -type f -print | xargs rm -f -export HEADER_ARCH SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS DEV_NULL_PATH +export HEADER_ARCH SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING DEV_NULL_PATH diff --git a/arch/x86/um/Makefile b/arch/x86/um/Makefile index ee89f6bb9242..e207e6748aa2 100644 --- a/arch/x86/um/Makefile +++ b/arch/x86/um/Makefile @@ -13,7 +13,7 @@ obj-y = bugs_$(BITS).o delay.o fault.o ldt.o \ ptrace_$(BITS).o ptrace_user.o setjmp_$(BITS).o signal.o \ stub_$(BITS).o stub_segv.o \ sys_call_table_$(BITS).o sysrq_$(BITS).o tls_$(BITS).o \ - mem_$(BITS).o subarch.o os-$(OS)/ + mem_$(BITS).o subarch.o os-Linux/ ifeq ($(CONFIG_X86_32),y) From patchwork Fri Jul 21 17:18:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 1811054 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.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=L5INUzvd; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=rvNmnzl1; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4R6xB36MTXz1yYc for ; Sat, 22 Jul 2023 03:19:23 +1000 (AEST) 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=IayIu1Ev9Tskyphs/beyziSunaqDanCDLXzSxFzJmVY=; b=L5INUzvdyupS3V xeX4M7dsb+WW2BKkBxCKkAoO8nxqMD/kscqk3s81GyWF2zJXBo7FvcIjGq1x03akOfzA0u0lIdw1s uY/Wb4AYRzjC3hanlefsqPUwNdEkzcmNje4WiLi0Tlc7Pybjh3jFla4Wqg2vKH0sC88Q1ReXJA5fh Vcg56X/BHxO/K112oHUJGET13l5KrQG0tZDgYAtFj9jH0IuWkrB8EujpK98mMbvZLDHd12piHKS8T kg25sNJnclK8oqx1PukGpm98VRjVzvajdl+xA4Uf1VRGfmKw+A86bceE/bAmeap+g7UA+UF2y95ct Rb5/+KGpX0Uf+5H5Y/Eg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qMtme-00Ejxw-0H; Fri, 21 Jul 2023 17:19:16 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qMtmb-00Ejx4-1h for linux-um@lists.infradead.org; Fri, 21 Jul 2023 17:19:14 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9088361D5A; Fri, 21 Jul 2023 17:19:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9483CC433C9; Fri, 21 Jul 2023 17:19:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689959952; bh=ZR06M3d0gZKRb4qFO1k4EYXqLJ5GJPGsvI0z3w1cJFs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rvNmnzl1Nwu+J/6xOdGaUdPqmOhwTHqfFaC3Xk7KzAE4rMXToL7/R3DzDEgIEkiyo dortXv3BM//zgrIWSD06NieLEU6/Y6fYZ7qT1yqPpIqEgPeqF4NsGop3fc+INGGQCs Y4gp+mQLcdjuI+ap/hA+6Is0i7ARKR2QuICuuoTZ0JuJTbqdwbkoXS94rGeihsiblC b3nnNopcsvLnmco09z4Lw0nobnNtlC4yXVxtwv1ngJtdx4EDkgU0EP55zt/l/BrRiK GzdA82oPy0L/zobquahYfr/Cn6YtJsm0JV+glig0tVHHxC3BSRNj5HcR9Dt2dmyDUY RyMakPBm5ZESw== From: Masahiro Yamada To: Richard Weinberger , Anton Ivanov , Johannes Berg , linux-um@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Jiri Slaby , Masahiro Yamada Subject: [PATCH v2 2/2] UML: use obj-y to descend into arch/um/*/ Date: Sat, 22 Jul 2023 02:18:57 +0900 Message-Id: <20230721171857.3612639-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230721171857.3612639-1-masahiroy@kernel.org> References: <20230721171857.3612639-1-masahiroy@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230721_101913_606353_ACEE1737 X-CRM114-Status: GOOD ( 11.12 ) X-Spam-Score: -5.4 (-----) 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 single build rule does not work with the core-y syntax. [1] Use the standard obj-y syntax. [1]: https://lore.kernel.org/linux-kbuild/d57ba55f-20a3-b836-783d-b49c8a161b6e@kernel.org/T/#m7bc402e1e038f00ebcf2e92ed7fcb8a52fc1ea44 Content analysis details: (-5.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [139.178.84.217 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_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 -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender 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 The single build rule does not work with the core-y syntax. [1] Use the standard obj-y syntax. [1]: https://lore.kernel.org/linux-kbuild/d57ba55f-20a3-b836-783d-b49c8a161b6e@kernel.org/T/#m7bc402e1e038f00ebcf2e92ed7fcb8a52fc1ea44 Signed-off-by: Masahiro Yamada Tested-by: Jiri Slaby Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers --- Changes in v2: - Rephase the commit log arch/um/Kbuild | 2 ++ arch/um/Makefile | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/um/Kbuild b/arch/um/Kbuild index a4e40e534e6a..6cf0c1e5927b 100644 --- a/arch/um/Kbuild +++ b/arch/um/Kbuild @@ -1 +1,3 @@ # SPDX-License-Identifier: GPL-2.0-only + +obj-y += kernel/ drivers/ os-Linux/ diff --git a/arch/um/Makefile b/arch/um/Makefile index 1735a562453d..82f05f250634 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -22,10 +22,6 @@ ARCH_DIR := arch/um # features. SHELL := /bin/bash -core-y += $(ARCH_DIR)/kernel/ \ - $(ARCH_DIR)/drivers/ \ - $(ARCH_DIR)/os-Linux/ - MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/shared/skas HEADER_ARCH := $(SUBARCH)