*参照元 [#u2ea5546] #backlinks *説明 [#d482113c] -パス: [[linux-4.4.1/arch/arm64/include/asm/uaccess.h]] -FIXME: これは何? --説明 **引数 [#b85af36b] -addr -- -size -- **返り値 [#df40a83e] -unsigned long -- **参考 [#i8d2befb] *実装 [#c206cf71] /* * Test whether a block of memory is a valid user space address. * Returns 1 if the range is valid, 0 otherwise. * * This is equivalent to the following test: * (u65)addr + (u65)size <= current->addr_limit * * This needs 65-bit arithmetic. */ #define __range_ok(addr, size) \ ({ \ unsigned long flag, roksum; \ __chk_user_ptr(addr); \ - --[[linux-4.4.1/__chk_user_ptr()]] asm("adds %1, %1, %3; ccmp %1, %4, #2, cc; cset %0, ls" \ : "=&r" (flag), "=&r" (roksum) \ : "1" (addr), "Ir" (size), \ "r" (current_thread_info()->addr_limit) \ : "cc"); \ - --[[linux-4.4.1/current_thread_info()]] flag; \ }) *コメント [#y00f49e8]