Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3645325pxb; Mon, 24 Jan 2022 14:17:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzBWrDW+3qX65De3VpIgllWnsfKAsVZ32yUgeujD3Gy/UAzlfz805H+6KmG+oV5PpSbp73W X-Received: by 2002:a62:1bd3:0:b0:4c7:4dfb:a604 with SMTP id b202-20020a621bd3000000b004c74dfba604mr14195210pfb.45.1643062670107; Mon, 24 Jan 2022 14:17:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643062670; cv=none; d=google.com; s=arc-20160816; b=GZaH5FSb1AWr0WJPfnm8YL12hqcWCy5Q0U5m451EEobJhxhBfk27GcGgQR7VJRXSlf EGep1k6NdCyzQKxx1yJtrBQP3aaeYQzur+4zNbZbg8yWgXaIRbCESXSal8qd6Fuk44MN nf9Uz6QZH2aN33F+svbrZa9t0ZQwNOVpCS99nx5DHOdyD2UHpFOLpaKd08Z60zuBclR0 inxk25Qtc+fKdPM3zkij85HynPVGxtKHuei0whqMO2r61IsyT7owxEQtIuabbL8yBFo1 C2f8mVn2CLhT6XcFuCXJVsTWppOyRgUuLePlhr7zcUqxf7cI0sZJVn2apTkUA1iMI3Yg tEXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bNP+baGXo9Z0xVsk1X5/BHVlnTUMFg6ncgCLZ6FNP30=; b=s3TwRkQOago562LaS/yV4CpWG5d4JfaatZLKG7XQR7X0JQj2z86KZRT1ZfY7vkAeiZ 6QnsujajaLmRZxajvQvzei/DvMYrtYkns/sG0uIyYUBWZwSGGd8Is+GKXwPFPgq6IYCM tZp8deMJ3Z5/Qj3Xcw1nKfQkZS+j9nfRcng6pOjL2Zjp6R1oROm1tDUgArMXLd96BEyI butsxbCTqVFe9KZToZE6h42P89mBnS8pQDadiUy5Yoblm7eKXv0NhximQfhSjWe8C0tF I1gKuScVHcqKt9fNWi7u6Da4N+fGONWrZ2t53bcaMzuQTj9rxWLbhNXizqq9sb4n/ijS obiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VJD0xApY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x12si13927539plr.27.2022.01.24.14.17.38; Mon, 24 Jan 2022 14:17:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VJD0xApY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1581997AbiAXWMt (ORCPT + 99 others); Mon, 24 Jan 2022 17:12:49 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:50676 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1451660AbiAXV3p (ORCPT ); Mon, 24 Jan 2022 16:29:45 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 34B2C61305; Mon, 24 Jan 2022 21:29:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1343BC340E4; Mon, 24 Jan 2022 21:29:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643059780; bh=SwHp8z8g4fBVnumYsGHPVujRk5tCwr58kzWwwIKJFhQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VJD0xApYCYxxTwD3epLbrrLDHpNpOcV2rS8tXmNfd+mp2Mk6O0eC0FIUUaGspuzNd wfSv+m1YojXDXXiLJfuaTQJsWLZ7LYYxmLRO7pMYR5XeCJ/BhVKTm90/QjT6jUs6Zt F+Rsgi+vymIoOGjZN07e6XD9LDbX4fWpfaNcRTnM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Randy Dunlap , Jeff Dike , Richard Weinberger , Anton Ivanov , linux-um@lists.infradead.org, Sasha Levin Subject: [PATCH 5.16 0688/1039] um: registers: Rename function names to avoid conflicts and build problems Date: Mon, 24 Jan 2022 19:41:17 +0100 Message-Id: <20220124184148.478052926@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Dunlap [ Upstream commit 077b7320942b64b0da182aefd83c374462a65535 ] The function names init_registers() and restore_registers() are used in several net/ethernet/ and gpu/drm/ drivers for other purposes (not calls to UML functions), so rename them. This fixes multiple build errors. Signed-off-by: Randy Dunlap Cc: Jeff Dike Cc: Richard Weinberger Cc: Anton Ivanov Cc: linux-um@lists.infradead.org Signed-off-by: Richard Weinberger Signed-off-by: Sasha Levin --- arch/um/include/shared/registers.h | 4 ++-- arch/um/os-Linux/registers.c | 4 ++-- arch/um/os-Linux/start_up.c | 2 +- arch/x86/um/syscalls_64.c | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/um/include/shared/registers.h b/arch/um/include/shared/registers.h index 0c50fa6e8a55b..fbb709a222839 100644 --- a/arch/um/include/shared/registers.h +++ b/arch/um/include/shared/registers.h @@ -16,8 +16,8 @@ extern int restore_fp_registers(int pid, unsigned long *fp_regs); extern int save_fpx_registers(int pid, unsigned long *fp_regs); extern int restore_fpx_registers(int pid, unsigned long *fp_regs); extern int save_registers(int pid, struct uml_pt_regs *regs); -extern int restore_registers(int pid, struct uml_pt_regs *regs); -extern int init_registers(int pid); +extern int restore_pid_registers(int pid, struct uml_pt_regs *regs); +extern int init_pid_registers(int pid); extern void get_safe_registers(unsigned long *regs, unsigned long *fp_regs); extern unsigned long get_thread_reg(int reg, jmp_buf *buf); extern int get_fp_registers(int pid, unsigned long *regs); diff --git a/arch/um/os-Linux/registers.c b/arch/um/os-Linux/registers.c index 2d9270508e156..b123955be7acc 100644 --- a/arch/um/os-Linux/registers.c +++ b/arch/um/os-Linux/registers.c @@ -21,7 +21,7 @@ int save_registers(int pid, struct uml_pt_regs *regs) return 0; } -int restore_registers(int pid, struct uml_pt_regs *regs) +int restore_pid_registers(int pid, struct uml_pt_regs *regs) { int err; @@ -36,7 +36,7 @@ int restore_registers(int pid, struct uml_pt_regs *regs) static unsigned long exec_regs[MAX_REG_NR]; static unsigned long exec_fp_regs[FP_SIZE]; -int init_registers(int pid) +int init_pid_registers(int pid) { int err; diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c index 8a72c99994eb1..e3ee4db58b40d 100644 --- a/arch/um/os-Linux/start_up.c +++ b/arch/um/os-Linux/start_up.c @@ -368,7 +368,7 @@ void __init os_early_checks(void) check_tmpexec(); pid = start_ptraced_child(); - if (init_registers(pid)) + if (init_pid_registers(pid)) fatal("Failed to initialize default registers"); stop_ptraced_child(pid, 1, 1); } diff --git a/arch/x86/um/syscalls_64.c b/arch/x86/um/syscalls_64.c index 58f51667e2e4b..8249685b40960 100644 --- a/arch/x86/um/syscalls_64.c +++ b/arch/x86/um/syscalls_64.c @@ -11,6 +11,7 @@ #include #include /* XXX This should get the constants from libc */ #include +#include long arch_prctl(struct task_struct *task, int option, unsigned long __user *arg2) @@ -35,7 +36,7 @@ long arch_prctl(struct task_struct *task, int option, switch (option) { case ARCH_SET_FS: case ARCH_SET_GS: - ret = restore_registers(pid, ¤t->thread.regs.regs); + ret = restore_pid_registers(pid, ¤t->thread.regs.regs); if (ret) return ret; break; -- 2.34.1