Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2209968rdd; Fri, 12 Jan 2024 02:50:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IHze5bVO2iHlHubtbAS6rfDNsVGva1IpU3VbkKIrH37Qpiej9eYWAoVZt2L8qfzsE+gfCQE X-Received: by 2002:a05:620a:ec3:b0:783:1e58:9da0 with SMTP id x3-20020a05620a0ec300b007831e589da0mr1217899qkm.18.1705056600015; Fri, 12 Jan 2024 02:50:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705056600; cv=none; d=google.com; s=arc-20160816; b=D2JShaNs6CW29y+KmqUVBBjwToeUOwMUmAjL2hGujDEwd6on9TNl18L0LlOy9SObvH hBDqE9eNdvKnyxDy8f1ggl1q4MQyxf+/44pTplR1R5WEpCmSWh/t6C2deoQUvnrse5JN lOWGiCTBi2vjFU2ExLy1msRb1Ml7f3OiqoGbCHaFBKhQYaPWX0NzSkQLxKlVyEvUoHwF skwaRiqf1mfZOG9uE8ixnwJE9w9G6xKKg2RRioS1Ya8OHIiogXBTMZLd3evu/aWlY2Vr Qu1pZECLGj85LhA6SlSfioNzfGJFTS59rxyaLdtTsSyPQf/QfWd+6PM0/fy56IU5Y0UF eMHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:feedback-id:dkim-signature:dkim-signature; bh=oZXd44/iULeucMaGv4BNeFUvP0p+w9PCsZxuaMhOtuw=; fh=KXA6Xj5ObeEQ5P8exCXKSOw94kPJCgnZfHAsRc0Xcrk=; b=Kz7ECXs4cR2EkF7VY+eUZ1NqiZV8yXEQql58EaNnVGhcHvNe2100XLYZ9FX+TrWyy4 xEtm46gVctW8luzCgn1QIDvhoUsxu75agdNvzPyz9bNSRwQ3oiUUKoK7GE8iXXzQeT9s X9VXTKcbm3Cz28UvM4NxZ6z+vKRY7JmpV75EtJN/X/IwUQIe/EnQVLwxJ4JtG06YPl/I QXWrXQCFYTJ/72M9DngnOEMBF7Odrt5wsgBBwd/S3k31qUX2sZYQhMKDX5AGnT7F4Lgc rHXd6mkfUmTqpVTA+ihjwWxyOUWH0TZ+cA9O1tWo5+/gsB0lsArSkd6CSKgtSR3D2Fh8 Wo0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=n374fa5J; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=8EJR+e51; spf=pass (google.com: domain of linux-kernel+bounces-24121-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24121-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g6-20020ae9e106000000b0078154ea9b59si2558333qkm.734.2024.01.12.02.49.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 02:50:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24121-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=n374fa5J; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=8EJR+e51; spf=pass (google.com: domain of linux-kernel+bounces-24121-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24121-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id AE24C1C2495F for ; Thu, 11 Jan 2024 23:02:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1BA375914E; Thu, 11 Jan 2024 23:02:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="n374fa5J"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="8EJR+e51" Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (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 4C870524A8; Thu, 11 Jan 2024 23:01:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 41FDE5C0076; Thu, 11 Jan 2024 18:01:56 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Thu, 11 Jan 2024 18:01:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1705014116; x=1705100516; bh=oZXd44/iUL eucMaGv4BNeFUvP0p+w9PCsZxuaMhOtuw=; b=n374fa5Jz+FUk0jiydMTizDaxY J0CC8/Jbq6MivHZ0qO4T3tpcvjmiB4Q1xUj/a9PRtDyjR4OivQLKvtw6fFxVMAoQ g4lUD0nhNqZyHIsq8Z2RQWCjk9wVJhz73DCcSUV8r/sUjTIQdBw2n7F/RkyR5B8s ENCpiCZCld8UB1VjUJxBRfor17fd5XdYCi1+SxPMbdWGv271AS6kIeqzvZcKa7X+ wKMKkzfGbbkZqYTQYNxjroAQlJXMnQeZtdkV10G+oBR/dE2KUMHfSxJ3KuJ9Ynit kZFHX2FJN24/ZlMHiL61mV+VQycTOlmmo8AHVhMuhMwnKayNh6RmM+dICSLQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1705014116; x=1705100516; bh=oZXd44/iULeucMaGv4BNeFUvP0p+ w9PCsZxuaMhOtuw=; b=8EJR+e51ZxTxDdqmsp+ACMDiaKQVQZgHR7ioChuEDwqH lVcAp0w0Knhv4mGwJIFjEC1SOOqJEx0nJ5yTHoqsGX3aWTrkh6/sahg9ixI5S5R8 an/sxt6yE89GHZtmT7Oaj78AU3L/wAY7Eu4pXDxLDDn8u9lDUsTbZMFRONPD4c96 X6jPJ65aBVv1yDJ1oTwxeGzxkXcxKPZmhyjTVhthYe8iLJFS+sC+cHvc6okUc25K O62sI4dsIfc2qG4gByxS3d04mScLFze3n6fgCoTlGyGwteq7aTGJX2lIhfwI5Md9 yvJFtkGKq+EDdwiyEb0hYkAbsnRKA7W7yP9/r4GslQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeigedgtdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 75097B6008F; Thu, 11 Jan 2024 18:01:55 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1374-gc37f3abe3d-fm-20240102.001-gc37f3abe Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <07d8877b-d933-46f4-8ca4-c10ed602f37e@app.fastmail.com> In-Reply-To: References: <20231025140205.3586473-1-mszeredi@redhat.com> <20231025140205.3586473-6-mszeredi@redhat.com> <75b87a85-7d2c-4078-91e3-024ea36cfb42@roeck-us.net> <2f595f28-7fcd-4196-a0b1-6598781530b9@roeck-us.net> Date: Fri, 12 Jan 2024 00:01:34 +0100 From: "Arnd Bergmann" To: "Linus Torvalds" , "Guenter Roeck" , "Yoshinori Sato" , "Rich Felker" , "John Paul Adrian Glaubitz" Cc: "Miklos Szeredi" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, linux-man@vger.kernel.org, linux-security-module@vger.kernel.org, "Karel Zak" , "Ian Kent" , "David Howells" , "Alexander Viro" , "Christian Brauner" , "Amir Goldstein" , "Matthew House" , "Florian Weimer" Subject: Re: [PATCH v4 5/6] add listmount(2) syscall Content-Type: text/plain On Thu, Jan 11, 2024, at 21:14, Linus Torvalds wrote: > The SH put_user64() needs to be looked at too, but in the meantime, > maybe something like this fixes the problems with listmount? I tried changing it to use the generic memcpy() based uaccess that m68k-nommu and riscv-nommu use, which also avoids the build failure. I still run into other unrelated build issues on arch/sh, so I'm not sure if this is a sufficient fix. Arnd diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 7500521b2b98..2cc3a541e231 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -73,6 +73,7 @@ config SUPERH select PERF_USE_VMALLOC select RTC_LIB select SPARSE_IRQ + select UACCESS_MEMCPY if !MMU select TRACE_IRQFLAGS_SUPPORT help The SuperH is a RISC processor targeted for use in embedded systems diff --git a/arch/sh/include/asm/uaccess.h b/arch/sh/include/asm/uaccess.h index a79609eb14be..b42764d55901 100644 --- a/arch/sh/include/asm/uaccess.h +++ b/arch/sh/include/asm/uaccess.h @@ -2,6 +2,7 @@ #ifndef __ASM_SH_UACCESS_H #define __ASM_SH_UACCESS_H +#ifdef CONFIG_MMU #include #include @@ -130,4 +131,8 @@ struct mem_access { int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs, struct mem_access *ma, int, unsigned long address); +#else +#include +#endif + #endif /* __ASM_SH_UACCESS_H */ diff --git a/arch/sh/include/asm/uaccess_32.h b/arch/sh/include/asm/uaccess_32.h index 5d7ddc092afd..e053f2fd245c 100644 --- a/arch/sh/include/asm/uaccess_32.h +++ b/arch/sh/include/asm/uaccess_32.h @@ -35,7 +35,6 @@ do { \ } \ } while (0) -#ifdef CONFIG_MMU #define __get_user_asm(x, addr, err, insn) \ ({ \ __asm__ __volatile__( \ @@ -56,16 +55,6 @@ __asm__ __volatile__( \ ".previous" \ :"=&r" (err), "=&r" (x) \ :"m" (__m(addr)), "i" (-EFAULT), "0" (err)); }) -#else -#define __get_user_asm(x, addr, err, insn) \ -do { \ - __asm__ __volatile__ ( \ - "mov." insn " %1, %0\n\t" \ - : "=&r" (x) \ - : "m" (__m(addr)) \ - ); \ -} while (0) -#endif /* CONFIG_MMU */ extern void __get_user_unknown(void); @@ -140,7 +129,6 @@ do { \ } \ } while (0) -#ifdef CONFIG_MMU #define __put_user_asm(x, addr, err, insn) \ do { \ __asm__ __volatile__ ( \ @@ -164,17 +152,6 @@ do { \ : "memory" \ ); \ } while (0) -#else -#define __put_user_asm(x, addr, err, insn) \ -do { \ - __asm__ __volatile__ ( \ - "mov." insn " %0, %1\n\t" \ - : /* no outputs */ \ - : "r" (x), "m" (__m(addr)) \ - : "memory" \ - ); \ -} while (0) -#endif /* CONFIG_MMU */ #if defined(CONFIG_CPU_LITTLE_ENDIAN) #define __put_user_u64(val,addr,retval) \