From nobody Sun May 19 03:02:43 2024 Received: from out0-212.mail.aliyun.com (out0-212.mail.aliyun.com [140.205.0.212]) (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 E760F86AE6 for ; Tue, 23 Apr 2024 12:59:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.212 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713877152; cv=none; b=qyz42/Zty+SMsQJ/w/2aSZAU72o8Wsok8SB1ymS2xhjTNI4lazfHuJJYZJNtlPGzx6j731q9kyDFBV8jIwQ4EqqWAlVuArI4FI0CfNAmsRMvWQH7gRPTO1N8HdnVeL4dosUUaiRUdrpGYMSrSl8k0oKYHbwcN+JgEERPS/smYNg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713877152; c=relaxed/simple; bh=Ghj0/V/dH76APPyaKDAlG7P8Sbut9JOjTVMQKESCzlc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=q90rEB9DafAFS2XDK7hHQ77lL8XYJ+wQppW/zTGtgnBDBiNWMq/BWk+vtE5x4E2Kr4o1dm6bu26Ek4xGiDqAvrH0v8XoOyce0Io40wb9klvifkWjMyFXRUg2qA8g6+1pBPy1E+bN+gSiwcl3J1FvyB0db3iU1Ltc0wVzSxW2yyQ= 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=BIeHsS2U; arc=none smtp.client-ip=140.205.0.212 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="BIeHsS2U" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1713877147; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type; bh=35K+byay5rbsmnKXw4pAmKxWNtRGPhfuJu7mpbXe+7w=; b=BIeHsS2Uzj/6qCjaRZAhRQT3+R66E/p1pDrrEDbWGyfim4p7fklOptIT9Ghh4xgnahizd1S+rfM2ji2B+vcq3bef3/Uu29hnU+frNMvOxHE+Mac4Zh/ho1PQaaZg9iCOk3f9jBoCouEbSCJYgamfxVF11CZtGGRzGfOR1BHYcDI= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047208;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---.XJXNjSF_1713877146; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.XJXNjSF_1713877146) by smtp.aliyun-inc.com; Tue, 23 Apr 2024 20:59:07 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH v2 1/7] um: Fix -Wmissing-prototypes warnings for (rt_)sigreturn Date: Tue, 23 Apr 2024 20:58:52 +0800 Message-Id: <20240423125858.137709-2-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240423125858.137709-1-tiwei.btw@antgroup.com> References: <20240423125858.137709-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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Use SYSCALL_DEFINE0 to define (rt_)sigreturn. This will address below -Wmissing-prototypes warnings: arch/x86/um/signal.c:453:6: warning: no previous prototype for =E2=80=98sys= _sigreturn=E2=80=99 [-Wmissing-prototypes] arch/x86/um/signal.c:560:6: warning: no previous prototype for =E2=80=98sys= _rt_sigreturn=E2=80=99 [-Wmissing-prototypes] Signed-off-by: Tiwei Bie --- arch/x86/um/signal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/um/signal.c b/arch/x86/um/signal.c index 263e1d08f216..48e87b45adba 100644 --- a/arch/x86/um/signal.c +++ b/arch/x86/um/signal.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -450,7 +451,7 @@ int setup_signal_stack_si(unsigned long stack_top, stru= ct ksignal *ksig, return 0; } =20 -long sys_sigreturn(void) +SYSCALL_DEFINE0(sigreturn) { unsigned long sp =3D PT_REGS_SP(¤t->thread.regs); struct sigframe __user *frame =3D (struct sigframe __user *)(sp - 8); @@ -557,7 +558,7 @@ int setup_signal_stack_si(unsigned long stack_top, stru= ct ksignal *ksig, } #endif =20 -long sys_rt_sigreturn(void) +SYSCALL_DEFINE0(rt_sigreturn) { unsigned long sp =3D PT_REGS_SP(¤t->thread.regs); struct rt_sigframe __user *frame =3D --=20 2.34.1 From nobody Sun May 19 03:02:43 2024 Received: from out187-1.us.a.mail.aliyun.com (out187-1.us.a.mail.aliyun.com [47.90.187.1]) (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 C327A1350E3 for ; Tue, 23 Apr 2024 12:59:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=47.90.187.1 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713877162; cv=none; b=HwWMhKX13C8KMgV9F4hT/EFKbdVcUZtPDrsVO5fA0ovFpqgUOBJF7Iu3kFrNEHJ1Z9zRrnTiGSZXMem8IgSbRYClI/G+AzL3CL9ItRFYVD4VwCeUxt/8mGCRkXiZj4dplamAmUFosj4P9oyTUDLw6fPxI2kB3eKJVt36OIFbyiM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713877162; c=relaxed/simple; bh=whQ8McWaS9QADvZubdAMdl1LIVZsTQVAL0FukzyoZwg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UbFAqcKKRsRULF03vrO9qr/VeHuJ1m4bFAEIuaEvz4HqfbMbTaUqbSUOyP9NaodQxX0zMqbeu4k++9/RSnD72OOjJyOVC3VnpYHkq+RIcWpO+2MPMluJqEzXrKbL2RIu7CTZ4izoxeaKdpu2bYKudCk2713W9hC1f97xELaBaZU= 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=M0Y2biDI; arc=none smtp.client-ip=47.90.187.1 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="M0Y2biDI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1713877148; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=JMolFlkCz8q8s1KumAu1v9zZDtOAnzDuDDhti01QMmI=; b=M0Y2biDILt4icf5DtECdUNt0S9ORTZUiW9oEV4tGi703v87SzGWDJii7lgngLHU7UBznU8qXb3Zf3ZPwikHF58GbYbN3xk8Tkb9Npw+Z7thgC6xyApxfotbW+fL+o5KokwSLw8BIimX+zKQFDjWMMhb7LnYqauKhvoonvMfGVws= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047187;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---.XJXNjSO_1713877147; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.XJXNjSO_1713877147) by smtp.aliyun-inc.com; Tue, 23 Apr 2024 20:59:07 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH v2 2/7] um: Fix the -Wmissing-prototypes warning for __switch_mm Date: Tue, 23 Apr 2024 20:58:53 +0800 Message-Id: <20240423125858.137709-3-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240423125858.137709-1-tiwei.btw@antgroup.com> References: <20240423125858.137709-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 __switch_mm function is defined in the user code, and is called by the kernel code. It should be declared in a shared header. Fixes: 4dc706c2f292 ("um: take um_mmu.h to asm/mmu.h, clean asm/mmu_context= .h a bit") Signed-off-by: Tiwei Bie --- arch/um/include/asm/mmu.h | 2 -- arch/um/include/shared/skas/mm_id.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/um/include/asm/mmu.h b/arch/um/include/asm/mmu.h index a7555e43ed14..f2923c767bb9 100644 --- a/arch/um/include/asm/mmu.h +++ b/arch/um/include/asm/mmu.h @@ -14,8 +14,6 @@ typedef struct mm_context { struct uml_arch_mm_context arch; } mm_context_t; =20 -extern void __switch_mm(struct mm_id * mm_idp); - /* Avoid tangled inclusion with asm/ldt.h */ extern long init_new_ldt(struct mm_context *to_mm, struct mm_context *from= _mm); extern void free_ldt(struct mm_context *mm); diff --git a/arch/um/include/shared/skas/mm_id.h b/arch/um/include/shared/s= kas/mm_id.h index e82e203f5f41..92dbf727e384 100644 --- a/arch/um/include/shared/skas/mm_id.h +++ b/arch/um/include/shared/skas/mm_id.h @@ -15,4 +15,6 @@ struct mm_id { int kill; }; =20 +void __switch_mm(struct mm_id *mm_idp); + #endif --=20 2.34.1 From nobody Sun May 19 03:02:43 2024 Received: from out0-197.mail.aliyun.com (out0-197.mail.aliyun.com [140.205.0.197]) (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 A5F3A126F10 for ; Tue, 23 Apr 2024 12:59:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713877153; cv=none; b=ovis45ZmwptW1EE6QGrT6VTkYiWLnXZhFhVXsTZlNIGj0FDZ9bTUoafEg3jrvM0Eb8d7HQK+GuZdbLODg4aOsMcVacwmyV9OXCP9WZkebIf2I2SAYAKl4IRg3121xUzT2iBKCPjikK8lSIn1mSIieuly3VO/jbz/vCN30MFxgSU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713877153; c=relaxed/simple; bh=cxe3FA+juKRwuhcRoo2BgZ+cSuJhZPREFLKbwZ0iAbc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=sA7r/tXytsoY5eQAihL30IpGcb2Cxmpwy4PCuKEUzW40iYmoZ3Op3laU1E802s9av/ZIjd+x1N3a86Ig6ZubVPMhzHnWjPL+SUkEW0IlLuXYZfMgob5KiDhtSgzmBaYnKEBQGi6vwziTFEXsxb172yoDgk8tfO+qTyTIQprMdng= 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=2LHNAiGx; arc=none smtp.client-ip=140.205.0.197 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="2LHNAiGx" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1713877148; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=ztht0K4jTp/9L7ckF5yEd/2TUV3jSzUX1GNvcqyFTsA=; b=2LHNAiGxxXWVyrfk1Z3pfDvNMuuasRGBT+aBh8LC0qgnODd99QFY+ZR3EYoH353MzQB84J/bE7vtlg5NgosZniY+r1UnoXv6PftQDG86OU8AMAYieiC8Ah7i4DHxJ8/ETXEMTNYI80bsTs8VJ6QS8RikOIb00o9+SVU/Tew9E4U= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047194;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---.XJXNjST_1713877147; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.XJXNjST_1713877147) by smtp.aliyun-inc.com; Tue, 23 Apr 2024 20:59:07 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH v2 3/7] um: Fix the -Wmissing-prototypes warning for get_thread_reg Date: Tue, 23 Apr 2024 20:58:54 +0800 Message-Id: <20240423125858.137709-4-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240423125858.137709-1-tiwei.btw@antgroup.com> References: <20240423125858.137709-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 get_thread_reg function is defined in the user code, and is called by the kernel code. It should be declared in a shared header. Fixes: dbba7f704aa0 ("um: stop polluting the namespace with registers.h con= tents") Signed-off-by: Tiwei Bie --- arch/um/include/asm/processor-generic.h | 1 - arch/x86/um/shared/sysdep/archsetjmp.h | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/um/include/asm/processor-generic.h b/arch/um/include/asm/= processor-generic.h index 6c3779541845..5a7c05275aa7 100644 --- a/arch/um/include/asm/processor-generic.h +++ b/arch/um/include/asm/processor-generic.h @@ -94,7 +94,6 @@ extern struct cpuinfo_um boot_cpu_data; #define current_cpu_data boot_cpu_data #define cache_line_size() (boot_cpu_data.cache_alignment) =20 -extern unsigned long get_thread_reg(int reg, jmp_buf *buf); #define KSTK_REG(tsk, reg) get_thread_reg(reg, &tsk->thread.switch_buf) extern unsigned long __get_wchan(struct task_struct *p); =20 diff --git a/arch/x86/um/shared/sysdep/archsetjmp.h b/arch/x86/um/shared/sy= sdep/archsetjmp.h index 166cedbab926..8c81d1a604a9 100644 --- a/arch/x86/um/shared/sysdep/archsetjmp.h +++ b/arch/x86/um/shared/sysdep/archsetjmp.h @@ -1,6 +1,13 @@ /* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __X86_UM_SYSDEP_ARCHSETJMP_H +#define __X86_UM_SYSDEP_ARCHSETJMP_H + #ifdef __i386__ #include "archsetjmp_32.h" #else #include "archsetjmp_64.h" #endif + +unsigned long get_thread_reg(int reg, jmp_buf *buf); + +#endif /* __X86_UM_SYSDEP_ARCHSETJMP_H */ --=20 2.34.1 From nobody Sun May 19 03:02:43 2024 Received: from out0-198.mail.aliyun.com (out0-198.mail.aliyun.com [140.205.0.198]) (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 A198B7E79F for ; Tue, 23 Apr 2024 12:59:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.198 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713877152; cv=none; b=RDMqvfIIQigfACLN9Iq/dHRUkmV6D056T9gnt9WCyAeJIX1gD0oCg4XIIpr9SLmnY1bnV9CdhQX8Bs5dgl97ykmzKL55/SCRM0i1xggH0kvYXqHQfsvb7YRpQ4+3hYedf8REp44D9Kc8VZKxFFJufH0K8121OOYcq5JoEsqojtE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713877152; c=relaxed/simple; bh=RZQ4OaKt5l6WjLn4N/d2lAFpl8VZsWoGuYt7dpHlpMQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Q6hNz6i3T1O9RKsLJwPliSUcqS/fzvsEwlaMuM7wtJbEb9sgfLDT/BtixP19VIj3ly8SsAYcrWjopLWlzByIkq5gJ++qRR18vXyW4r5qLxf6F7UErpHUILYoDdxiDluudjIqhilxYrsIlgpxsJUOeg1EZ5gKqEkm3zZDw7swX2A= 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=WnMVVh/D; arc=none smtp.client-ip=140.205.0.198 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="WnMVVh/D" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1713877148; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=+BtmDxLOgobbye+TMx6cN7HTHoKqXF713ZEoIat3sOs=; b=WnMVVh/DCvBEEJ4HNYmNDtyzn7OxvAVJnkQF+U7kl2EEMnNDX+ulJZN5OBmIuBzq0O4J5LyA/GdaUCDVg4GYdGBEyprKQTcHbBT9pVb3GTNl3LaYDkZ44U9gDtYE4Y4eVeL+B8QFA3TQrJL2JPmrYMWpy/ialH7RdNkcuItWYH0= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R761e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047206;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---.XJXNjSc_1713877147; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.XJXNjSc_1713877147) by smtp.aliyun-inc.com; Tue, 23 Apr 2024 20:59:07 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH v2 4/7] um: Fix the declaration of kasan_map_memory Date: Tue, 23 Apr 2024 20:58:55 +0800 Message-Id: <20240423125858.137709-5-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240423125858.137709-1-tiwei.btw@antgroup.com> References: <20240423125858.137709-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" Make it match its definition (size_t vs unsigned long). And declare it in a shared header to fix the -Wmissing-prototypes warning, as it is defined in the user code and called in the kernel code. Fixes: 5b301409e8bc ("UML: add support for KASAN under x86_64") Signed-off-by: Tiwei Bie --- arch/um/include/asm/kasan.h | 1 - arch/um/include/shared/kern_util.h | 2 ++ arch/um/os-Linux/mem.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/um/include/asm/kasan.h b/arch/um/include/asm/kasan.h index 0d6547f4ec85..f97bb1f7b851 100644 --- a/arch/um/include/asm/kasan.h +++ b/arch/um/include/asm/kasan.h @@ -24,7 +24,6 @@ =20 #ifdef CONFIG_KASAN void kasan_init(void); -void kasan_map_memory(void *start, unsigned long len); extern int kasan_um_is_ready; =20 #ifdef CONFIG_STATIC_LINK diff --git a/arch/um/include/shared/kern_util.h b/arch/um/include/shared/ke= rn_util.h index 81bc38a2e3fc..95521b1f5b20 100644 --- a/arch/um/include/shared/kern_util.h +++ b/arch/um/include/shared/kern_util.h @@ -67,4 +67,6 @@ extern void fatal_sigsegv(void) __attribute__ ((noreturn)= ); =20 void um_idle_sleep(void); =20 +void kasan_map_memory(void *start, size_t len); + #endif diff --git a/arch/um/os-Linux/mem.c b/arch/um/os-Linux/mem.c index 8530b2e08604..c6c9495b1432 100644 --- a/arch/um/os-Linux/mem.c +++ b/arch/um/os-Linux/mem.c @@ -15,6 +15,7 @@ #include #include #include +#include #include =20 /* --=20 2.34.1 From nobody Sun May 19 03:02:43 2024 Received: from out187-13.us.a.mail.aliyun.com (out187-13.us.a.mail.aliyun.com [47.90.187.13]) (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 2FC12126F3F for ; Tue, 23 Apr 2024 12:59:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=47.90.187.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713877162; cv=none; b=FOfylsEN89PETk46k4COJJwTiJhPSL7jW4jannx/PUQ7abzfOz5mECCqUy1HqohmT2nTLhmlSYhTmus0Fm1vo8XrzmV3OzAXRweIqhC7f/W2B/klUrQ6kTVj3ACGGqCBNfJKrrfFdWfEGXs+7WQnUrwoG5mIAHVKl3625SDLSQU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713877162; c=relaxed/simple; bh=LZFuJ/4FGskBf4AnZH1TT3ZTMxB4uZoW+o1jgSpMUno=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=rmrlQFUV9IB2vbQup20kLTTGMsBySLexQ9TjG438gslCY3W65BmqLh6z0KbzUiopEXHZf6Oc5jdEwWbfwVdF1uf9rJiAw6jocGwoCZP6HOFXl3VdADYqOoShwnv1LlLpzFJ5szDy5MiZEbQrbm7m58pnFBFUed16+fLPGCSNWWA= 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=YpVOKfdw; arc=none smtp.client-ip=47.90.187.13 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="YpVOKfdw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1713877148; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type; bh=u2nOPuUACaHxjsvTBbK286kNs1kGaeWUIM12LDvgezc=; b=YpVOKfdwHeePK5h+m/sgie0Xl2qQKelgw4ORTT/J8PxOw/yIJ3wlq/8hQgyrjunBTX/qo1WAl0+ylSFIiDMfKtQOY1Z6njv2aJa9lzOjwxJrvEdtXuOCpwWs6+8wSNlJuDHFaLDtVDr5KSfD3+6U61yIYudnIKs7mhNZOVcszXw= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047204;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---.XJXNjSj_1713877148; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.XJXNjSj_1713877148) by smtp.aliyun-inc.com; Tue, 23 Apr 2024 20:59:08 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH v2 5/7] um: Add an internal header shared among the user code Date: Tue, 23 Apr 2024 20:58:56 +0800 Message-Id: <20240423125858.137709-6-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240423125858.137709-1-tiwei.btw@antgroup.com> References: <20240423125858.137709-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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Move relevant declarations to this header. This will address below -Wmissing-prototypes warnings: arch/um/os-Linux/elf_aux.c:26:13: warning: no previous prototype for =E2=80= =98scan_elf_aux=E2=80=99 [-Wmissing-prototypes] arch/um/os-Linux/mem.c:213:13: warning: no previous prototype for =E2=80=98= check_tmpexec=E2=80=99 [-Wmissing-prototypes] arch/um/os-Linux/skas/process.c:107:6: warning: no previous prototype for = =E2=80=98wait_stub_done=E2=80=99 [-Wmissing-prototypes] Signed-off-by: Tiwei Bie --- arch/um/os-Linux/elf_aux.c | 1 + arch/um/os-Linux/internal.h | 20 ++++++++++++++++++++ arch/um/os-Linux/main.c | 3 +-- arch/um/os-Linux/mem.c | 1 + arch/um/os-Linux/skas/mem.c | 3 +-- arch/um/os-Linux/skas/process.c | 1 + arch/um/os-Linux/start_up.c | 3 +-- 7 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 arch/um/os-Linux/internal.h diff --git a/arch/um/os-Linux/elf_aux.c b/arch/um/os-Linux/elf_aux.c index 344ac403fb5d..0a0f91cf4d6d 100644 --- a/arch/um/os-Linux/elf_aux.c +++ b/arch/um/os-Linux/elf_aux.c @@ -13,6 +13,7 @@ #include #include #include +#include "internal.h" =20 typedef Elf32_auxv_t elf_auxv_t; =20 diff --git a/arch/um/os-Linux/internal.h b/arch/um/os-Linux/internal.h new file mode 100644 index 000000000000..317fca190c2b --- /dev/null +++ b/arch/um/os-Linux/internal.h @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __UM_OS_LINUX_INTERNAL_H +#define __UM_OS_LINUX_INTERNAL_H + +/* + * elf_aux.c + */ +void scan_elf_aux(char **envp); + +/* + * mem.c + */ +void check_tmpexec(void); + +/* + * skas/process.c + */ +void wait_stub_done(int pid); + +#endif /* __UM_OS_LINUX_INTERNAL_H */ diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c index e82164f90288..f98ff79cdbf7 100644 --- a/arch/um/os-Linux/main.c +++ b/arch/um/os-Linux/main.c @@ -16,6 +16,7 @@ #include #include #include +#include "internal.h" =20 #define PGD_BOUND (4 * 1024 * 1024) #define STACKSIZE (8 * 1024 * 1024) @@ -102,8 +103,6 @@ static void setup_env_path(void) } } =20 -extern void scan_elf_aux( char **envp); - int __init main(int argc, char **argv, char **envp) { char **new_argv; diff --git a/arch/um/os-Linux/mem.c b/arch/um/os-Linux/mem.c index c6c9495b1432..cf44d386f23c 100644 --- a/arch/um/os-Linux/mem.c +++ b/arch/um/os-Linux/mem.c @@ -17,6 +17,7 @@ #include #include #include +#include "internal.h" =20 /* * kasan_map_memory - maps memory from @start with a size of @len. diff --git a/arch/um/os-Linux/skas/mem.c b/arch/um/os-Linux/skas/mem.c index 953fb10f3f93..1f9c1bffc3a6 100644 --- a/arch/um/os-Linux/skas/mem.c +++ b/arch/um/os-Linux/skas/mem.c @@ -17,11 +17,10 @@ #include #include #include +#include "../internal.h" =20 extern char batch_syscall_stub[], __syscall_stub_start[]; =20 -extern void wait_stub_done(int pid); - static inline unsigned long *check_init_stack(struct mm_id * mm_idp, unsigned long *stack) { diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/proces= s.c index 1f5c3f2523d1..41a288dcfc34 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c @@ -23,6 +23,7 @@ #include #include #include +#include "../internal.h" =20 int is_skas_winch(int pid, int fd, void *data) { diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c index 6b21061c431c..89ad9f4f865c 100644 --- a/arch/um/os-Linux/start_up.c +++ b/arch/um/os-Linux/start_up.c @@ -25,6 +25,7 @@ #include #include #include +#include "internal.h" =20 static void ptrace_child(void) { @@ -222,8 +223,6 @@ static void __init check_ptrace(void) check_sysemu(); } =20 -extern void check_tmpexec(void); - static void __init check_coredump_limit(void) { struct rlimit lim; --=20 2.34.1 From nobody Sun May 19 03:02:43 2024 Received: from out187-23.us.a.mail.aliyun.com (out187-23.us.a.mail.aliyun.com [47.90.187.23]) (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 F16E17E79F for ; Tue, 23 Apr 2024 12:59:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=47.90.187.23 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713877162; cv=none; b=XErA5lPnMxDrZy7WIItBykhVzusYJhfzuVFwoN6YVdEYGqAU4e8uy+9NkF7aj5wlJs05yHN4hm1W52D6vG/QBmmiGMMCVRXfUvS6IzONJA1EnmYvZjoan7tqyWD1I9mVMxBP9lHM6MKOuMYuyy+9YvhSn7eIA+ksT7bP3XxjJY4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713877162; c=relaxed/simple; bh=UDetQ6kFYZh1xF4gwhKPP99yJfT7j4V08AzTDBUEsLI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=SIDQehtUtIMw9vsofvFu+mjDdQT8waD4kxbye3nz/cSxIsbgc86dcyInznZI88nQaNXehwazcDI4bQbe1ETH1Z9KNMLvbcFLcQKC8U1eIQPeFfdjyO55f8Qql9+eSUwwu+ijWooeG7JZGq1g16t3/JhVeVYeyDb3uI3gHvmYq7c= 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=dPELqWtu; arc=none smtp.client-ip=47.90.187.23 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="dPELqWtu" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1713877149; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type; bh=64KorjYk0sx2nDSk7hiRZHzNhfBx4ybSJcgKjrQvbD8=; b=dPELqWtu14oRDkOPT9X4rhEiML4w0rhbYprGiqnXzLk6RPtjpoPGbXLzSEOkqD16KpSOvy1pwKtaJLS9KgWTUm2Tm4Z+2H01T/rhaUgxJO8PABd81bzMoG43zg0LZYSC32pCHueWGu1Wkxj4Iq4Fh2ZlaREDVLwDV/uKWttt/Kg= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047209;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---.XJXNjSx_1713877148; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.XJXNjSx_1713877148) by smtp.aliyun-inc.com; Tue, 23 Apr 2024 20:59:08 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH v2 6/7] um: Fix -Wmissing-prototypes warnings for __vdso_* Date: Tue, 23 Apr 2024 20:58:57 +0800 Message-Id: <20240423125858.137709-7-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240423125858.137709-1-tiwei.btw@antgroup.com> References: <20240423125858.137709-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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The VDSO functions are defined as globals and intended to be called from userspace. Let's just workaround the -Wmissing-prototypes warnings by declaring them locally. This will address below -Wmissing-prototypes warnings: arch/x86/um/vdso/um_vdso.c:16:5: warning: no previous prototype for =E2=80= =98__vdso_clock_gettime=E2=80=99 [-Wmissing-prototypes] arch/x86/um/vdso/um_vdso.c:30:5: warning: no previous prototype for =E2=80= =98__vdso_gettimeofday=E2=80=99 [-Wmissing-prototypes] arch/x86/um/vdso/um_vdso.c:44:21: warning: no previous prototype for =E2=80= =98__vdso_time=E2=80=99 [-Wmissing-prototypes] arch/x86/um/vdso/um_vdso.c:57:1: warning: no previous prototype for =E2=80= =98__vdso_getcpu=E2=80=99 [-Wmissing-prototypes] While at it, also fix the "WARNING: Prefer 'unsigned int *' to bare use of 'unsigned *'" checkpatch warning. Signed-off-by: Tiwei Bie --- arch/x86/um/vdso/um_vdso.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/x86/um/vdso/um_vdso.c b/arch/x86/um/vdso/um_vdso.c index ff0f3b4b6c45..cbae2584124f 100644 --- a/arch/x86/um/vdso/um_vdso.c +++ b/arch/x86/um/vdso/um_vdso.c @@ -13,6 +13,12 @@ #include #include =20 +/* workaround for -Wmissing-prototypes warnings */ +int __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts= ); +int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *= tz); +__kernel_old_time_t __vdso_time(__kernel_old_time_t *t); +long __vdso_getcpu(unsigned int *cpu, unsigned int *node, struct getcpu_ca= che *unused); + int __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts) { long ret; @@ -54,7 +60,7 @@ __kernel_old_time_t __vdso_time(__kernel_old_time_t *t) __kernel_old_time_t time(__kernel_old_time_t *t) __attribute__((weak, alia= s("__vdso_time"))); =20 long -__vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused) +__vdso_getcpu(unsigned int *cpu, unsigned int *node, struct getcpu_cache *= unused) { /* * UML does not support SMP, we can cheat here. :) @@ -68,5 +74,5 @@ __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcp= u_cache *unused) return 0; } =20 -long getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache) +long getcpu(unsigned int *cpu, unsigned int *node, struct getcpu_cache *tc= ache) __attribute__((weak, alias("__vdso_getcpu"))); --=20 2.34.1 From nobody Sun May 19 03:02:43 2024 Received: from out187-16.us.a.mail.aliyun.com (out187-16.us.a.mail.aliyun.com [47.90.187.16]) (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 B84C31350F2 for ; Tue, 23 Apr 2024 12:59:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=47.90.187.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713877162; cv=none; b=uLp8g+3ICoOQausEXMY68lkhOTA1a787wqNdEYz2in0A8/EJjmb058q8UEk0f7piDjvaUD8kz0hfoMxF+ArP2zb1vz+wln8kipGPPWU32WJld3fYg7T9jeh11sl7Vlt6FXSV8gdYZ9dmxVSUuaw7GqmWITAhadAD5VdTzdZuEdk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713877162; c=relaxed/simple; bh=VUK1qW4vcuTcnbfvkh2ig+AROuk8bCOr9JBsTl9lZiI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=sTiP71rPThadAKc/2EPiNNYAB/xO3IOko1IAckMtcZdpjHej2Gm+mp2h1VffN4fQNpI3G5hSo5IotNReacd4O7hZ1xm3SjGyBRzpV17/o7pHmF68TDWoGvfdeWmJze4TR5p85QD133m4uvpE99WI2gcnWiauSAIf7kGefvd/ckM= 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=n0HVDqsy; arc=none smtp.client-ip=47.90.187.16 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="n0HVDqsy" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1713877149; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type; bh=lumfKnRDCzxzbmj8wJ/Hznk5zzPAE/pxByFtYHy06AQ=; b=n0HVDqsy9gqwPYdqOSn/UILDsSEH+3yxlEjWow3mT8gKzmrJX5uRX3i6D/jErMEZBzLCxOZXPe7RItbXgIQ7h75CG8iX73vowU6csFKXqbrug/drQ6jiebmIGQuAIZ79HGFYpVARI+ANq1X/pjvDSiCF8173iu9rHGOH5g1oQdE= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R311e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047208;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---.XJXNjT6_1713877148; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.XJXNjT6_1713877148) by smtp.aliyun-inc.com; Tue, 23 Apr 2024 20:59:08 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH v2 7/7] um: Remove unused do_get_thread_area function Date: Tue, 23 Apr 2024 20:58:58 +0800 Message-Id: <20240423125858.137709-8-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240423125858.137709-1-tiwei.btw@antgroup.com> References: <20240423125858.137709-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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable It's not used since it was introduced by commit aa6758d4867c ("[PATCH] uml: implement {get,set}_thread_area for i386"). Now, it's causing a -Wmissing-prototypes warning: arch/x86/um/tls_32.c:39:5: warning: no previous prototype for =E2=80=98do_g= et_thread_area=E2=80=99 [-Wmissing-prototypes] 39 | int do_get_thread_area(struct user_desc *info) | ^~~~~~~~~~~~~~~~~~ The original author also had doubts about whether it should be used. Considering that 18 years have passed, let's just remove it. Signed-off-by: Tiwei Bie --- arch/x86/um/tls_32.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/arch/x86/um/tls_32.c b/arch/x86/um/tls_32.c index ba40b1b8e179..d301deee041f 100644 --- a/arch/x86/um/tls_32.c +++ b/arch/x86/um/tls_32.c @@ -36,22 +36,6 @@ static int do_set_thread_area(struct user_desc *info) return ret; } =20 -int do_get_thread_area(struct user_desc *info) -{ - int ret; - u32 cpu; - - cpu =3D get_cpu(); - ret =3D os_get_thread_area(info, userspace_pid[cpu]); - put_cpu(); - - if (ret) - printk(KERN_ERR "PTRACE_GET_THREAD_AREA failed, err =3D %d, " - "index =3D %d\n", ret, info->entry_number); - - return ret; -} - /* * sys_get_thread_area: get a yet unused TLS descriptor index. * XXX: Consider leaving one free slot for glibc usage at first place. Thi= s must @@ -231,7 +215,6 @@ int arch_set_tls(struct task_struct *new, unsigned long= tls) return ret; } =20 -/* XXX: use do_get_thread_area to read the host value? I'm not at all sure= ! */ static int get_tls_entry(struct task_struct *task, struct user_desc *info, int idx) { --=20 2.34.1