lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4104961b0708082236if0c1199l2bbc468e9d582a08@mail.gmail.com>
Date:	Thu, 9 Aug 2007 13:36:45 +0800
From:	"jidong xiao" <jidong.xiao@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: Question on IS_ERR

I saw we call IS_ERR(ptr) after executing kthread_run() each time.
But we don't need to call IS_ERR(ptr) after kmalloc().

My understanding is,
the kernel pointer ptr for IS_ERR to check should be page aligned, so
its kernel address should be less than 0xfffff000(or 0xffff ffff ffff
f000, 64bits),

kthread_run returns a struct task_struct pointer,which is always page aligned,
however the pointer returned by kmalloc() might not be page aligned,
so we cannot use IS_ERR to check.

Is my understanding correct?

Thanks
Jason
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ