Skip to content
Commit 10ea25c2 authored by Bixuan Cui's avatar Bixuan Cui Committed by Yang Yingliang
Browse files

powerpc: fix a compiling error for 'access_ok'



hulk inclusion
category: bugfix
bugzilla: NA
CVE: NA

An error is reported during powerpc platform compilation because
VERIFY_WRITE is already removed in powerpc platform.

    ./arch/powerpc/include/asm/uaccess.h: In function ‘clear_user’:
    ./arch/powerpc/include/asm/uaccess.h:446:48: error: macro "access_ok" passed 3 arguments, but takes just 2
      if (likely(access_ok(VERIFY_WRITE, addr, size))) {
                                                    ^
    In file included from ./include/asm-generic/div64.h:25:0,
                     from ./arch/powerpc/include/generated/asm/div64.h:1,
                     from ./include/linux/math64.h:6,
                     from ./include/linux/time64.h:5,
                     from ./include/linux/compat_time.h:6,
                     from ./include/linux/compat.h:10,
                     from arch/powerpc/kernel/asm-offsets.c:16:
    ./arch/powerpc/include/asm/uaccess.h:446:13: error: ‘access_ok’ undeclared (first use in this function)
      if (likely(access_ok(VERIFY_WRITE, addr, size))) {
                 ^
    ./include/linux/compiler.h:76:40: note: in definition of macro ‘likely’
     # define likely(x) __builtin_expect(!!(x), 1)
                                            ^
    ./arch/powerpc/include/asm/uaccess.h:446:13: note: each undeclared identifier is reported only once for each function it appears in
      if (likely(access_ok(VERIFY_WRITE, addr, size))) {
                 ^
    ./include/linux/compiler.h:76:40: note: in definition of macro ‘likely’
     # define likely(x) __builtin_expect(!!(x), 1)
                                            ^
    Kbuild:56: recipe for target 'arch/powerpc/kernel/asm-offsets.s' failed

Fixes: 837baab68b87 ("powerpc: Add a framework for user access tracking")
Fixes: a10f8b4fe993 ("powerpc: Implement user_access_begin and friends")

Signed-off-by: default avatarBixuan Cui <cuibixuan@huawei.com>
Reviewed-by: default avatarHanjun Guo <guohanjun@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarCheng Jian <cj.chengjian@huawei.com>
parent 9ced0cc2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment