Skip to content

Commit 2c614c1

Browse files
teknoraverwilldeacon
authored andcommitted
arm64: use shared sysctl constants
Use shared sysctl variables for zero and one constants, as in commit eec4844 ("proc/sysctl: add shared variables for range check") Fixes: 63f0c60 ("arm64: Introduce prctl() options to control the tagged user addresses ABI") Signed-off-by: Matteo Croce <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent 5cb7a11 commit 2c614c1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

arch/arm64/kernel/process.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -608,8 +608,6 @@ long get_tagged_addr_ctrl(void)
608608
* only prevents the tagged address ABI enabling via prctl() and does not
609609
* disable it for tasks that already opted in to the relaxed ABI.
610610
*/
611-
static int zero;
612-
static int one = 1;
613611

614612
static struct ctl_table tagged_addr_sysctl_table[] = {
615613
{
@@ -618,8 +616,8 @@ static struct ctl_table tagged_addr_sysctl_table[] = {
618616
.data = &tagged_addr_disabled,
619617
.maxlen = sizeof(int),
620618
.proc_handler = proc_dointvec_minmax,
621-
.extra1 = &zero,
622-
.extra2 = &one,
619+
.extra1 = SYSCTL_ZERO,
620+
.extra2 = SYSCTL_ONE,
623621
},
624622
{ }
625623
};

0 commit comments

Comments
 (0)