From 102a0743326a03cd1a1202ceda21e175b7d3575c Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Tue, 20 Feb 2024 01:20:52 +0000 Subject: [PATCH] add new system file --- kernel/arch/arm64/lib/clear_user.S | 22 +++++----------------- 1 files changed, 5 insertions(+), 17 deletions(-) diff --git a/kernel/arch/arm64/lib/clear_user.S b/kernel/arch/arm64/lib/clear_user.S index 4374020..48a3a26 100644 --- a/kernel/arch/arm64/lib/clear_user.S +++ b/kernel/arch/arm64/lib/clear_user.S @@ -1,23 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Based on arch/arm/lib/clear_user.S * * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <linux/linkage.h> #include <asm/asm-uaccess.h> +#include <asm/assembler.h> .text @@ -29,8 +19,7 @@ * * Alignment fixed up by hardware. */ -ENTRY(__arch_clear_user) - uaccess_enable_not_uao x2, x3, x4 +SYM_FUNC_START(__arch_clear_user) mov x2, x1 // save the size for fixup return subs x1, x1, #8 b.mi 2f @@ -50,13 +39,12 @@ b.mi 5f uao_user_alternative 9f, strb, sttrb, wzr, x0, 0 5: mov x0, #0 - uaccess_disable_not_uao x2, x3 ret -ENDPROC(__arch_clear_user) +SYM_FUNC_END(__arch_clear_user) +EXPORT_SYMBOL(__arch_clear_user) .section .fixup,"ax" .align 2 9: mov x0, x2 // return the original size - uaccess_disable_not_uao x2, x3 ret .previous -- Gitblit v1.6.2