Received: by 10.192.165.148 with SMTP id m20csp1858783imm; Sun, 6 May 2018 00:58:34 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpNDn40VN/SlwdkmPBvFW9tecA7HprOe7t5Cboh+mRMcY8q7ln8XKd6ow8nEs9DOEHU9rS+ X-Received: by 2002:a17:902:aa4b:: with SMTP id c11-v6mr33877252plr.17.1525593514025; Sun, 06 May 2018 00:58:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525593513; cv=none; d=google.com; s=arc-20160816; b=uPr9mP1GFPD7b1eyrjvQ8iR1ybUv8x8+ZdrGxKlw8PW8130rkwaT6dxGcRS4YML9Nh vkaZ8mocdoyS1xe5HQzXM7vHNF3VBYxjMmxG3mLQCApahUt/F0jxc80ZiJun5zal3XAb F0Rsw/7Dckm/DMQNV9dohfWsn/C7ODvi01723QRl/ZAGCUUjWwNlnowd/bRSyG9+cycY 8oLFcNdhDuH+fjBOUDqCh1EquSZ+axrDD1vMe9YBGmsDG/gQTiU6iXFCBHHbBMRpG0ub r8pqpgYlZJX1k3TkOw33+f0g8n6RhJK6YutRpIaywD0xJhLu0gfAZmNbTuLGRqpoCBbb dytQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:reply-to:mime-version:dkim-signature :arc-authentication-results; bh=+L5wAwnqpe2ZFFl1/t0rq5frgPuPq/Gdy1h5EfElHEc=; b=m5JDMiHc003R5YiWucyrifLeTno2M1zCFEdHvAAmnzkLQFZMLdnNW9OPjUf34H3sqv JH68e10xVgNm/XiYUIEm/H5aGPdIUsi+7p5VHc/XMvfVC4NLC4BdIT6FsO6HuB/EQl09 A/IKnU3VDpOPiUwmSer50do3W6ippvq2C1mg3sM8A0lLbHuEnXy4dNyFz0pj9cAYkkH5 H7zB483eArGV8kDEJtQ302kVDO4of0FoPhx+iKy+9GjK6tbiQd08ccSnXUP7DMei6vb5 CkuuyxvrY7t55iymp0RYcYX1upUWTc4t8HPdAyjAalUZZL1QW/O6Rd3LquiLPSydyJc2 ekcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EOQYsSGl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b77si19704210pfc.320.2018.05.06.00.58.19; Sun, 06 May 2018 00:58:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EOQYsSGl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751266AbeEFH6J (ORCPT + 99 others); Sun, 6 May 2018 03:58:09 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:44668 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750981AbeEFH6G (ORCPT ); Sun, 6 May 2018 03:58:06 -0400 Received: by mail-lf0-f65.google.com with SMTP id h197-v6so36311147lfg.11 for ; Sun, 06 May 2018 00:58:05 -0700 (PDT) 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=+L5wAwnqpe2ZFFl1/t0rq5frgPuPq/Gdy1h5EfElHEc=; b=EOQYsSGlD/qIRHdodE9xNJACBkFkrXFxLjr88bHW1fRzylIDK79yxPmFdZbwQhuBN+ GGoL9dG4ZE8ctskVVFBbERUQrNG1eusgBghyP547GoAcibKCLSEsgZQpqsfTlfeSH22R CYoK+eChedXmlrTTfsHD+qVK4G+5dDhTVBK9gf0nGuCcKtfkd7mOHOzxhVVBOR6GnBg7 lYbap7kw+jBiLNLUsv2/xRuLaEVtrHk+cAXRdexx8dIcawRAv6sy8FlcQhXCvHcGfT7m SfjMwgzwfL3RjkpJg9sauLdHM4pE5e1FfiJujIa9upQP/F96gaKgL7tAKRvSghlQsYRP tSFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=+L5wAwnqpe2ZFFl1/t0rq5frgPuPq/Gdy1h5EfElHEc=; b=UsQfQT2J/PObREyxyqrKpu3vidzANsOjnNHEcGBG+vnByFc6MN1V83bo4fcjlCpFUB r4gZsIjnPjTb03Rha3VnfRBfuIv8mCQUIZDJcB9Y1jR2Sgq2I7qS8D4KkyG5rfLMGknw asmyz/FI/vX+cKyXGhlkN6RWoZtsxKR/9+D76JdyALgCzxPX0Frn/R2/TNOLNsf0b+nU ab2f9WyZZzl/7ZzUSfbbnmhHhZCpAIoU9ZfXNdUdwiuRm9B4UJ5E/1GteRUJ9j/Y7WDL sNveKK7Qrhq9d7DjsgyERhce7jHZ+MxgMJmBgQQNkDgfywzZA4vlcbYIzz76ic5W7VQk mJvw== X-Gm-Message-State: ALQs6tAezh697DBCKnmjidte2s2+BsQSAoVGxnJXC8ltL5Ys7t3A1ri2 NInrExy9pY5Y33vFgOFd6V70OcLp/lFhwsyQEe8BSw== X-Received: by 2002:a19:164f:: with SMTP id m76-v6mr22361337lfi.27.1525593485098; Sun, 06 May 2018 00:58:05 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:d58e:0:0:0:0:0 with HTTP; Sun, 6 May 2018 00:58:04 -0700 (PDT) Reply-To: sedat.dilek@gmail.com In-Reply-To: References: <20180423174224.GA243180@google.com> From: Sedat Dilek Date: Sun, 6 May 2018 09:58:04 +0200 Message-ID: Subject: Re: Clang patch stacks for LTS kernels (v4.4 and v4.9) and status update To: Dmitry Vyukov Cc: Matthias Kaehlcke , lkml , Arnd Bergmann , Nick Desaulniers Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 6, 2018 at 9:41 AM, Dmitry Vyukov wrote: > On Sun, May 6, 2018 at 8:35 AM, Sedat Dilek wrote: >> On Mon, Apr 23, 2018 at 7:42 PM, Matthias Kaehlcke wrote: >> [...] >>>> [ ASM-GOTO ] >>>> >>>> Foremore, I have seen you have a "refs/sandbox/mka/llvm/v4.14" Git branch. >>>> Linux v4.14 is also an LTS release. >>> >>> Yes, there is also a follow up post: >>> https://lkml.org/lkml/2017/11/22/943 >>> >>>> After Linux v4.9 "asm-goto" support was added which is GCC specific. >>> >>> asm-goto was optional until a few weeks ago, when x86 maintainers >>> decided to make it mandatory, and thus break clang builds for x86: >>> >>> https://lkml.org/lkml/2018/4/2/486 >>> >>>> Is there a workaround to compile Linux-kernel with any CLANG >>>> version? >>> >>> You could revert the patch that makes asm-goto mandatory. >>> >>>> You happen to know the status in LLVM upstream? >>> >>> I know people are actively working on this, but don't know an ETA. >>> >> >> [ CC Dimitry ] >> >> Sorry for the late response. >> This weekend I had some time to play with clang-7 and Linux-4.17-rcN. >> >> I tried with Linux v4.17-rc3-261-gc1c07416cdd4 and reverted the >> mandatory patch [1]. >> >> commit e501ce957a786ecd076ea0cfb10b114e6e4d0f40 >> "x86: Force asm-goto" >> >> This needed a follow up [2]... >> >> commit d0266046ad54e0c964941364cd82a0d0478ce286 >> "x86: Remove FAST_FEATURE_TESTS" >> >> ...but breaks my build. >> >> That seems to be a known issue [3] and Dimitry bisected this to [4]. >> Is there a fix for this? >> >> I have attached my kernel-config and the broken build-log. >> >> Hope this helps. >> >> Regards, >> - Sedat - >> >> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e501ce957a786ecd076ea0cfb10b114e6e4d0f40 >> [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/x86/include/asm/cpufeature.h?id=d0266046ad54e0c964941364cd82a0d0478ce286 >> [3] https://www.spinics.net/lists/linux-mm/msg147669.html >> [4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8bf705d130396e69c04cd8e6e010244ad2ce71f4 > > > Hi Sedat, > > Sorry for the breakage. > > This was reported and discussed here: > https://groups.google.com/forum/#!topic/kasan-dev/oMgCP37n1vw > The plan is to make clang behave the same way as gcc wrt asm > constraint checking. But I don't know what's the progress. Hi Dimitry, that's the thread I looked into and also looked into the involved commits and appropriate files in the linux-source without knowing of [1]. Just just for the records... I used the kernel-config of Debian's linux-image-4.17.0-rc3-amd64-unsigned (4.17~rc3-1~exp1) as a base with this modification: $ cd /path/to/linux-source $ LINUX_CONFIG="./.config" $ scripts/config --file $LINUX_CONFIG --disable X86_X32 ...and... # CONFIG_KASAN is not set ...if this matters. Kind regards, - Sedat - [1] https://bugs.llvm.org/show_bug.cgi?id=33587 [2] https://packages.debian.org/experimental/linux-image-4.17.0-rc3-amd64-unsigned