From patchwork Thu Jun 20 16:23:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 806004 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp379033wrt; Thu, 20 Jun 2024 09:27:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWnUTIWEYM3dK/jGCB+8ZAv25i8fYD7h7unDbuicb2uIWEDhXXKS2S5h2ENruRRguxNcJCYs3epiLPHNXpn65FX X-Google-Smtp-Source: AGHT+IE6cweY1O0zNEaVayA2mphDoSPVuPu0xEdAt07eyjJkfk6AvqYmPucwxDvgiGKTM0izLkpx X-Received: by 2002:a05:622a:12:b0:440:628c:b26e with SMTP id d75a77b69052e-444a7a1e0e5mr71399671cf.11.1718900846561; Thu, 20 Jun 2024 09:27:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718900846; cv=pass; d=google.com; s=arc-20160816; b=NIUhY6pX3uHUDEu5pMRVTWP+HiiMB2tSah6qSD0frlt2zc7CeDDiXBahBpZAc/z7W0 9cdwGTu3oDP/YlYXQjczg+DZzuL5WnGd5VC7lJW31ypgwnpxq6F3XlBFrVN9xsh30zpY UivsK9IvMzF8nJVczchvDzIIrGD6rACmZdQMIdLl0yt9YljSyZRMFlQ27i8WAGlx7tT2 LlF+39CpSg3jvhO5ga7hXrx7xDrCWPvLBDAjUtTnPFU3rTNLHPILvVHLcjvbUOcET6/q nOzYYvien9xVo9iZ6F79TfjkXgCTbhhffU01sJv01wno8V+38yhz3ZTj/UxolRkZPzyC +wtw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=fvtVf1PfA9sQBvjOR60oFrLwm0pS8UazDX0m9JuBKZc=; fh=xSIq547Z/8+2mwrThk5NmWwnmadq1eVmQ35PeXz4rpA=; b=RiRVGtzyFDgRN0OxOrQwOzOzYC8m2KcSeLq3FxHjOBkqiboLNk0czYSly36VGG+2gY KAR5SFh+hOc/qXL7r3wXIINu/jgzTyEmQZXoj8oCslZKmZsTLhg4y5qtbxOucmdANSrE 7oEw16gNPXU1dTy1LF2+/8oRNmAiOvlbVjRb5BuDjVtbPLTOVb/Ga1tk69UPpnMd2/IV 40P0sgtYwgp/vBNeOpuSC9HyOgQYiLDq9ZRjvhgxsVqYww+d0ztUSTYqNQtdQFaWpVFR Zt1q+9QhlqRqcO15Gy/JjayKRHW5pxak7t9oynZK20yD70O7UCVosAtGyFRL6T5XmGv0 RvPA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Mgf3e1Fh; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id d75a77b69052e-441ef3d8f93si168335361cf.195.2024.06.20.09.27.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 09:27:26 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Mgf3e1Fh; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3116B3895FCD for ; Thu, 20 Jun 2024 16:27:26 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by sourceware.org (Postfix) with ESMTPS id DC97C3894C30 for ; Thu, 20 Jun 2024 16:25:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DC97C3894C30 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DC97C3894C30 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2604:1380:4641:c500::1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718900723; cv=none; b=R+b8a3L+zSA/aarKokFRKY1A3R5S4xJsOFeHeUuOSCx9xkO889o0UK5+IF8GV2bodJxfzJ6wdmEq9u3CISV7vuhneMN85z31mKGlZyHkt0vvisO5bUIu8wrUzk7aZhV/HBdLNTWMAQh+ZEd6ZVwsyur1BAMDS5Co2sHnOG2BXXw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718900723; c=relaxed/simple; bh=kDUL0eQ/6YSJ1bK+6Lr69ZdPp0RU2xbPAfoz6UW7TTg=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=gL9QAg4pWXYd34AdaF0un+icuZPviCDRjnJrPMux+pNCfdl/l+PAFBxCYIDgy47+EeKI/j0cdKsovJmI/iWeNXgSd0qIYq/KyOqIwXuYBLcuabcHKRXk6slwoUwOrEmV7qP3tnj0n8n8eF3IJWQ7aWWlwGdxgVjRG0CB4oUwPYk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 46101621C5; Thu, 20 Jun 2024 16:25:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1817C32786; Thu, 20 Jun 2024 16:25:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718900719; bh=kDUL0eQ/6YSJ1bK+6Lr69ZdPp0RU2xbPAfoz6UW7TTg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mgf3e1FhIJ34BxmZFn82Ln9S0Qv6QXhxwCJKDARqYjkFgu+PeLy+HbQQiPNlRIlpH CJPg8GeMhGdXNWnFJ7rs6CxgQTJgS3aIOdECU1hUTPI3GTqq1wFPc1n7ygAUyYEwl9 +8r+PlwF95EJ6Ir8u8mktZFBaZpsQVlPwxTyDXM7TdcPf38yXtOg8ExYgy0jNH9ePX 1ViSkxDmMk4r4dOWXWQ9/QUe8Zx98JIfQyCBmd0SwBnHw1BZMRTpQwEpjMClIy+kE/ qhRXIrGZpKimne/UDkbRtj9V6uWojsT4fcxvIhFSPeJGeHucTaUEAfjbySdUDB53iI PtNJzQd1HEs7A== From: Arnd Bergmann To: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Thomas Bogendoerfer , linux-mips@vger.kernel.org, Helge Deller , linux-parisc@vger.kernel.org, "David S. Miller" , Andreas Larsson , sparclinux@vger.kernel.org, Michael Ellerman , Nicholas Piggin , Christophe Leroy , "Naveen N . Rao" , linuxppc-dev@lists.ozlabs.org, Brian Cain , linux-hexagon@vger.kernel.org, Guo Ren , linux-csky@vger.kernel.org, Heiko Carstens , linux-s390@vger.kernel.org, Rich Felker , John Paul Adrian Glaubitz , linux-sh@vger.kernel.org, "H. Peter Anvin" , Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, libc-alpha@sourceware.org, musl@lists.openwall.com, ltp@lists.linux.it Subject: [PATCH 15/15] linux/syscalls.h: add missing __user annotations Date: Thu, 20 Jun 2024 18:23:16 +0200 Message-Id: <20240620162316.3674955-16-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240620162316.3674955-1-arnd@kernel.org> References: <20240620162316.3674955-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patch=linaro.org@sourceware.org From: Arnd Bergmann A couple of declarations in linux/syscalls.h are missing __user annotations on their pointers, which can lead to warnings from sparse because these don't match the implementation that have the correct address space annotations. Signed-off-by: Arnd Bergmann --- include/linux/syscalls.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index ba9337709878..63424af87bba 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -322,13 +322,13 @@ asmlinkage long sys_io_pgetevents(aio_context_t ctx_id, long nr, struct io_event __user *events, struct __kernel_timespec __user *timeout, - const struct __aio_sigset *sig); + const struct __aio_sigset __user *sig); asmlinkage long sys_io_pgetevents_time32(aio_context_t ctx_id, long min_nr, long nr, struct io_event __user *events, struct old_timespec32 __user *timeout, - const struct __aio_sigset *sig); + const struct __aio_sigset __user *sig); asmlinkage long sys_io_uring_setup(u32 entries, struct io_uring_params __user *p); asmlinkage long sys_io_uring_enter(unsigned int fd, u32 to_submit, @@ -441,7 +441,7 @@ asmlinkage long sys_fchown(unsigned int fd, uid_t user, gid_t group); asmlinkage long sys_openat(int dfd, const char __user *filename, int flags, umode_t mode); asmlinkage long sys_openat2(int dfd, const char __user *filename, - struct open_how *how, size_t size); + struct open_how __user *how, size_t size); asmlinkage long sys_close(unsigned int fd); asmlinkage long sys_close_range(unsigned int fd, unsigned int max_fd, unsigned int flags); @@ -555,7 +555,7 @@ asmlinkage long sys_get_robust_list(int pid, asmlinkage long sys_set_robust_list(struct robust_list_head __user *head, size_t len); -asmlinkage long sys_futex_waitv(struct futex_waitv *waiters, +asmlinkage long sys_futex_waitv(struct futex_waitv __user *waiters, unsigned int nr_futexes, unsigned int flags, struct __kernel_timespec __user *timeout, clockid_t clockid); @@ -907,7 +907,7 @@ asmlinkage long sys_seccomp(unsigned int op, unsigned int flags, asmlinkage long sys_getrandom(char __user *buf, size_t count, unsigned int flags); asmlinkage long sys_memfd_create(const char __user *uname_ptr, unsigned int flags); -asmlinkage long sys_bpf(int cmd, union bpf_attr *attr, unsigned int size); +asmlinkage long sys_bpf(int cmd, union bpf_attr __user *attr, unsigned int size); asmlinkage long sys_execveat(int dfd, const char __user *filename, const char __user *const __user *argv, const char __user *const __user *envp, int flags); @@ -960,11 +960,11 @@ asmlinkage long sys_cachestat(unsigned int fd, struct cachestat_range __user *cstat_range, struct cachestat __user *cstat, unsigned int flags); asmlinkage long sys_map_shadow_stack(unsigned long addr, unsigned long size, unsigned int flags); -asmlinkage long sys_lsm_get_self_attr(unsigned int attr, struct lsm_ctx *ctx, - u32 *size, u32 flags); -asmlinkage long sys_lsm_set_self_attr(unsigned int attr, struct lsm_ctx *ctx, +asmlinkage long sys_lsm_get_self_attr(unsigned int attr, struct lsm_ctx __user *ctx, + u32 __user *size, u32 flags); +asmlinkage long sys_lsm_set_self_attr(unsigned int attr, struct lsm_ctx __user *ctx, u32 size, u32 flags); -asmlinkage long sys_lsm_list_modules(u64 *ids, u32 *size, u32 flags); +asmlinkage long sys_lsm_list_modules(u64 __user *ids, u32 __user *size, u32 flags); /* * Architecture-specific system calls