Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3976278pxb; Tue, 25 Jan 2022 00:26:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJy1+pNtN+uit02/k8Vq+sBty2nDFEVngOc2K6wmKXUjGvZY1GyWguKTtp+rsd/zQDMD9yzw X-Received: by 2002:a17:907:9812:: with SMTP id ji18mr1256196ejc.256.1643099200207; Tue, 25 Jan 2022 00:26:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643099200; cv=none; d=google.com; s=arc-20160816; b=Mq/GOMlUmrimhYigAVQ2Mig91aIyFBIMJShSjnhx8ebz0+d0D1DYhzuM4BGccgCc6Z yHjIa03D1NweiLTTX4FqUpaD0jX3Jj5plZhRl+clmr1PSe4BG/drSG2t95hZbdxP/tMY oq/GZbUT82rNoJg8PZ4gteIDhmAZH1hOT6VicSIJnOiPQdDTk64QRDlqTdf+PgCp2PVg FdEw/8OL+haaaddTKnwNEZ261+pf713OpjqrlAxhFXPBBKK6vaRjj+VVTtWGvNLDRGv1 CKV6/JGAqx07oqPdlJ3DXND5F8k7jHpJdQijL/JQsP5Cc9Ictsa/8pawGV0TDJsMXKZR EN3Q== 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=L4Hedtwj0WqVdJZoLXukhXWEMP6jbpMt1VaqV1MjDdU=; b=dG9mew1ctu7n0K4tWcsLQzUkhYqbSy+p2pdI43qfKygseyGCFqkE5AGAIEyc2tJDcV OCqbjnaPjEwWFqyBhVPAxQqe8q/iuhaN8GcuLFOIEJDmZIGfH9USKY0wPLT4kxicw1Ns t89iHP/va/gsnvH1wdnbDRsrcCBy8pIFzo4n3LNiK9dLRQUw1UXn5XtL2i8y5xqQBpRt v5vJybF4j7Myyo9CwhYrWGmcLaQdK3af/2BmbZdLuEdVNYp0apRa2QW5d6SHsbAV4Lwn onIupvWpbuP7W4stI2iSsOl/4NW7Age8c9CQgSIYQ98tXYt9Wjl8T1Ja8nz7D3Ex45fV b5HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xMG03cZs; 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 ds11si2413228ejc.302.2022.01.25.00.26.15; Tue, 25 Jan 2022 00:26:40 -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=xMG03cZs; 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 S3420842AbiAYCZj (ORCPT + 99 others); Mon, 24 Jan 2022 21:25:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349715AbiAXTVN (ORCPT ); Mon, 24 Jan 2022 14:21:13 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1E61C02B84B; Mon, 24 Jan 2022 11:08:14 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id 986C8B811FC; Mon, 24 Jan 2022 19:08:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEA69C340E5; Mon, 24 Jan 2022 19:08:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643051292; bh=2POWAd983rmLTzegXs88h1p/oWSCn2Gje3KOmqdlqlE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xMG03cZs47XCZaMFJDY8houhjDofBUFnDNK681ri76SVneC2WO4OrmDWbieDZvhvo ajtRY3uTmxlp6iWwja1z23K1a4KseojRZ8jNVYPj67sVwXHEubdzbFSGbckN1EQb8I fBQtu33DcT99zhBxRu/VdfnfjTYm0Sf/htZKlYvs= 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.14 116/186] um: registers: Rename function names to avoid conflicts and build problems Date: Mon, 24 Jan 2022 19:43:11 +0100 Message-Id: <20220124183940.841533562@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183937.101330125@linuxfoundation.org> References: <20220124183937.101330125@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 a74449b5b0e31..12ad7c435e97f 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 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 82bf5f8442ba4..2c75f2d638681 100644 --- a/arch/um/os-Linux/start_up.c +++ b/arch/um/os-Linux/start_up.c @@ -336,7 +336,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