Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3548802pxb; Mon, 24 Jan 2022 11:59:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJysehG5bl1z7umIvpL6PDxbLmsq9623tqtzLCrTdFxYHcvBRhQJqvyuGWfXW7UM9wxzuBjK X-Received: by 2002:a17:90b:1c12:: with SMTP id oc18mr3417189pjb.172.1643054249335; Mon, 24 Jan 2022 11:57:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643054249; cv=none; d=google.com; s=arc-20160816; b=lm7AC+ESgFwevN7gK1XgIMxIGwGsngb1FMqsALVzzuFiZeqDtZLr9q5glZT1jpH2fP phUMteBptTd7eMbtwUysYuY2mAVQ1KR7HP/g9yV4cgydOWMz5PLlIy2ZrJvgnvau1LIF pS5bthJIDnIyQPTWPWr4e7jb+vYFYmKclGf0v7sBLXvA71vSXy40GHZQjfapA1aTPBAH eRISgKuXdKbOqmXS/C9FJiLqj6KTVqTwpUYXOv4FlccAATJEmdOY7XjFzKAoSicwrwa2 6n3ob1fGqX6l7vEXhc/sfDymq14AxvMhP/8BBweXi6wkCc5tbMvg+3kKIYrpr5HI6x9A MZNg== 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=dE19dVedi84J/GbP/cmTSdDQm9jEwoE90godsMNcDWM=; b=eNjEofkZfEMyBErsCxw0fCpfL8/rumsKhVvAf7+j22XgZ7WopojBHrTv3pM/OhkLlj aQv2hS/hca/7M9ypiMLKvFwYUoCr5qJTt1LyXY97LnmRiwRPG9JhODkBeOsga4lKMvwL zkpfJxoC+B+6OcKogNxc7SSHmeAKe95XAIN+Xx2tM53Eo2txYUuJpW4HToiSxn+emBL0 Rug8yLLbXt+FF+ZYZa+PeEy8j6R48cL82EG1eOhjUzqzhPWPv25O56WdlYvdLkOnwp03 T75bMsEmR8Hbmdbk+5lRWlkvwNyF3ReF5Ds5HFqm6V3oPG0brOGoMHe/zU02RIiJCall erFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LJiPRyOY; 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 y65si10268744pgd.598.2022.01.24.11.57.15; Mon, 24 Jan 2022 11:57:29 -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=LJiPRyOY; 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 S241948AbiAXSxK (ORCPT + 99 others); Mon, 24 Jan 2022 13:53:10 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:50702 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245509AbiAXSvj (ORCPT ); Mon, 24 Jan 2022 13:51:39 -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 06740614E3; Mon, 24 Jan 2022 18:51:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D28FCC340E5; Mon, 24 Jan 2022 18:51:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643050298; bh=ypGe6ZiPObWziSfTo04HOWAK/HNjCmpuxDJ2gVqG6As=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LJiPRyOYfYRQ40CQ9xX0+bAS7cEN84nMmPiK/xQ5YqW3aWH9o7tkh4/suK+mZwsVs z72ldc7GxXlss+iFhIv2qdmEGCkFECYH2L6qp8rV1yzkWaBKAxDmx2HCGPeK/0ks53 JPGq7rtnYowDzH9wuANcvB/9Oxw7T9D2rEZslsoI= 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 4.4 073/114] um: registers: Rename function names to avoid conflicts and build problems Date: Mon, 24 Jan 2022 19:42:48 +0100 Message-Id: <20220124183929.351144409@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183927.095545464@linuxfoundation.org> References: <20220124183927.095545464@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 f5b76355ad71a..089f979e112e3 100644 --- a/arch/um/include/shared/registers.h +++ b/arch/um/include/shared/registers.h @@ -14,8 +14,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 2ff8d4fe83c4f..34a5963bd7efd 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 22a358ef1b0cd..dc06933ba63d9 100644 --- a/arch/um/os-Linux/start_up.c +++ b/arch/um/os-Linux/start_up.c @@ -334,7 +334,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 e6552275320bc..40ecacb2c54b3 100644 --- a/arch/x86/um/syscalls_64.c +++ b/arch/x86/um/syscalls_64.c @@ -9,6 +9,7 @@ #include #include /* XXX This should get the constants from libc */ #include +#include long arch_prctl(struct task_struct *task, int code, unsigned long __user *addr) { @@ -32,7 +33,7 @@ long arch_prctl(struct task_struct *task, int code, unsigned long __user *addr) switch (code) { 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