arm64: use shared sysctl constants
authorMatteo Croce <mcroce@redhat.com>
Fri, 24 Jan 2020 15:51:27 +0000 (16:51 +0100)
committerWill Deacon <will@kernel.org>
Mon, 10 Feb 2020 11:24:57 +0000 (11:24 +0000)
Use shared sysctl variables for zero and one constants, as in
commit eec4844fae7c ("proc/sysctl: add shared variables for range check")

Fixes: 63f0c6037965 ("arm64: Introduce prctl() options to control the tagged user addresses ABI")
Signed-off-by: Matteo Croce <mcroce@redhat.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/process.c

index bbb0f0c..a480b67 100644 (file)
@@ -608,8 +608,6 @@ long get_tagged_addr_ctrl(void)
  * only prevents the tagged address ABI enabling via prctl() and does not
  * disable it for tasks that already opted in to the relaxed ABI.
  */
-static int zero;
-static int one = 1;
 
 static struct ctl_table tagged_addr_sysctl_table[] = {
        {
@@ -618,8 +616,8 @@ static struct ctl_table tagged_addr_sysctl_table[] = {
                .data           = &tagged_addr_disabled,
                .maxlen         = sizeof(int),
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
        { }
 };