Received: by 10.192.165.148 with SMTP id m20csp3697609imm; Mon, 23 Apr 2018 10:45:16 -0700 (PDT) X-Google-Smtp-Source: AIpwx49YeswFIHBn45ktL6RIip2uo08KCpeZ6irFfTH4b2R1QrZw3XwKo2GaNKmmgby0bP9weUSN X-Received: by 10.99.95.20 with SMTP id t20mr17198118pgb.400.1524505516170; Mon, 23 Apr 2018 10:45:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524505516; cv=none; d=google.com; s=arc-20160816; b=JCDyTFzMlBOXRo/NUGDLJOJ7C1//HqueDC3NPYslbsG2hh94DKW5h7Z4QS5YjozoK4 ypeCESP/BXAHB/3NJM4KtQRF3w+p7LRFYxjbE0WYdYeR0ErFflLePeYUkLFIbqjOo0Ih 33XNuyn0GYvfInRZgFsnG+bVA+M9gpHSW5iiCuNLbLTJTyIoy92vz4c4RSq8CXt9CayG /YgIZ4QXJTVzrKIovjZEXLaBXyRKzGOl+XmtbBRilGWQ5rp0ci4ohgJQML/qNnHgJufu 5ai2vWshlTAsB99Z45YYANA77zaHrkOu1QaWmaS73B9wEqnj2HiMzZiJ+gkzOAv1w60c iKzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=CqEBRU7Pjngaq8A5uO11mHnht3vIGZyVsye3WybDs4I=; b=vROfD+ib5re/UmA7hucHL5Qmx1UZerAy9ZQUdjYYHW6CDfF7NgK2EGVyozJG2k0Fd7 7d9l/nI8GoVeuP3VEev0A63mot6jnV2/GOm793q9e6LmGoubkfJulP9N3450/RMGJ8Ry RJVwP3iFfw+qYl/PlkCreTfbW3EP2z+PnxeSKMrPGB4lko/pMk0S7pTfr+PSEThZ+9oc HlQtLWND2NbKw12DZIQi7Rss1VPTNnmu8z3jtV7/GdzVF/myr1+9OyM8vcBfpzdwZ4bf tt9exe6Lv9AWaXQ7zE3IY1QKc9hiZcpXftOwtq4jdh4tCxVFoSKfyaHXZxtCVpIr0JIP 4a3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Ual6wJfE; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be4-v6si1889144plb.246.2018.04.23.10.45.01; Mon, 23 Apr 2018 10:45:16 -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=@chromium.org header.s=google header.b=Ual6wJfE; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932302AbeDWRm2 (ORCPT + 99 others); Mon, 23 Apr 2018 13:42:28 -0400 Received: from mail-pg0-f42.google.com ([74.125.83.42]:35960 "EHLO mail-pg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932076AbeDWRm0 (ORCPT ); Mon, 23 Apr 2018 13:42:26 -0400 Received: by mail-pg0-f42.google.com with SMTP id i6so8881278pgv.3 for ; Mon, 23 Apr 2018 10:42:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=CqEBRU7Pjngaq8A5uO11mHnht3vIGZyVsye3WybDs4I=; b=Ual6wJfEYMuEj2R1ITna987bT2J/anROwb3O5ce6zhPp9Ux1NTREexluv92r/DhwGl Xne4xt71THR/YEnWSlAuUO4JSE9pQGzuvStRYkb/BWwQ3fbueU1S6PQHFBxv8kHswIBE TMlzpYcjh/ueX65w0qi7cjjAgkiM8kX7zSMsM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=CqEBRU7Pjngaq8A5uO11mHnht3vIGZyVsye3WybDs4I=; b=R3tmHSCGMFATX1PKLFq3lXFPG1Ib3TrFcF4oW4h3alfbWmvD+ZmLHQJKt15EfeRWa/ 7mxhxfopYPJfoyN6ZgktNWq66iuwe2ksvbEuLTDaLSArJrA2V4Q8rTKV/pVD5BGt0rwV bG2glDAPnHGWyL+wgla22d0dl5AgfCz+OqdicYPkG8mu8HFlJbbl9PsGygIR0f4Avmnb cSLIF6somgQtnqV+pR0scdi8Bwb6rMA8HqGCsuzy5tsCkOgfvOK8v00r0HzaMOj9kdoc yaaQ9A8my5ioVQeGrawIjNb2VodBVDXvfgrbypC0oQzj0vIPvORTJLoVEYUr2Uu6UXpl 5AUw== X-Gm-Message-State: ALQs6tCgLK2eWTr9PhPRxmCEYkuz6Zp1T6tjDQpD/WLYxMOVyo2Rau7j cKaFcUFDTFrybQwOXzue6y9LWw== X-Received: by 2002:a17:902:8488:: with SMTP id c8-v6mr21741249plo.357.1524505345668; Mon, 23 Apr 2018 10:42:25 -0700 (PDT) Received: from localhost ([2620:0:1000:1501:8e2d:4727:1211:622]) by smtp.gmail.com with ESMTPSA id m3sm12484343pfh.159.2018.04.23.10.42.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Apr 2018 10:42:24 -0700 (PDT) Date: Mon, 23 Apr 2018 10:42:24 -0700 From: Matthias Kaehlcke To: Sedat Dilek Cc: lkml , Arnd Bergmann , JF Bastien , Nick Desaulniers Subject: Re: Clang patch stacks for LTS kernels (v4.4 and v4.9) and status update Message-ID: <20180423174224.GA243180@google.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sedat, On Mon, Apr 23, 2018 at 03:56:41PM +0200, Sedat Dilek wrote: > [ CC Nick ] > [ CC Arnd ] > [ CC JF ] > I wrote some early documentation (wiki) and tested/booted a > clang-compiled kernel on x86-64 bare metal. > The project was called "lll-project" these days. > The followup - LLVMlinux project - seems to be somehow dead? Yes, I think it stalled in 2014 or so. There is still a mailing list with very occasional traffic. > After reading your posting, I got really excited and had a quick look > over the Linux v4.9.y-LTS patch-stack with additional stuff: > > $ git fetch https://chromium.googlesource.com/chromiumos/third_party/kernel > refs/sandbox/mka/llvm/v4.9_ext > $ git checkout -b llvm_v4.9_ext FETCH_HEAD > > I like your commit subjects and messages. > > Before starting to compile I have some questions, I hope you can answer them. > > [ CLANG-VERSION ] > > Here on Debian/testing (will get Version 10 with codename "buster") > AMD64 I have the choice of installing CLANG v4.0.1, v5.0.1 and v6.0.0. > As you point out LLVM/CLANG v5.0 or higher are a good and faster > choice than v4.0. > Using CLANG >= 5.0 makes the *CLANG* patch-series obsolete? Correct, preferably use clang v6 or newer. > [ REFRESH PATCH-STACK ] > > What about the *FROMGIT* and *CUSTOM* patch-series? > Are they in upstream in the meantime? CUSTOM patches address issues in older kernels that have been fixed upstream in a different, not easily backportable way. They will never land in upstream. FROMGIT patches should eventually land upstream, since they were taken from a maintainer tree. The commit message includes the upstream git hash, so you can easily check if it has landed (though in some cases the hash changes ...) > If yes, will you refresh this v4.9.y-LTS patch-stack? I eventually will, the two FROMGIT patches are relatively recent, and respinning the trees just to update the tags isn't one of my priorities. > [ 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. > [ X86-EFLAGS/IF ] > > AFAICS, I remember an EFLAGS/IF problem on X86 and interrupt handling. > You happen to know if this is fixed in LLVM upstream? > Some LLVM developers were interested in fixing this. > Can you comment on this, JF (we had some email conversation in private in 2016)? Yes, this has been fixed recently: https://bugs.llvm.org/show_bug.cgi?id=36028 Cheers Matthias