Thank you for the link. I followed the instructions in the link, and I could build kernel with clang without kAsan
However, after setting the CONFIG_KASAN to y through menuconfig, the "make CC=$CLANG_PATH/clang -j64 2>&1 | tee build.log" outputs the following errors. fs/built-in.o: In function `zisofs_readpage': fs/isofs/compress.c:(.text+0x1aecfb): undefined reference to `__asan_alloca_poison' fs/isofs/compress.c:(.text+0x1af270): undefined reference to `__asan_allocas_unpoison' fs/built-in.o: In function `zisofs_uncompress_block': fs/isofs/compress.c:(.text+0x1af4b7): undefined reference to `__asan_alloca_poison' fs/isofs/compress.c:(.text+0x1afad9): undefined reference to `__asan_allocas_unpoison' fs/isofs/compress.c:(.text+0x1afae9): undefined reference to `__asan_allocas_unpoison' crypto/built-in.o: In function `cipher_crypt_unaligned': crypto/cipher.c:(.text+0x1c46): undefined reference to `__asan_alloca_poison' crypto/cipher.c:(.text+0x1c89): undefined reference to `__asan_allocas_unpoison' crypto/built-in.o: In function `shash_update_unaligned': crypto/shash.c:(.text+0xeb26): undefined reference to `__asan_alloca_poison' crypto/shash.c:(.text+0xebb3): undefined reference to `__asan_allocas_unpoison' crypto/built-in.o: In function `shash_final_unaligned': crypto/shash.c:(.text+0xeccd): undefined reference to `__asan_alloca_poison' crypto/shash.c:(.text+0xed21): undefined reference to `__asan_allocas_unpoison' crypto/built-in.o: In function `hmac_setkey': crypto/hmac.c:(.text+0x1180c): undefined reference to `__asan_alloca_poison' crypto/hmac.c:(.text+0x11a65): undefined reference to `__asan_allocas_unpoison' crypto/built-in.o: In function `crypto_cbc_decrypt_inplace': crypto/cbc.c:(.text+0x17ba6): undefined reference to `__asan_alloca_poison' crypto/cbc.c:(.text+0x17c71): undefined reference to `__asan_allocas_unpoison' crypto/built-in.o: In function `crypto_ctr_crypt_inplace': crypto/ctr.c:(.text+0x18ac5): undefined reference to `__asan_alloca_poison' crypto/ctr.c:(.text+0x18b20): undefined reference to `__asan_allocas_unpoison' crypto/built-in.o: In function `crypto_ctr_crypt_final': crypto/ctr.c:(.text+0x18be9): undefined reference to `__asan_alloca_poison' crypto/ctr.c:(.text+0x18c7f): undefined reference to `__asan_allocas_unpoison' drivers/built-in.o: In function `stripe_status': drivers/md/dm-stripe.c:(.text+0x59c3a1): undefined reference to `__asan_alloca_poison' drivers/md/dm-stripe.c:(.text+0x59c619): undefined reference to `__asan_allocas_unpoison' drivers/built-in.o: In function `mirror_status': drivers/md/dm-raid1.c:(.text+0x5a9123): undefined reference to `__asan_alloca_poison' drivers/md/dm-raid1.c:(.text+0x5a95e1): undefined reference to `__asan_allocas_unpoison' drivers/built-in.o: In function `mirror_flush': drivers/md/dm-raid1.c:(.text+0x5aae09): undefined reference to `__asan_alloca_poison' drivers/md/dm-raid1.c:(.text+0x5aaf4f): undefined reference to `__asan_allocas_unpoison' drivers/md/dm-raid1.c:(.text+0x5aaf5d): undefined reference to `__asan_allocas_unpoison' drivers/built-in.o: In function `do_write': drivers/md/dm-raid1.c:(.text+0x5ab9b5): undefined reference to `__asan_alloca_poison' drivers/md/dm-raid1.c:(.text+0x5abc46): undefined reference to `__asan_allocas_unpoison' sound/built-in.o: In function `snd_pcm_hw_refine': (.text+0x1a33f): undefined reference to `__asan_alloca_poison' sound/built-in.o: In function `snd_pcm_hw_refine': (.text+0x1af89): undefined reference to `__asan_allocas_unpoison' sound/built-in.o: In function `snd_pcm_oss_sync': sound/core/oss/pcm_oss.c:(.text+0x3d6d4): undefined reference to `__asan_alloca_poison' sound/core/oss/pcm_oss.c:(.text+0x3d713): undefined reference to `__asan_allocas_unpoison' sound/core/oss/pcm_oss.c:(.text+0x3d8e8): undefined reference to `__asan_allocas_unpoison' net/built-in.o: In function `rtnl_newlink': net/core/rtnetlink.c:(.text+0x5c767): undefined reference to `__asan_alloca_poison' net/core/rtnetlink.c:(.text+0x5c7dd): undefined reference to `__asan_alloca_poison' net/core/rtnetlink.c:(.text+0x5cab5): undefined reference to `__asan_allocas_unpoison' net/core/rtnetlink.c:(.text+0x5d125): undefined reference to `__asan_allocas_unpoison' net/core/rtnetlink.c:(.text+0x5d146): undefined reference to `__asan_allocas_unpoison' net/built-in.o: In function `nfnetlink_rcv_batch': net/netfilter/nfnetlink.c:(.text+0x9fd66): undefined reference to `__asan_allocas_unpoison' net/netfilter/nfnetlink.c:(.text+0x9ff2b): undefined reference to `__asan_alloca_poison' net/netfilter/nfnetlink.c:(.text+0xa0006): undefined reference to `__asan_allocas_unpoison' net/netfilter/nfnetlink.c:(.text+0xa0033): undefined reference to `__asan_allocas_unpoison' net/netfilter/nfnetlink.c:(.text+0xa05ef): undefined reference to `__asan_allocas_unpoison' net/built-in.o: In function `nfnetlink_rcv_msg': net/netfilter/nfnetlink.c:(.text+0xa06bc): undefined reference to `__asan_allocas_unpoison' net/netfilter/nfnetlink.c:(.text+0xa0858): undefined reference to `__asan_alloca_poison' net/netfilter/nfnetlink.c:(.text+0xa09e4): undefined reference to `__asan_allocas_unpoison' net/netfilter/nfnetlink.c:(.text+0xa0a05): undefined reference to `__asan_allocas_unpoison' net/built-in.o: In function `ieee80211_aes_ccm_encrypt': (.text+0x32a807): undefined reference to `__asan_alloca_poison' net/built-in.o: In function `ieee80211_aes_ccm_encrypt': (.text+0x32aaf2): undefined reference to `__asan_allocas_unpoison' net/built-in.o: In function `ieee80211_aes_ccm_encrypt': (.text+0x32ab00): undefined reference to `__asan_allocas_unpoison' net/built-in.o: In function `ieee80211_aes_ccm_decrypt': (.text+0x32ac37): undefined reference to `__asan_alloca_poison' net/built-in.o: In function `ieee80211_aes_ccm_decrypt': (.text+0x32af5b): undefined reference to `__asan_allocas_unpoison' net/built-in.o: In function `ieee80211_aes_ccm_decrypt': (.text+0x32af69): undefined reference to `__asan_allocas_unpoison' net/built-in.o: In function `ieee80211_aes_gcm_encrypt': (.text+0x32b127): undefined reference to `__asan_alloca_poison' net/built-in.o: In function `ieee80211_aes_gcm_encrypt': (.text+0x32b412): undefined reference to `__asan_allocas_unpoison' net/built-in.o: In function `ieee80211_aes_gcm_encrypt': (.text+0x32b420): undefined reference to `__asan_allocas_unpoison' net/built-in.o: In function `ieee80211_aes_gcm_decrypt': (.text+0x32b558): undefined reference to `__asan_alloca_poison' net/built-in.o: In function `ieee80211_aes_gcm_decrypt': (.text+0x32b86d): undefined reference to `__asan_allocas_unpoison' net/built-in.o: In function `ieee80211_aes_gcm_decrypt': (.text+0x32b87b): undefined reference to `__asan_allocas_unpoison' net/built-in.o: In function `ieee80211_aes_gmac': (.text+0x32cb04): undefined reference to `__asan_alloca_poison' net/built-in.o: In function `ieee80211_aes_gmac': (.text+0x32cee9): undefined reference to `__asan_allocas_unpoison' net/built-in.o: In function `ieee80211_aes_gmac': (.text+0x32cef7): undefined reference to `__asan_allocas_unpoison' 2016년 9월 13일 화요일 오후 8시 41분 52초 UTC+9, Glider 님의 말: > > Hello there, > > You can refer to https://github.com/ramosian-glider/clang-kernel-build > for the instructions on how to build the upstream kernel with Clang. > > HTH, > Alex > > On Tue, Sep 13, 2016 at 1:35 PM, WookHyun Han <wookh...@gmail.com > <javascript:>> wrote: > > Hi, > > I'm doing a research to instrument Asan and kAsan further. > > I have found that clang has kAsan implementations. > > Is there any working version of linux kernel that can be compiled by any > clang version with kAsan implementation? > > > > -- > > You received this message because you are subscribed to the Google > Groups "address-sanitizer" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to address-saniti...@googlegroups.com <javascript:>. > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "address-sanitizer" group. To unsubscribe from this group and stop receiving emails from it, send an email to address-sanitizer+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.