From nobody Fri Dec 19 15:19:51 2025 Received: from out0-218.mail.aliyun.com (out0-218.mail.aliyun.com [140.205.0.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C6E11474B2 for ; Mon, 26 Aug 2024 10:13:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.218 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724667233; cv=none; b=fCauLu83vV7lZE0NgihNHkNsJyr2B1EPuYhohyHElll0AQeaI2qdjrlBlz9aS1SAUdjBiQpK83JU+bc3Cedp4BkA62kHm/4t5NWWNsZ75VOUWd42d1JDiqWqxcdAyD0fkJ3gwKLSNOubHi1V2YnuB5saNqO3FzaiBIv5GA/S7Qs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724667233; c=relaxed/simple; bh=xUHAMMt5CPV43RQEHQURLk5SuPKB5Ii2393sz9l5A1s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ke7FZYS+26UwjmlUxlls8Do8deEJZ0m3EcFcBXqAeFGxT7BpWtKKl4DxPpTJWqgmmvtUQedget0KGRcHxGZAuYCeB/yUJesDHtuOm5sJCtpeAZ8s95+NXR/yGQSJCc36twyCo5b3HxbfVVBmcQ/maS8aAeK/Wb4TnbJ9KnMzHEU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b=tjbWHA/S; arc=none smtp.client-ip=140.205.0.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b="tjbWHA/S" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1724667223; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=Z/OyflIhDj1OPlK2j8cfY/ptojYdSEITrCVMmB0cw4o=; b=tjbWHA/Sr1FwuOSeSYEgWK6/nhGdTt3NMZ6tU9+NfEPnid6e4OKFBQHGUNE5ZyT7JRH95QtPQHrZDQu1KBN7q6H0qjMSYCcSSrQXiJ6XSmQKhfq9Ms2Q6B0X2ZDv4pGD2ZoEfXiu8rYlTWUf5+fFssg/99QdouL8MohpxyK87N8= Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.Z2YRsc-_1724666905) by smtp.aliyun-inc.com; Mon, 26 Aug 2024 18:08:26 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH v3 1/7] um: Remove unused kpte_clear_flush macro Date: Mon, 26 Aug 2024 18:08:09 +0800 Message-Id: <20240826100815.904430-2-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240826100815.904430-1-tiwei.btw@antgroup.com> References: <20240826100815.904430-1-tiwei.btw@antgroup.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This macro has no users, and __flush_tlb_one doesn't exist either. Signed-off-by: Tiwei Bie --- arch/um/include/asm/pgtable.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h index 5bb397b65efb..83373c9963e7 100644 --- a/arch/um/include/asm/pgtable.h +++ b/arch/um/include/asm/pgtable.h @@ -359,11 +359,4 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte) return pte; } =20 -/* Clear a kernel PTE and flush it from the TLB */ -#define kpte_clear_flush(ptep, vaddr) \ -do { \ - pte_clear(&init_mm, (vaddr), (ptep)); \ - __flush_tlb_one((vaddr)); \ -} while (0) - #endif --=20 2.34.1 From nobody Fri Dec 19 15:19:51 2025 Received: from out0-206.mail.aliyun.com (out0-206.mail.aliyun.com [140.205.0.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 642FD804 for ; Mon, 26 Aug 2024 10:13:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.206 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724667230; cv=none; b=c+6HV8PClKu3TVP/QtqBOcCfSLBdYn0CyfryAi47vtsPQzeC4h1FED4/2EBpdnlEoZwUP4zTYxtbbLJDtRAHyqX80ZbSbLxIwNXCGLPpIISCSB7EvarFH6Kd0ULdKP4MgXyQFWfoX3W9Emkhi4LKinwLbfkdMfwjWJQuP0YAA/4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724667230; c=relaxed/simple; bh=vrr0pFgKlFH8zr7+GGp+kmqkEdG880bRycdUnGqf6EE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ONxlI3/5y7M3DbQhG4aPVom56IDWrOflF3+/tesbE34MgCv+8oa+wPe6y+zsiY00f/Wv11IZ3Vr13Co46FFRX6D7mJlLEA4jK4YWcCyoJcxqYJ+ds4PrL57A+VohSsTBe7SvaDY99ZdHXmcdIAORKBFZEjpzcCFkCtaVCamtJ9Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b=H2ONJIz5; arc=none smtp.client-ip=140.205.0.206 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b="H2ONJIz5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1724667224; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=jo0r7PE2P21mYE53WxHNzNjxHnLxdNhP0Cu28IOO4aU=; b=H2ONJIz5NzrJTsdUXyoQzylVOFLlDxlzS6jqCMLnlORifzSRyr4v24mqUfSQ+wpedgp3AUQQ3GnxS6Jk/WV4ApRRQptSZ8gYx3tM5TMte1DMgCH8MVWDySSOASwFcF2cSujpc+7nZGvMcfVcOCCIWLd5bf2eVN3B7n/G1Bj+W0k= Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.Z2YRscp_1724666906) by smtp.aliyun-inc.com; Mon, 26 Aug 2024 18:08:27 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH v3 2/7] um: Remove the redundant newpage check in update_pte_range Date: Mon, 26 Aug 2024 18:08:10 +0800 Message-Id: <20240826100815.904430-3-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240826100815.904430-1-tiwei.btw@antgroup.com> References: <20240826100815.904430-1-tiwei.btw@antgroup.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The two checks have been identical since commit ef714f15027c ("um: remove force_flush_all from fork_handler"). And the inner one isn't necessary anymore. Signed-off-by: Tiwei Bie --- arch/um/kernel/tlb.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c index 44c6fc697f3a..548af31d4111 100644 --- a/arch/um/kernel/tlb.c +++ b/arch/um/kernel/tlb.c @@ -82,16 +82,12 @@ static inline int update_pte_range(pmd_t *pmd, unsigned= long addr, (x ? UM_PROT_EXEC : 0)); if (pte_newpage(*pte)) { if (pte_present(*pte)) { - if (pte_newpage(*pte)) { - __u64 offset; - unsigned long phys =3D - pte_val(*pte) & PAGE_MASK; - int fd =3D phys_mapping(phys, &offset); - - ret =3D ops->mmap(ops->mm_idp, addr, - PAGE_SIZE, prot, fd, - offset); - } + __u64 offset; + unsigned long phys =3D pte_val(*pte) & PAGE_MASK; + int fd =3D phys_mapping(phys, &offset); + + ret =3D ops->mmap(ops->mm_idp, addr, PAGE_SIZE, + prot, fd, offset); } else ret =3D ops->unmap(ops->mm_idp, addr, PAGE_SIZE); } else if (pte_newprot(*pte)) --=20 2.34.1 From nobody Fri Dec 19 15:19:51 2025 Received: from out0-202.mail.aliyun.com (out0-202.mail.aliyun.com [140.205.0.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8C9151482F5 for ; Mon, 26 Aug 2024 10:24:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724667848; cv=none; b=Jl+p8hAUCLim92CS4oO88bHvAtXf9V2vg9UY2FV5ZyAR77VeUaIYaOql/hpwOQIe6H0YqfE+nMmgbAqMow+bxXulg0OrtSlzN3HXst3hBDDt1/MaEUmVIa38N6QENEXdw+AZWVDt/iMDgRMkk7K+lxKf0hyXZxMMi2aNHqPFgpU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724667848; c=relaxed/simple; bh=jstzTDlVaFc14MBs6+5CAn8bhr/f8VdzKJOixZsHUjk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Q6zuvVvEv/oModDhnQAmX9K30BTkXQ4bulg/KHhkyNM0hFHIRbJJ0tVtsOMexQjDUusUBrplDryhIcLoyw+RReE4X22V7bGnQ9XgecOq3bosw8ASTOlG15DOKvbr/pVYOkGfbpbykaZsDjpB0r7sM3nm7Xs5U8ULyPX/kU19l5U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b=ZYxlTB4C; arc=none smtp.client-ip=140.205.0.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b="ZYxlTB4C" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1724667842; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=EEFoEIJSD/Xa9nH/fAD+A50RNInexen/VIJS9zUQYhU=; b=ZYxlTB4CXeHOtrAL+zPD9xQ+/BpaY6uUyArMFMOAyKFT98urytS89lXnYkYFlECj485xBTemO/kQcb9YUq7E94oma3QBL7+1nZ6lj7numce+E0q6SYP2qJBol4J08GqrA1yFLJwUZLJL0uWmQn3oqdYLjenA/A/DC+d7/7YHJoc= Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.Z2YRscv_1724666907) by smtp.aliyun-inc.com; Mon, 26 Aug 2024 18:08:27 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH v3 3/7] um: Remove unused fields from thread_struct Date: Mon, 26 Aug 2024 18:08:11 +0800 Message-Id: <20240826100815.904430-4-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240826100815.904430-1-tiwei.btw@antgroup.com> References: <20240826100815.904430-1-tiwei.btw@antgroup.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" These fields are no longer used since the removal of tt mode. Signed-off-by: Tiwei Bie --- arch/um/include/asm/processor-generic.h | 20 +++++--------------- arch/um/kernel/process.c | 8 ++++---- arch/um/kernel/skas/process.c | 4 ++-- 3 files changed, 11 insertions(+), 21 deletions(-) diff --git a/arch/um/include/asm/processor-generic.h b/arch/um/include/asm/= processor-generic.h index 5a7c05275aa7..bce4595798da 100644 --- a/arch/um/include/asm/processor-generic.h +++ b/arch/um/include/asm/processor-generic.h @@ -28,20 +28,10 @@ struct thread_struct { struct arch_thread arch; jmp_buf switch_buf; struct { - int op; - union { - struct { - int pid; - } fork, exec; - struct { - int (*proc)(void *); - void *arg; - } thread; - struct { - void (*proc)(void *); - void *arg; - } cb; - } u; + struct { + int (*proc)(void *); + void *arg; + } thread; } request; }; =20 @@ -51,7 +41,7 @@ struct thread_struct { .fault_addr =3D NULL, \ .prev_sched =3D NULL, \ .arch =3D INIT_ARCH_THREAD, \ - .request =3D { 0 } \ + .request =3D { } \ } =20 /* diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index f36b63f53bab..be2856af6d4c 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c @@ -109,8 +109,8 @@ void new_thread_handler(void) schedule_tail(current->thread.prev_sched); current->thread.prev_sched =3D NULL; =20 - fn =3D current->thread.request.u.thread.proc; - arg =3D current->thread.request.u.thread.arg; + fn =3D current->thread.request.thread.proc; + arg =3D current->thread.request.thread.arg; =20 /* * callback returns only if the kernel thread execs a process @@ -158,8 +158,8 @@ int copy_thread(struct task_struct * p, const struct ke= rnel_clone_args *args) arch_copy_thread(¤t->thread.arch, &p->thread.arch); } else { get_safe_registers(p->thread.regs.regs.gp, p->thread.regs.regs.fp); - p->thread.request.u.thread.proc =3D args->fn; - p->thread.request.u.thread.arg =3D args->fn_arg; + p->thread.request.thread.proc =3D args->fn; + p->thread.request.thread.arg =3D args->fn_arg; handler =3D new_thread_handler; } =20 diff --git a/arch/um/kernel/skas/process.c b/arch/um/kernel/skas/process.c index 5f9c1c5f36e2..68657988c8d1 100644 --- a/arch/um/kernel/skas/process.c +++ b/arch/um/kernel/skas/process.c @@ -39,8 +39,8 @@ int __init start_uml(void) =20 init_new_thread_signals(); =20 - init_task.thread.request.u.thread.proc =3D start_kernel_proc; - init_task.thread.request.u.thread.arg =3D NULL; + init_task.thread.request.thread.proc =3D start_kernel_proc; + init_task.thread.request.thread.arg =3D NULL; return start_idle_thread(task_stack_page(&init_task), &init_task.thread.switch_buf); } --=20 2.34.1 From nobody Fri Dec 19 15:19:51 2025 Received: from out0-200.mail.aliyun.com (out0-200.mail.aliyun.com [140.205.0.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89BB71482E1 for ; Mon, 26 Aug 2024 10:24:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.200 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724667847; cv=none; b=texh0K+6jIyjCEgYTs/EEWHI+a+eUPYwzo6mLnv5Id6+rbk0O01JWEcBnK2QDqEImKoCq3E0QiwN1rWg5embeHgg3F8kP/kKTWc4M5YsGuX1fhONYeMdF9RqzoTqE1mGqlpdZpPrxqbBN97hiFKNJAkbB8K+vT6Od0RpQZHcBU8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724667847; c=relaxed/simple; bh=4FD+5SkE/cCSHAkmiN5Kw23JtgoYUbJVodhVJ7Su8Bo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kydas4ieNpegTz1r9NqnCq70YyF+jt3Y4NP31lkvJzxHs/gFdQ2Furblu7I8aFwLaWD3OAMBsDsphDlMv3LDreW9rpnMImz9bSx+N9c9KnfToLrp+UjN1AysXWX4Ozy9OwRn2Bf3RlkT7V2qrcowcrcThpYUzLLtPRcNfdDQLls= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b=vyVyooBk; arc=none smtp.client-ip=140.205.0.200 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b="vyVyooBk" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1724667842; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=MIeh/tkxVuBeL/Hw9D50Dh+vi6krP1UrWPdznGMpxyA=; b=vyVyooBkXcwXbVwSTObboj6z5Uxh9ee+ID/5NIBL76C2jBNmrrOvgbXT+GkE1HbcV1nC3ehSWZW214HjMTt/TOIT+D2vETY7chNZiK1WCsbzoRn9VM6A9pfvIIGirRFR2GSP7wZhShC+BZFTZx9fKx9JnZ3aiPaRlxr7kkPo/2A= Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.Z2YRscx_1724666907) by smtp.aliyun-inc.com; Mon, 26 Aug 2024 18:08:27 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH v3 4/7] um: Remove unused mm_fd field from mm_id Date: Mon, 26 Aug 2024 18:08:12 +0800 Message-Id: <20240826100815.904430-5-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240826100815.904430-1-tiwei.btw@antgroup.com> References: <20240826100815.904430-1-tiwei.btw@antgroup.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" It's no longer used since the removal of the SKAS3/4 support. Signed-off-by: Tiwei Bie --- arch/um/include/shared/skas/mm_id.h | 5 +---- arch/um/kernel/reboot.c | 2 +- arch/um/kernel/skas/mmu.c | 12 ++++++------ arch/um/kernel/time.c | 2 +- arch/um/os-Linux/skas/mem.c | 2 +- arch/um/os-Linux/skas/process.c | 2 +- 6 files changed, 11 insertions(+), 14 deletions(-) diff --git a/arch/um/include/shared/skas/mm_id.h b/arch/um/include/shared/s= kas/mm_id.h index 1e76ba40feba..140388c282f6 100644 --- a/arch/um/include/shared/skas/mm_id.h +++ b/arch/um/include/shared/skas/mm_id.h @@ -7,10 +7,7 @@ #define __MM_ID_H =20 struct mm_id { - union { - int mm_fd; - int pid; - } u; + int pid; unsigned long stack; int syscall_data_len; }; diff --git a/arch/um/kernel/reboot.c b/arch/um/kernel/reboot.c index 3736bca626ba..680bce4bd8fa 100644 --- a/arch/um/kernel/reboot.c +++ b/arch/um/kernel/reboot.c @@ -29,7 +29,7 @@ static void kill_off_processes(void) t =3D find_lock_task_mm(p); if (!t) continue; - pid =3D t->mm->context.id.u.pid; + pid =3D t->mm->context.id.pid; task_unlock(t); os_kill_ptraced_process(pid, 1); } diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c index 47f98d87ea3c..886ed5e65674 100644 --- a/arch/um/kernel/skas/mmu.c +++ b/arch/um/kernel/skas/mmu.c @@ -32,11 +32,11 @@ int init_new_context(struct task_struct *task, struct m= m_struct *mm) new_id->stack =3D stack; =20 block_signals_trace(); - new_id->u.pid =3D start_userspace(stack); + new_id->pid =3D start_userspace(stack); unblock_signals_trace(); =20 - if (new_id->u.pid < 0) { - ret =3D new_id->u.pid; + if (new_id->pid < 0) { + ret =3D new_id->pid; goto out_free; } =20 @@ -83,12 +83,12 @@ void destroy_context(struct mm_struct *mm) * whole UML suddenly dying. Also, cover negative and * 1 cases, since they shouldn't happen either. */ - if (mmu->id.u.pid < 2) { + if (mmu->id.pid < 2) { printk(KERN_ERR "corrupt mm_context - pid =3D %d\n", - mmu->id.u.pid); + mmu->id.pid); return; } - os_kill_ptraced_process(mmu->id.u.pid, 1); + os_kill_ptraced_process(mmu->id.pid, 1); =20 free_pages(mmu->id.stack, ilog2(STUB_DATA_PAGES)); } diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c index 47b9f5e63566..29b27b90581f 100644 --- a/arch/um/kernel/time.c +++ b/arch/um/kernel/time.c @@ -839,7 +839,7 @@ static irqreturn_t um_timer(int irq, void *dev) if (get_current()->mm !=3D NULL) { /* userspace - relay signal, results in correct userspace timers */ - os_alarm_process(get_current()->mm->context.id.u.pid); + os_alarm_process(get_current()->mm->context.id.pid); } =20 (*timer_clockevent.event_handler)(&timer_clockevent); diff --git a/arch/um/os-Linux/skas/mem.c b/arch/um/os-Linux/skas/mem.c index c55430775efd..9a13ac23c606 100644 --- a/arch/um/os-Linux/skas/mem.c +++ b/arch/um/os-Linux/skas/mem.c @@ -78,7 +78,7 @@ static inline long do_syscall_stub(struct mm_id *mm_idp) { struct stub_data *proc_data =3D (void *)mm_idp->stack; int n, i; - int err, pid =3D mm_idp->u.pid; + int err, pid =3D mm_idp->pid; =20 n =3D ptrace_setregs(pid, syscall_regs); if (n < 0) { diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/proces= s.c index f7088345b3fc..b6f656bcffb1 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c @@ -588,5 +588,5 @@ void reboot_skas(void) =20 void __switch_mm(struct mm_id *mm_idp) { - userspace_pid[0] =3D mm_idp->u.pid; + userspace_pid[0] =3D mm_idp->pid; } --=20 2.34.1 From nobody Fri Dec 19 15:19:51 2025 Received: from out0-206.mail.aliyun.com (out0-206.mail.aliyun.com [140.205.0.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A38B146A69 for ; Mon, 26 Aug 2024 10:13:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.206 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724667232; cv=none; b=aO7vYcR2aUNsSWElM/TCALwirKpQiPDuyuWcu7YLJzepFQ2ECkRHHN7DgoZEd6YDe8/jAQ/gie5/ozudxOahCVycZW8E4oVZUXhXSdCHPmJzv/IFAnvQKA4wjK4t0/5SKVk4spnlTEWJQdaMwv0c2JkxDtZ2soLN+UEWjMzqZAs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724667232; c=relaxed/simple; bh=HrzESFheTWJ6BsXZcFRmb4C2rKB54nkinw4WDavn4p4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FZKYBUF/LY4BrsByW0QMNLQwv6o0/FZPEliLepsEbmbi6RP2dtM6h9l1XMxm8WrM28YhQOy8VGrU5BCTJ2SPc/ng6NZ6fEXBchbfb+Gu4JTcS2mcraVTBw+2IY/LRaO7e2b4yvqxqXHQ1X2veEEtTqYjiPgarn+cusX1jdLRf5Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b=RElUahJY; arc=none smtp.client-ip=140.205.0.206 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b="RElUahJY" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1724667226; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=UE3KVmrhR4CaBxvq16dvb3ocgiXdhekFGviHku9aBeM=; b=RElUahJYR+7j+rzQ7SiONuMIFBcSFFQBDO9VuIVO298f+UuJ62eGgzlpXFgSayfuujg6DBacLHBpCKFoGHl+XMHJFSudcqnAK6hu+Ib4zBgj91m78LrvSNgvXRG0/7Zp/TzdE1wDoo75Ee6kv1XLR39bDPGEJP7vGCSO8Hqcjfw= Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.Z2YRsd5_1724666907) by smtp.aliyun-inc.com; Mon, 26 Aug 2024 18:08:28 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH v3 5/7] um: Remove the call to SUBARCH_EXECVE1 macro Date: Mon, 26 Aug 2024 18:08:13 +0800 Message-Id: <20240826100815.904430-6-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240826100815.904430-1-tiwei.btw@antgroup.com> References: <20240826100815.904430-1-tiwei.btw@antgroup.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This macro has never been defined by any supported sub-architectures in tree since it was introduced by commit 1d3468a6643a ("[PATCH uml: move _kern.c files"). Signed-off-by: Tiwei Bie --- arch/um/kernel/exec.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c index 2c15bb2c104c..cb8b5cd9285c 100644 --- a/arch/um/kernel/exec.c +++ b/arch/um/kernel/exec.c @@ -35,8 +35,5 @@ void start_thread(struct pt_regs *regs, unsigned long eip= , unsigned long esp) PT_REGS_IP(regs) =3D eip; PT_REGS_SP(regs) =3D esp; clear_thread_flag(TIF_SINGLESTEP); -#ifdef SUBARCH_EXECVE1 - SUBARCH_EXECVE1(regs->regs); -#endif } EXPORT_SYMBOL(start_thread); --=20 2.34.1 From nobody Fri Dec 19 15:19:51 2025 Received: from out0-193.mail.aliyun.com (out0-193.mail.aliyun.com [140.205.0.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6E67146A6B for ; Mon, 26 Aug 2024 10:13:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.193 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724667231; cv=none; b=PiRpC+RmYRb2dDKoG3nZFPUVkTwWgIxXcM1aZ1qXcq+iDV0ojyTkl9A+njUipy0zlD+eWlDN+mxixo6/aXiq8aJjMg6dQQ9S9zSgs8B+gejGpRbrq1lbS5JQ+O2in6hR0LEWjw07BBPX6H4lcg6xOGDzpk5KF1B1w7FWgxTVd4Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724667231; c=relaxed/simple; bh=PskH/Lp/rlV2dM17RByJrskCyl8CXN9BKwE+wbwjuyM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=d1TPBJY5ThgrqV8NsYHz3xtjmB4rYZNOxLi8mpy7nMl5mXX2r2YD6DkiXVGxJTxG9q08X2hYcsyZxQk9qESgY02unoQTED4R7Tb0aQRd0kBI3k+pdXOe73UtViDrzHnVjQbNs+Lsfgks1ihhyMrMFhP8iSGQQkapjB/O+q3AG4w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b=OABeoI2l; arc=none smtp.client-ip=140.205.0.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b="OABeoI2l" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1724667226; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=ETHDtkvAR5yLwocf1NNAJDJIgmGgz2GYbC6AhVsHb1U=; b=OABeoI2lv4UEiP/G1Ii4d14APcmoXoMRJW8Cm2yIJBPi9GDShNoOQIxZd5oHAXx6WDBAyD2Whteq3TxdnsrKNSyJ9NwNCuuQhyXHHYz1tVnYhb9Z+TyxYoE0vblNm2F1yw9SAqT1SjlMY4Js4mOT/hhlSc5wtamWVNQKWWFqlSo= Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.Z2YRsdE_1724666908) by smtp.aliyun-inc.com; Mon, 26 Aug 2024 18:08:28 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH v3 6/7] um: Remove the declaration of user_thread function Date: Mon, 26 Aug 2024 18:08:14 +0800 Message-Id: <20240826100815.904430-7-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240826100815.904430-1-tiwei.btw@antgroup.com> References: <20240826100815.904430-1-tiwei.btw@antgroup.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This function has never been defined since its declaration was introduced by commit 1da177e4c3f4 ("Linux-2.6.12-rc2"). Signed-off-by: Tiwei Bie --- arch/um/include/shared/skas/skas.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/um/include/shared/skas/skas.h b/arch/um/include/shared/sk= as/skas.h index ebaa116de30b..95f5d5d6389a 100644 --- a/arch/um/include/shared/skas/skas.h +++ b/arch/um/include/shared/skas/skas.h @@ -10,7 +10,6 @@ =20 extern int userspace_pid[]; =20 -extern int user_thread(unsigned long stack, int flags); extern void new_thread_handler(void); extern void handle_syscall(struct uml_pt_regs *regs); extern long execute_syscall_skas(void *r); --=20 2.34.1 From nobody Fri Dec 19 15:19:51 2025 Received: from out0-218.mail.aliyun.com (out0-218.mail.aliyun.com [140.205.0.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5181B1494BF for ; Mon, 26 Aug 2024 10:13:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.218 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724667235; cv=none; b=So460wVFlzDsWyZNCs10LtlV6dwsa6qYB17j688+szKbCQ6EwGdJ5oHAU9J1XONKE5VS3Azq6hlU3HYyv+sjx/nl91UivkSKmkfnomQ6hSiOD5V6y3unRBCag119JoSZjQOnKypPQyFtvP2DyiGEJQzdjzcPtF7pkd+9jZIqLjU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724667235; c=relaxed/simple; bh=C4x7iKn1TrrmJ72tbs7DBcaMP9bMwwOCRS+8Ucg7zv8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RmvD7hcf7sXUOrrw6340gdBDI1CRwFFfgqKpfOe2PX+QYt6A/BobO9FKMHOTgI17RSZYeuLq+atvLxB3Wc6ce9Of6pFyaCvWB7isQ1TMgioKD0dY8M+qPiU4hpogm9U3dELsQIMGhg3HiCxRLDzElU2S0f959CLmhf49V/1WY3U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b=jhAklNXX; arc=none smtp.client-ip=140.205.0.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b="jhAklNXX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1724667225; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=9bUZVJugjOokUMlJ2o17PYTbMBQk6FoNOY0ajvacRoI=; b=jhAklNXXsq5epldnba1IILpoLv30JG8TmUqma1tTzRwtGgnzIdpseiIbMmkQkmBruhoYZk/Wng4n1UGNj3MZzjCR643zCssJF6TwMKQYpUeI8o3Wee42FcijRGN3V6728Xe6n4zNYGuDfekSbT5DetRtyo+0/nzoDmVeYTS5xZg= Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.Z2YRsdP_1724666908) by smtp.aliyun-inc.com; Mon, 26 Aug 2024 18:08:28 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH v3 7/7] um: Remove outdated asm/sysrq.h header Date: Mon, 26 Aug 2024 18:08:15 +0800 Message-Id: <20240826100815.904430-8-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240826100815.904430-1-tiwei.btw@antgroup.com> References: <20240826100815.904430-1-tiwei.btw@antgroup.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This header no longer serves a purpose after show_trace was removed by commit 9d1ee8ce92e1 ("um: Rewrite show_stack()"). Signed-off-by: Tiwei Bie --- arch/um/include/asm/sysrq.h | 8 -------- arch/um/kernel/sysrq.c | 1 - arch/x86/um/sysrq_32.c | 1 - arch/x86/um/sysrq_64.c | 1 - 4 files changed, 11 deletions(-) delete mode 100644 arch/um/include/asm/sysrq.h diff --git a/arch/um/include/asm/sysrq.h b/arch/um/include/asm/sysrq.h deleted file mode 100644 index 8fc8c65cd357..000000000000 --- a/arch/um/include/asm/sysrq.h +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef __UM_SYSRQ_H -#define __UM_SYSRQ_H - -struct task_struct; -extern void show_trace(struct task_struct* task, unsigned long *stack); - -#endif diff --git a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c index 746715379f12..4bb8622dc512 100644 --- a/arch/um/kernel/sysrq.c +++ b/arch/um/kernel/sysrq.c @@ -11,7 +11,6 @@ #include #include =20 -#include #include #include =20 diff --git a/arch/x86/um/sysrq_32.c b/arch/x86/um/sysrq_32.c index f2383484840d..a1ee415c008d 100644 --- a/arch/x86/um/sysrq_32.c +++ b/arch/x86/um/sysrq_32.c @@ -9,7 +9,6 @@ #include #include #include -#include =20 /* This is declared by */ void show_regs(struct pt_regs *regs) diff --git a/arch/x86/um/sysrq_64.c b/arch/x86/um/sysrq_64.c index 0bf6de40abff..340d8a243c8a 100644 --- a/arch/x86/um/sysrq_64.c +++ b/arch/x86/um/sysrq_64.c @@ -12,7 +12,6 @@ #include #include #include -#include =20 void show_regs(struct pt_regs *regs) { --=20 2.34.1