From patchwork Sat Jun 9 15:17:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sedat Dilek X-Patchwork-Id: 10455979 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AF8466028A for ; Sat, 9 Jun 2018 15:17:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 885262267B for ; Sat, 9 Jun 2018 15:17:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7AFF2228C9; Sat, 9 Jun 2018 15:17:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B1E072267B for ; Sat, 9 Jun 2018 15:17:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C50006B0293; Sat, 9 Jun 2018 11:17:08 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id BD6AA6B0295; Sat, 9 Jun 2018 11:17:08 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A78366B0296; Sat, 9 Jun 2018 11:17:08 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-lf0-f71.google.com (mail-lf0-f71.google.com [209.85.215.71]) by kanga.kvack.org (Postfix) with ESMTP id 06A2B6B0293 for ; Sat, 9 Jun 2018 11:17:08 -0400 (EDT) Received: by mail-lf0-f71.google.com with SMTP id y17-v6so5054020lfe.14 for ; Sat, 09 Jun 2018 08:17:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:mime-version:reply-to:in-reply-to :references:from:date:message-id:subject:to:cc; bh=bgkdrFqKYt0BzKdeQyyxtmCmrB1hTYAFTeURlJt0h0w=; b=CBukGcz209D8VfNoG85u8H6e0b/wrfg0dUNl67ppg4gN7gDDBqjhFKM4ie1Zt+9RaO 7CoVKpncgksRvr39wpd92vY2dc4dv4ePGEa8Dv1Hwxw/tOwGl3s91/BeALw+1312ZiYU 4yFQXqQqhRCMFqxAhFHEIuUsy6vsWLV8Z1/nasoqp3Y+GJ9ceBBG7l/Smbtw1hmvmZDs A0PcIHwPU1LqDVemEChrjzN8onWdx58Uw0OoDUAExINix1fPu35pFEjydo/v8aZ80SEe B3etilR62ICbneGtA/UWsrIMBG/cR6wVKxr2OGX+sFSA/Ujhy8C3c3zfaUmh4BNWdcON G6IQ== X-Gm-Message-State: APt69E0XPOgRgMQ/mxyMfgcHoPqU3nG2DykLInXnuzQ7jA07V36EouNb 9C61IiHbGBF4qGKHpgGL/YfcBmuMsRddqB+qT2jgKDFquz2D4rvc6QthktkKwQ3R+E43oZ3hdsG vYY2b+M/GiDYFHfD1NchTCtNTBxECJDTH9WMySAp3HxF0jw7LKrqRRhaHMshrW64kDiGBRj0qYn dLQCxAXrIRbpSAusblosDztiFvLbl0/1OM/Zqi1r7Q5RkJI+DWU4B/5L/Q4biJoyyQZLegwFhqZ e7d5W7oE7Jf6JeUehsYUZOn63XD03QFrXFQlon6dxqYy/Aydhv+lYopezGZT8T322YDJ4T+cNwS wZQYlz0k81OqrQIKVLawWR26BVO5TtOHlos0FcbJ8wpsdk+E1O8KjnoyJD7+W00Nwd1aauo99pC L X-Received: by 2002:a2e:93c9:: with SMTP id p9-v6mr5246947ljh.117.1528557427257; Sat, 09 Jun 2018 08:17:07 -0700 (PDT) X-Received: by 2002:a2e:93c9:: with SMTP id p9-v6mr5246896ljh.117.1528557425702; Sat, 09 Jun 2018 08:17:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528557425; cv=none; d=google.com; s=arc-20160816; b=bHG5s8iIgEJJ5V+3J2bNIh+ltF5FBkiZx4DHWhhV/uWMvWr+W+Rv3R6lgHwjYqhN0V F2Qzp+IYNI6dvX0QQL3UOPsz4Al8J+vg/cnDqHdHyE1WYLvD2+H9cZDFV/zAPySYV3NH 3EpIt4wmlukQCdI2AFathQcViuctA+1/KRO1colVBMLinKnAtIwEA/3N16GxCRx8knud nyE3s02sehbmf2WpMS3ghfsG2nn1778diqM7BWOSrGFaGGYFRjWTs4eKgmwbWq/yoWhT 0X4UM7uoW2KYoNqDoUTLVvak1GDw61W4Fsa5w8WIYx3qTK8Ed/ThoeSdHbueX0GCaTqu 98Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:references:in-reply-to:reply-to :mime-version:dkim-signature:arc-authentication-results; bh=bgkdrFqKYt0BzKdeQyyxtmCmrB1hTYAFTeURlJt0h0w=; b=smC712KebsOfBEHZxeI1B9eYh5n8PW14qXhWGNGfmeU+CRMZfa+/bbB7CjKubp/sYh kSfYXyOH5k0973dS4Hm97c9lZnbPK8r0GgurHDCpiQU9ZtFcrfFJd6As0X64g3RxNGJR P6ehnsGACvBCKDk7wBSKzMn+HAMIY+x5P5L6NjlTpWunRymFxa7JKvcY7KIM0LA84yoO 4dO17UBDTKsFzPhbXiYvEcIjP3ClA27b4kXB3seFSdJNY0wROSoPjYMPWiKkMExpla9Q my/xe5IQow14iANzhdceS1ng0NzErwq64ov1kfN8zi8o8jNiiBaDm0uTF4BiWuIgvn0l Y53w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qeAUce/L; spf=pass (google.com: domain of sedat.dilek@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=sedat.dilek@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id z144-v6sor6393328lff.44.2018.06.09.08.17.05 for (Google Transport Security); Sat, 09 Jun 2018 08:17:05 -0700 (PDT) Received-SPF: pass (google.com: domain of sedat.dilek@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qeAUce/L; spf=pass (google.com: domain of sedat.dilek@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=sedat.dilek@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=bgkdrFqKYt0BzKdeQyyxtmCmrB1hTYAFTeURlJt0h0w=; b=qeAUce/L7lRInVC1t++7o0All+4fPyXmZqmueRn3oV35sWXCuPJDLOaqLHqmItd1AC I4wvH0CJnoQVvpptkToFBZjU/H9WQQowAX2fJKJj+ip2Vk4fnlVRW5u59dp6cR3Z/lon Sk++dLZXGouVdk4YxGOHrY+2XXlhSa0Monqhl6vYpQ7sHqtc+yTuN0ArMkS79xE7zMQJ i5Ij94NEtJheIJ6iJMA008C6axQBxz3mMKzYRQq1McGvLggqPV9whOZ+DLBbalB0FW1g XCRaqxAFlYRvCg9FeO9f50VFCSMNpqfgrmXQFQG0HCisjeKviN2UcUbyrpel7Elk1gKn ybkw== X-Google-Smtp-Source: ADUXVKJhdJwWU2M4bJ9s3l1NfRv3A10lVOJi74U4rSBsqSgd2GbU6QBhGcq69xxU57MdQKZKYnNg7Uly3sDyy2tyfTk= X-Received: by 2002:a19:de0a:: with SMTP id v10-v6mr6152201lfg.94.1528557425124; Sat, 09 Jun 2018 08:17:05 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:b87:0:0:0:0:0 with HTTP; Sat, 9 Jun 2018 08:17:04 -0700 (PDT) Reply-To: sedat.dilek@gmail.com In-Reply-To: References: <20180319172902.GB37438@google.com> <99fbbbe3-df05-446b-9ce0-55787ea038f3@googlegroups.com> From: Sedat Dilek Date: Sat, 9 Jun 2018 17:17:04 +0200 Message-ID: Subject: Re: clang fails on linux-next since commit 8bf705d13039 To: Dmitry Vyukov Cc: kasan-dev , Matthias Kaehlcke , Linux-MM , llvmlinux@lists.linuxfoundation.org, Nick Desaulniers X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Hi, I played a bit more with this. I was irritated when I saw in my full make lines -fstack-protector-strong and -fno-stack-protector simultaneously, especially in x86/vdso. First, I tried... CC_STACKPROTECTOR_NONE n -> y CC_STACKPROTECTOR_STRONG y -> n This breaks at the same place in the same way (see attached file). Then I tried to filter-out -fstack-protector-strong in the relevant code parts with CC_STACKPROTECTOR_STRONG=y... @@ -141,6 +142,7 @@ KBUILD_CFLAGS_32 := $(filter-out -mcmodel=kernel,$(KBUILD_CFLAGS_32)) KBUILD_CFLAGS_32 := $(filter-out -fno-pic,$(KBUILD_CFLAGS_32)) KBUILD_CFLAGS_32 := $(filter-out -mfentry,$(KBUILD_CFLAGS_32)) KBUILD_CFLAGS_32 := $(filter-out $(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS_32)) +KBUILD_CFLAGS_32 := $(filter-out -fstack-protector-strong,$(KBUILD_CFLAGS_32)) KBUILD_CFLAGS_32 += -m32 -msoft-float -mregparm=0 -fpic KBUILD_CFLAGS_32 += $(call cc-option, -fno-stack-protector) KBUILD_CFLAGS_32 += $(call cc-option, -foptimize-sibling-calls) This breaks... if [ "" = "-pg" ]; then if [ arch/x86/entry/vdso/vgetcpu.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount "arch/x86/entry/vdso/vgetcpu.o"; fi; fi; mycompiler -nostdlib -o arch/x86/entry/vdso/vdso64.so.dbg -fPIC -shared -Wl,--hash-style=both -Wl,--build-id -Wl,-Bsymbolic -m64 -Wl,-soname=linux-vdso.so.1 -Wl,--no-undefined -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 -Wl,-T,arch/x86/entry/vdso/vdso.lds arch/x86/entry/vdso/vdso-note.o arch/x86/entry/vdso/vclock_gettime.o arch/x86/entry/vdso/vgetcpu.o && sh ./arch/x86/entry/vdso/checkundef.sh 'nm' 'arch/x86/entry/vdso/vdso64.so.dbg' /usr/bin/ld: arch/x86/entry/vdso/vclock_gettime.o: relocation R_X86_64_32S against undefined hidden symbol `vvar_vsyscall_gtod_data' can not be used when making a shared object /usr/bin/ld: final link failed: Nonrepresentable section on output clang: error: linker command failed with exit code 1 (use -v to see invocation) objcopy -S --localize-hidden arch/x86/entry/vdso/vdso64.so.dbg arch/x86/entry/vdso/vdso64.so objcopy: 'arch/x86/entry/vdso/vdso64.so.dbg': No such file arch/x86/entry/vdso/Makefile:124: recipe for target 'arch/x86/entry/vdso/vdso64.so' failed make[6]: *** [arch/x86/entry/vdso/vdso64.so] Error 1 Cannot say stack-protector kconfig settings have an impact on this all. Thanks. Regards, - Sedat - if [ "-pg" = "-pg" ]; then if [ arch/x86/entry/vdso/vdso-image-64.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount "arch/x86/entry/vdso/vdso-image-64.o"; fi; fi; mycompiler -E -Wp,-MD,arch/x86/entry/vdso/vdso32/.vdso32.lds.d -nostdinc -isystem /usr/lib/llvm-7/lib/clang/7.0.0/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -DCONFIG_CC_STACKPROTECTOR -Qunused-arguments -P -C -P -Ux86 -D__ASSEMBLY__ -DLINKER_SCRIPT -o arch/x86/entry/vdso/vdso32/vdso32.lds arch/x86/entry/vdso/vdso32/vdso32.lds.S mycompiler -Wp,-MD,arch/x86/entry/vdso/vdso32/.vclock_gettime.o.d -nostdinc -isystem /usr/lib/llvm-7/lib/clang/7.0.0/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -DCONFIG_CC_STACKPROTECTOR -Qunused-arguments -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -no-integrated-as -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno-80387 -mstack-alignment=8 -mtune=generic -mno-red-zone -funit-at-a-time -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mretpoline-external-thunk -DRETPOLINE -O2 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-format-invalid-specifier -Wno-gnu -Wno-address-of-packed-member -Wno-tautological-compare -mno-global-merge -Wno-unused-const-variable -g -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fno-stack-check -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Wno-initializer-overrides -Wno-unused-value -Wno-format -Wno-sign-compare -Wno-format-zero-length -Wno-uninitialized -m32 -msoft-float -mregparm=0 -fpic -fno-stack-protector -foptimize-sibling-calls -fno-omit-frame-pointer -DDISABLE_BRANCH_PROFILING -DKBUILD_BASENAME='"vclock_gettime"' -DKBUILD_MODNAME='"vclock_gettime"' -c -o arch/x86/entry/vdso/vdso32/.tmp_vclock_gettime.o arch/x86/entry/vdso/vdso32/vclock_gettime.c In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31: In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15: In file included from ./arch/x86/include/asm/vgtod.h:6: In file included from ./include/linux/clocksource.h:13: In file included from ./include/linux/timex.h:56: In file included from ./include/uapi/linux/timex.h:56: In file included from ./include/linux/time.h:6: In file included from ./include/linux/seqlock.h:36: In file included from ./include/linux/spinlock.h:51: In file included from ./include/linux/preempt.h:81: In file included from ./arch/x86/include/asm/preempt.h:7: In file included from ./include/linux/thread_info.h:38: In file included from ./arch/x86/include/asm/thread_info.h:53: In file included from ./arch/x86/include/asm/cpufeature.h:5: In file included from ./arch/x86/include/asm/processor.h:21: In file included from ./arch/x86/include/asm/msr.h:67: In file included from ./arch/x86/include/asm/atomic.h:283: ./include/asm-generic/atomic-instrumented.h:365:10: error: invalid output size for constraint '=a' return arch_cmpxchg((u64 *)ptr, (u64)old, (u64)new); ^ ./arch/x86/include/asm/cmpxchg.h:149:2: note: expanded from macro 'arch_cmpxchg' __cmpxchg(ptr, old, new, sizeof(*(ptr))) ^ ./arch/x86/include/asm/cmpxchg.h:134:2: note: expanded from macro '__cmpxchg' __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX) ^ ./arch/x86/include/asm/cmpxchg.h:95:17: note: expanded from macro '__raw_cmpxchg' : "=a" (__ret), "+m" (*__ptr) \ ^ In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31: In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15: In file included from ./arch/x86/include/asm/vgtod.h:6: In file included from ./include/linux/clocksource.h:13: In file included from ./include/linux/timex.h:56: In file included from ./include/uapi/linux/timex.h:56: In file included from ./include/linux/time.h:6: In file included from ./include/linux/seqlock.h:36: In file included from ./include/linux/spinlock.h:51: In file included from ./include/linux/preempt.h:81: In file included from ./arch/x86/include/asm/preempt.h:7: In file included from ./include/linux/thread_info.h:38: In file included from ./arch/x86/include/asm/thread_info.h:53: In file included from ./arch/x86/include/asm/cpufeature.h:5: In file included from ./arch/x86/include/asm/processor.h:21: In file included from ./arch/x86/include/asm/msr.h:67: In file included from ./arch/x86/include/asm/atomic.h:283: ./include/asm-generic/atomic-instrumented.h:365:10: error: invalid output size for constraint '=a' ./arch/x86/include/asm/cmpxchg.h:149:2: note: expanded from macro 'arch_cmpxchg' __cmpxchg(ptr, old, new, sizeof(*(ptr))) ^ ./arch/x86/include/asm/cmpxchg.h:134:2: note: expanded from macro '__cmpxchg' __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX) ^ ./arch/x86/include/asm/cmpxchg.h:104:17: note: expanded from macro '__raw_cmpxchg' : "=a" (__ret), "+m" (*__ptr) \ ^ In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31: In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15: In file included from ./arch/x86/include/asm/vgtod.h:6: In file included from ./include/linux/clocksource.h:13: In file included from ./include/linux/timex.h:56: In file included from ./include/uapi/linux/timex.h:56: In file included from ./include/linux/time.h:6: In file included from ./include/linux/seqlock.h:36: In file included from ./include/linux/spinlock.h:51: In file included from ./include/linux/preempt.h:81: In file included from ./arch/x86/include/asm/preempt.h:7: In file included from ./include/linux/thread_info.h:38: In file included from ./arch/x86/include/asm/thread_info.h:53: In file included from ./arch/x86/include/asm/cpufeature.h:5: In file included from ./arch/x86/include/asm/processor.h:21: In file included from ./arch/x86/include/asm/msr.h:67: In file included from ./arch/x86/include/asm/atomic.h:283: ./include/asm-generic/atomic-instrumented.h:365:10: error: invalid output size for constraint '=a' ./arch/x86/include/asm/cmpxchg.h:149:2: note: expanded from macro 'arch_cmpxchg' __cmpxchg(ptr, old, new, sizeof(*(ptr))) ^ ./arch/x86/include/asm/cmpxchg.h:134:2: note: expanded from macro '__cmpxchg' __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX) ^ ./arch/x86/include/asm/cmpxchg.h:113:17: note: expanded from macro '__raw_cmpxchg' : "=a" (__ret), "+m" (*__ptr) \ ^ In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31: In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15: In file included from ./arch/x86/include/asm/vgtod.h:6: In file included from ./include/linux/clocksource.h:13: In file included from ./include/linux/timex.h:56: In file included from ./include/uapi/linux/timex.h:56: In file included from ./include/linux/time.h:6: In file included from ./include/linux/seqlock.h:36: In file included from ./include/linux/spinlock.h:51: In file included from ./include/linux/preempt.h:81: In file included from ./arch/x86/include/asm/preempt.h:7: In file included from ./include/linux/thread_info.h:38: In file included from ./arch/x86/include/asm/thread_info.h:53: In file included from ./arch/x86/include/asm/cpufeature.h:5: In file included from ./arch/x86/include/asm/processor.h:21: In file included from ./arch/x86/include/asm/msr.h:67: In file included from ./arch/x86/include/asm/atomic.h:283: ./include/asm-generic/atomic-instrumented.h:365:10: error: invalid output size for constraint '=a' ./arch/x86/include/asm/cmpxchg.h:149:2: note: expanded from macro 'arch_cmpxchg' __cmpxchg(ptr, old, new, sizeof(*(ptr))) ^ ./arch/x86/include/asm/cmpxchg.h:134:2: note: expanded from macro '__cmpxchg' __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX) ^ ./arch/x86/include/asm/cmpxchg.h:122:17: note: expanded from macro '__raw_cmpxchg' : "=a" (__ret), "+m" (*__ptr) \ ^ In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31: In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15: In file included from ./arch/x86/include/asm/vgtod.h:6: In file included from ./include/linux/clocksource.h:13: In file included from ./include/linux/timex.h:56: In file included from ./include/uapi/linux/timex.h:56: In file included from ./include/linux/time.h:6: In file included from ./include/linux/seqlock.h:36: In file included from ./include/linux/spinlock.h:51: In file included from ./include/linux/preempt.h:81: In file included from ./arch/x86/include/asm/preempt.h:7: In file included from ./include/linux/thread_info.h:38: In file included from ./arch/x86/include/asm/thread_info.h:53: In file included from ./arch/x86/include/asm/cpufeature.h:5: In file included from ./arch/x86/include/asm/processor.h:21: In file included from ./arch/x86/include/asm/msr.h:67: In file included from ./arch/x86/include/asm/atomic.h:283: ./include/asm-generic/atomic-instrumented.h:391:10: error: invalid output size for constraint '=a' return arch_sync_cmpxchg((u64 *)ptr, (u64)old, (u64)new); ^ ./arch/x86/include/asm/cmpxchg.h:152:2: note: expanded from macro 'arch_sync_cmpxchg' __sync_cmpxchg(ptr, old, new, sizeof(*(ptr))) ^ ./arch/x86/include/asm/cmpxchg.h:137:2: note: expanded from macro '__sync_cmpxchg' __raw_cmpxchg((ptr), (old), (new), (size), "lock; ") ^ ./arch/x86/include/asm/cmpxchg.h:95:17: note: expanded from macro '__raw_cmpxchg' : "=a" (__ret), "+m" (*__ptr) \ ^ In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31: In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15: In file included from ./arch/x86/include/asm/vgtod.h:6: In file included from ./include/linux/clocksource.h:13: In file included from ./include/linux/timex.h:56: In file included from ./include/uapi/linux/timex.h:56: In file included from ./include/linux/time.h:6: In file included from ./include/linux/seqlock.h:36: In file included from ./include/linux/spinlock.h:51: In file included from ./include/linux/preempt.h:81: In file included from ./arch/x86/include/asm/preempt.h:7: In file included from ./include/linux/thread_info.h:38: In file included from ./arch/x86/include/asm/thread_info.h:53: In file included from ./arch/x86/include/asm/cpufeature.h:5: In file included from ./arch/x86/include/asm/processor.h:21: In file included from ./arch/x86/include/asm/msr.h:67: In file included from ./arch/x86/include/asm/atomic.h:283: ./include/asm-generic/atomic-instrumented.h:391:10: error: invalid output size for constraint '=a' ./arch/x86/include/asm/cmpxchg.h:152:2: note: expanded from macro 'arch_sync_cmpxchg' __sync_cmpxchg(ptr, old, new, sizeof(*(ptr))) ^ ./arch/x86/include/asm/cmpxchg.h:137:2: note: expanded from macro '__sync_cmpxchg' __raw_cmpxchg((ptr), (old), (new), (size), "lock; ") ^ ./arch/x86/include/asm/cmpxchg.h:104:17: note: expanded from macro '__raw_cmpxchg' : "=a" (__ret), "+m" (*__ptr) \ ^ In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31: In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15: In file included from ./arch/x86/include/asm/vgtod.h:6: In file included from ./include/linux/clocksource.h:13: In file included from ./include/linux/timex.h:56: In file included from ./include/uapi/linux/timex.h:56: In file included from ./include/linux/time.h:6: In file included from ./include/linux/seqlock.h:36: In file included from ./include/linux/spinlock.h:51: In file included from ./include/linux/preempt.h:81: In file included from ./arch/x86/include/asm/preempt.h:7: In file included from ./include/linux/thread_info.h:38: In file included from ./arch/x86/include/asm/thread_info.h:53: In file included from ./arch/x86/include/asm/cpufeature.h:5: In file included from ./arch/x86/include/asm/processor.h:21: In file included from ./arch/x86/include/asm/msr.h:67: In file included from ./arch/x86/include/asm/atomic.h:283: ./include/asm-generic/atomic-instrumented.h:391:10: error: invalid output size for constraint '=a' ./arch/x86/include/asm/cmpxchg.h:152:2: note: expanded from macro 'arch_sync_cmpxchg' __sync_cmpxchg(ptr, old, new, sizeof(*(ptr))) ^ ./arch/x86/include/asm/cmpxchg.h:137:2: note: expanded from macro '__sync_cmpxchg' __raw_cmpxchg((ptr), (old), (new), (size), "lock; ") ^ ./arch/x86/include/asm/cmpxchg.h:113:17: note: expanded from macro '__raw_cmpxchg' : "=a" (__ret), "+m" (*__ptr) \ ^ In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31: In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15: In file included from ./arch/x86/include/asm/vgtod.h:6: In file included from ./include/linux/clocksource.h:13: In file included from ./include/linux/timex.h:56: In file included from ./include/uapi/linux/timex.h:56: In file included from ./include/linux/time.h:6: In file included from ./include/linux/seqlock.h:36: In file included from ./include/linux/spinlock.h:51: In file included from ./include/linux/preempt.h:81: In file included from ./arch/x86/include/asm/preempt.h:7: In file included from ./include/linux/thread_info.h:38: In file included from ./arch/x86/include/asm/thread_info.h:53: In file included from ./arch/x86/include/asm/cpufeature.h:5: In file included from ./arch/x86/include/asm/processor.h:21: In file included from ./arch/x86/include/asm/msr.h:67: In file included from ./arch/x86/include/asm/atomic.h:283: ./include/asm-generic/atomic-instrumented.h:391:10: error: invalid output size for constraint '=a' ./arch/x86/include/asm/cmpxchg.h:152:2: note: expanded from macro 'arch_sync_cmpxchg' __sync_cmpxchg(ptr, old, new, sizeof(*(ptr))) ^ ./arch/x86/include/asm/cmpxchg.h:137:2: note: expanded from macro '__sync_cmpxchg' __raw_cmpxchg((ptr), (old), (new), (size), "lock; ") ^ ./arch/x86/include/asm/cmpxchg.h:122:17: note: expanded from macro '__raw_cmpxchg' : "=a" (__ret), "+m" (*__ptr) \ ^ In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31: In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15: In file included from ./arch/x86/include/asm/vgtod.h:6: In file included from ./include/linux/clocksource.h:13: In file included from ./include/linux/timex.h:56: In file included from ./include/uapi/linux/timex.h:56: In file included from ./include/linux/time.h:6: In file included from ./include/linux/seqlock.h:36: In file included from ./include/linux/spinlock.h:51: In file included from ./include/linux/preempt.h:81: In file included from ./arch/x86/include/asm/preempt.h:7: In file included from ./include/linux/thread_info.h:38: In file included from ./arch/x86/include/asm/thread_info.h:53: In file included from ./arch/x86/include/asm/cpufeature.h:5: In file included from ./arch/x86/include/asm/processor.h:21: In file included from ./arch/x86/include/asm/msr.h:67: In file included from ./arch/x86/include/asm/atomic.h:283: ./include/asm-generic/atomic-instrumented.h:418:10: error: invalid output size for constraint '=a' return arch_cmpxchg_local((u64 *)ptr, (u64)old, (u64)new); ^ ./arch/x86/include/asm/cmpxchg.h:155:2: note: expanded from macro 'arch_cmpxchg_local' __cmpxchg_local(ptr, old, new, sizeof(*(ptr))) ^ ./arch/x86/include/asm/cmpxchg.h:140:2: note: expanded from macro '__cmpxchg_local' __raw_cmpxchg((ptr), (old), (new), (size), "") ^ ./arch/x86/include/asm/cmpxchg.h:95:17: note: expanded from macro '__raw_cmpxchg' : "=a" (__ret), "+m" (*__ptr) \ ^ In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31: In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15: In file included from ./arch/x86/include/asm/vgtod.h:6: In file included from ./include/linux/clocksource.h:13: In file included from ./include/linux/timex.h:56: In file included from ./include/uapi/linux/timex.h:56: In file included from ./include/linux/time.h:6: In file included from ./include/linux/seqlock.h:36: In file included from ./include/linux/spinlock.h:51: In file included from ./include/linux/preempt.h:81: In file included from ./arch/x86/include/asm/preempt.h:7: In file included from ./include/linux/thread_info.h:38: In file included from ./arch/x86/include/asm/thread_info.h:53: In file included from ./arch/x86/include/asm/cpufeature.h:5: In file included from ./arch/x86/include/asm/processor.h:21: In file included from ./arch/x86/include/asm/msr.h:67: In file included from ./arch/x86/include/asm/atomic.h:283: ./include/asm-generic/atomic-instrumented.h:418:10: error: invalid output size for constraint '=a' ./arch/x86/include/asm/cmpxchg.h:155:2: note: expanded from macro 'arch_cmpxchg_local' __cmpxchg_local(ptr, old, new, sizeof(*(ptr))) ^ ./arch/x86/include/asm/cmpxchg.h:140:2: note: expanded from macro '__cmpxchg_local' __raw_cmpxchg((ptr), (old), (new), (size), "") ^ ./arch/x86/include/asm/cmpxchg.h:104:17: note: expanded from macro '__raw_cmpxchg' : "=a" (__ret), "+m" (*__ptr) \ ^ In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31: In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15: In file included from ./arch/x86/include/asm/vgtod.h:6: In file included from ./include/linux/clocksource.h:13: In file included from ./include/linux/timex.h:56: In file included from ./include/uapi/linux/timex.h:56: In file included from ./include/linux/time.h:6: In file included from ./include/linux/seqlock.h:36: In file included from ./include/linux/spinlock.h:51: In file included from ./include/linux/preempt.h:81: In file included from ./arch/x86/include/asm/preempt.h:7: In file included from ./include/linux/thread_info.h:38: In file included from ./arch/x86/include/asm/thread_info.h:53: In file included from ./arch/x86/include/asm/cpufeature.h:5: In file included from ./arch/x86/include/asm/processor.h:21: In file included from ./arch/x86/include/asm/msr.h:67: In file included from ./arch/x86/include/asm/atomic.h:283: ./include/asm-generic/atomic-instrumented.h:418:10: error: invalid output size for constraint '=a' ./arch/x86/include/asm/cmpxchg.h:155:2: note: expanded from macro 'arch_cmpxchg_local' __cmpxchg_local(ptr, old, new, sizeof(*(ptr))) ^ ./arch/x86/include/asm/cmpxchg.h:140:2: note: expanded from macro '__cmpxchg_local' __raw_cmpxchg((ptr), (old), (new), (size), "") ^ ./arch/x86/include/asm/cmpxchg.h:113:17: note: expanded from macro '__raw_cmpxchg' : "=a" (__ret), "+m" (*__ptr) \ ^ In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31: In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15: In file included from ./arch/x86/include/asm/vgtod.h:6: In file included from ./include/linux/clocksource.h:13: In file included from ./include/linux/timex.h:56: In file included from ./include/uapi/linux/timex.h:56: In file included from ./include/linux/time.h:6: In file included from ./include/linux/seqlock.h:36: In file included from ./include/linux/spinlock.h:51: In file included from ./include/linux/preempt.h:81: In file included from ./arch/x86/include/asm/preempt.h:7: In file included from ./include/linux/thread_info.h:38: In file included from ./arch/x86/include/asm/thread_info.h:53: In file included from ./arch/x86/include/asm/cpufeature.h:5: In file included from ./arch/x86/include/asm/processor.h:21: In file included from ./arch/x86/include/asm/msr.h:67: In file included from ./arch/x86/include/asm/atomic.h:283: ./include/asm-generic/atomic-instrumented.h:418:10: error: invalid output size for constraint '=a' ./arch/x86/include/asm/cmpxchg.h:155:2: note: expanded from macro 'arch_cmpxchg_local' __cmpxchg_local(ptr, old, new, sizeof(*(ptr))) ^ ./arch/x86/include/asm/cmpxchg.h:140:2: note: expanded from macro '__cmpxchg_local' __raw_cmpxchg((ptr), (old), (new), (size), "") ^ ./arch/x86/include/asm/cmpxchg.h:122:17: note: expanded from macro '__raw_cmpxchg' : "=a" (__ret), "+m" (*__ptr) \ ^ 12 errors generated. scripts/Makefile.build:312: recipe for target 'arch/x86/entry/vdso/vdso32/vclock_gettime.o' failed make[6]: *** [arch/x86/entry/vdso/vdso32/vclock_gettime.o] Error 1 scripts/Makefile.build:559: recipe for target 'arch/x86/entry/vdso' failed make[5]: *** [arch/x86/entry/vdso] Error 2 scripts/Makefile.build:559: recipe for target 'arch/x86/entry' failed make[4]: *** [arch/x86/entry] Error 2 Makefile:1063: recipe for target 'arch/x86' failed make[3]: *** [arch/x86] Error 2 debian/rules:4: recipe for target 'build' failed make[2]: *** [build] Error 2 dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 scripts/package/Makefile:79: recipe for target 'bindeb-pkg' failed make[1]: *** [bindeb-pkg] Error 2 Makefile:1408: recipe for target 'bindeb-pkg' failed make: *** [bindeb-pkg] Error 2 diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile index d998a487c9b1..5482e453a8ca 100644 --- a/arch/x86/entry/vdso/Makefile +++ b/arch/x86/entry/vdso/Makefile @@ -73,6 +73,7 @@ CFL := $(PROFILING) -mcmodel=small -fPIC -O2 -fasynchronous-unwind-tables -m64 \ $(filter -g%,$(KBUILD_CFLAGS)) $(call cc-option, -fno-stack-protector) \ -fno-omit-frame-pointer -foptimize-sibling-calls \ -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO +CFL += $(filter-out -fstack-protector-strong,$(KBUILD_CFLAGS)) $(vobjs): KBUILD_CFLAGS := $(filter-out $(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS)) $(CFL)