From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF3BA1E47AE for ; Tue, 7 Jan 2025 09:41:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736242905; cv=none; b=dEuwaDS6Qc1gGpSTaPZGMMrNMxe35kkF0jzYZF6Kj4TqBi97v7HG8ngMKMFHXCqSqm9PBU88zMB5oqpfOD1FKWnLgnJL+KNWf3w5PnnnkG7i0aGzfM470NI7xoqSz6YXl3F/A1kjH8uM4u0JIWV/rVVFwmDfqQqJ9OStNoGYatM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736242905; c=relaxed/simple; bh=QiqbbA431OhSqTmh1rSsqG6yH6YXBHhA2zc1V+hZa74=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nJ0sinmzh1glF0ExyIVWBpo64122wkNmPajuYzw93YjXbJffb/Pz12dYR5AL0UJmMhh7lL4Hm5hNTaNFXe7neiqN/U2vM7IcYvUboTSzz9uBlYJyUG7T3Oc3fMjudV7ImuhtH4/QGnzN7fcpFYjpG5lPV2KBhmsEqWNYL3wPa4w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=PoXCwjXr; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PoXCwjXr" Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-aabfb33aff8so2739333366b.0 for ; Tue, 07 Jan 2025 01:41:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736242902; x=1736847702; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=SpsIgg1e/3uFwlFgTsWNBO+zJGIkDDm/DpMGSieQyDA=; b=PoXCwjXrMuGKK8BwxRHIbOFRyMhf+Y0HIvFqUIL9X92OaPZo5+zo4im31kVIwyFVrb AZaUGR0ZVR9uCSUHvrx2ZlozYFlhVO+B8WUP7AfU36MQDJU9Rt11tnDmAF9QEF1Mg7Zc g1ZViaEvJJyZTHXe6clByjhWBDYlB5cOPmeVh3oao+Wt1pUlZ8sTtdnIJ3mB3aiW+U+E c+KjFGZAHf9lMW8v1ppGfJ8CTLZz+wpdeeEDPO7docZX1U3HyZjrMyAn/jzSj1H2JrOF YE3oMKwhZ++Yfuu2hjN3vnXrTvaPazoiuLusUnT0KKC71wpDkWhku4Kq4aqIcwIBSJod yOdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736242902; x=1736847702; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SpsIgg1e/3uFwlFgTsWNBO+zJGIkDDm/DpMGSieQyDA=; b=hLW216k1M3+R0ri/gDYQXuv4DTtxzN0J65bQlLcqPKXzsq5BoLyFbSacmhdOGsHCDy g8B4msFjvmALQo0faL7FTGhqLO+5sOfKtgmrcgIfAF83j78CEfABZx+ldJna9TltvQ8A jZQujiHJlVT8Kxhsa23Jy0h6nMpJoUh6HjJb3TplefhIMqFPn0mb5dvg3jDDc7129vwn K2TTfiV3deOBup9jOtXFIxVgiBVEL4Tt1C2eSlHLIij1zPuIQ753fwFHOmdcmjqrFuEa kAR4NmgjGIi1l6Adf7d2ho5sjG3D600xxqIqNS84RhQLgShx8WnfulYICwxnAhirY0Xo 75kQ== X-Forwarded-Encrypted: i=1; AJvYcCXAZcvyCTv0L+VZnN9cOc0Ke/qpiJ1n0cAEJJynz1m8Fh2sZr/7GYSYfGEErVazcZJJez7RoEA9mDkRFXQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwClS0TkpaV6uCUdBN0xE1fAjJv7buxqiiyNCScI9Cqi4wJAy/M 0+KqmrsygYzX19WCztsqSLCu6ZRLLSOYqLd7Q4mL9LJq47Byd2SigbUueTCIzWs= X-Gm-Gg: ASbGnctOHHx8yhbEWYfJS9erggqFHQKcFeivQ5jAJ/nXoT0zpd1dW6oR5024s0K3Qrz nUGcUCVIgBFvifTakptZLXiC/j5RcPsZE+dpgX9QX+7bOz6RSydVseWJs39tqEzlXVoRODlc1yn Q51bXrzxdkHPNsBEIH+hRjKNwsKFsZA75FM/oEQFUuz6ql38+p2zuoouUDUKbop2fmuai8E9DM1 3UOQYpEYey/JeZcv+ijem0wxhC6cjnJqbJiZ1uJHN7DtqFoyssLlRQ6GGi3RfC3Riw= X-Google-Smtp-Source: AGHT+IFg90XSIzsHeI+IKESBsSFpkxnaQ4jjexpj6W9kCj39JSV8wQCQI8feJQ8/JhMvrEeNMUEQ8A== X-Received: by 2002:a17:907:7ba5:b0:aab:f971:1f73 with SMTP id a640c23a62f3a-ab2918fdce4mr194300366b.22.1736242902078; Tue, 07 Jan 2025 01:41:42 -0800 (PST) Received: from [192.168.1.140] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0f012229sm2356901166b.133.2025.01.07.01.41.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2025 01:41:41 -0800 (PST) From: Linus Walleij Date: Tue, 07 Jan 2025 10:41:28 +0100 Subject: [PATCH RFC v3 12/30] ARM: entry: Rename syscall invocation Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250107-arm-generic-entry-v3-12-4e5f3c15db2d@linaro.org> References: <20250107-arm-generic-entry-v3-0-4e5f3c15db2d@linaro.org> In-Reply-To: <20250107-arm-generic-entry-v3-0-4e5f3c15db2d@linaro.org> To: Dmitry Vyukov , Oleg Nesterov , Russell King , Kees Cook , Andy Lutomirski , Will Drewry , Frederic Weisbecker , "Paul E. McKenney" , Jinjie Ruan , Arnd Bergmann , Ard Biesheuvel , Al Viro Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij X-Mailer: b4 0.14.2 Now that we do not have a separate trace syscall invocation path, rename the invocation functions to be generic. This can be squashed into the previous patch, it is just done here for the previous patch to be easier to get a cleaner diff and be easier to read. Signed-off-by: Linus Walleij --- arch/arm/include/asm/syscall.h | 2 +- arch/arm/kernel/entry-common.S | 10 +++++----- arch/arm/kernel/syscall.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm/include/asm/syscall.h b/arch/arm/include/asm/syscall.h index 9c664d8c5718f58034f442c20a030b59faf65dd9..b94fd7ce17f82f0baf06b74800245112e1f13002 100644 --- a/arch/arm/include/asm/syscall.h +++ b/arch/arm/include/asm/syscall.h @@ -19,7 +19,7 @@ extern const unsigned long sys_call_table[]; -int invoke_syscall_trace(void *table, struct pt_regs *regs, int scno); +int invoke_syscall(void *table, struct pt_regs *regs, int scno); static inline int syscall_get_nr(struct task_struct *task, struct pt_regs *regs) diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index f0f1f8723965313b287158fb2a238908db72fcd2..f1e48002bd3075ea67b5883178583127fa0055c6 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S @@ -260,7 +260,7 @@ ENTRY(vector_swi) stmdb sp!, {r4, r5} @ push fifth and sixth args mov r0, tbl mov r2, scno @ syscall number from r7 - bl invoke_syscall_trace + bl invoke_syscall cmp r0, #0 beq ret_fast_syscall /* This path taken when tracing */ @@ -390,7 +390,7 @@ ENDPROC(sys_mmap2) * r1: regs * r2: syscall number */ -SYM_TYPED_FUNC_START(invoke_syscall_trace_asm) +SYM_TYPED_FUNC_START(invoke_syscall_asm) #ifdef CONFIG_CPU_SPECTRE csdb #endif @@ -400,17 +400,17 @@ SYM_TYPED_FUNC_START(invoke_syscall_trace_asm) /* Make space to copy the two syscall stack arguments */ sub sp, sp, #S_OFF mov scno, r2 - badr lr, __invoke_syscall_trace_ret @ return right here + badr lr, __invoke_syscall_ret @ return right here ldmia r1, {r0 - r6} @ reload r0-r6 from regs stmia sp, {r4, r5} @ copy stack arguments ldr pc, [tbl, scno, lsl #2] @ call sys_* routine -__invoke_syscall_trace_ret: +__invoke_syscall_ret: /* Drop the copied stack arguments */ add sp, sp, #S_OFF pop {r4 - r10, lr} ARM( mov pc, lr ) THUMB( bx lr ) -SYM_FUNC_END(invoke_syscall_trace_asm) +SYM_FUNC_END(invoke_syscall_asm) #ifdef CONFIG_OABI_COMPAT diff --git a/arch/arm/kernel/syscall.c b/arch/arm/kernel/syscall.c index 36330023b5484399a4ca2fdb5727b410e2c74b6f..6f518ec3870fb36a64d1b671b20f96d63a52bf78 100644 --- a/arch/arm/kernel/syscall.c +++ b/arch/arm/kernel/syscall.c @@ -8,10 +8,10 @@ static inline bool has_syscall_work(unsigned long flags) return unlikely(flags & _TIF_SYSCALL_WORK); } -int invoke_syscall_trace_asm(void *table, struct pt_regs *regs, int scno); -__ADDRESSABLE(invoke_syscall_trace_asm); +int invoke_syscall_asm(void *table, struct pt_regs *regs, int scno); +__ADDRESSABLE(invoke_syscall_asm); -__visible int invoke_syscall_trace(void *table, struct pt_regs *regs, int scno) +__visible int invoke_syscall(void *table, struct pt_regs *regs, int scno) { unsigned long flags = read_thread_flags(); int ret; @@ -23,7 +23,7 @@ __visible int invoke_syscall_trace(void *table, struct pt_regs *regs, int scno) } if (scno < NR_syscalls) { - ret = invoke_syscall_trace_asm(table, regs, scno); + ret = invoke_syscall_asm(table, regs, scno); goto exit_save; } -- 2.47.1