forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/arch/x86/kernel/uprobes.c
....@@ -1,19 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * User-space Probes (UProbes) for x86
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation; either version 2 of the License, or
7
- * (at your option) any later version.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU General Public License
15
- * along with this program; if not, write to the Free Software
16
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
174 *
185 * Copyright (C) IBM Corporation, 2008-2011
196 * Authors:
....@@ -750,6 +737,7 @@
750737 * OPCODE1() of the "short" jmp which checks the same condition.
751738 */
752739 opc1 = OPCODE2(insn) - 0x10;
740
+ fallthrough;
753741 default:
754742 if (!is_cond_jmp_opcode(opc1))
755743 return -ENOSYS;
....@@ -856,8 +844,8 @@
856844
857845 /**
858846 * arch_uprobe_analyze_insn - instruction analysis including validity and fixups.
847
+ * @auprobe: the probepoint information.
859848 * @mm: the probed address space.
860
- * @arch_uprobe: the probepoint information.
861849 * @addr: virtual address at which to install the probepoint
862850 * Return 0 on success or a -ve number on error.
863851 */
....@@ -906,7 +894,7 @@
906894 fix_ip_or_call = 0;
907895 break;
908896 }
909
- /* fall through */
897
+ fallthrough;
910898 default:
911899 riprel_analyze(auprobe, &insn);
912900 }
....@@ -1091,7 +1079,7 @@
10911079 pr_err("return address clobbered: pid=%d, %%sp=%#lx, %%ip=%#lx\n",
10921080 current->pid, regs->sp, regs->ip);
10931081
1094
- force_sig(SIGSEGV, current);
1082
+ force_sig(SIGSEGV);
10951083 }
10961084
10971085 return -1;