Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1250721imm; Tue, 22 May 2018 00:39:58 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr4CIc2wqk/RlHEx7tQtuWfb4pRCyTu+VnTFrW5wu3SCPYMuqJQArarnedKHG8KxG96Tx4E X-Received: by 2002:a62:9b57:: with SMTP id r84-v6mr23157892pfd.109.1526974798505; Tue, 22 May 2018 00:39:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526974798; cv=none; d=google.com; s=arc-20160816; b=aXzzf4K1XvNHOQlobJf9Mi0eVbOx6sGOOkZTCkjNw+jO3cgfmxnEqIbpuHvzPtY/d4 50yJDVP+8b9S9en9KQuXE4e5GDgHB5V+aRihlU67CgL/8HC3+nDG+xMNeGr4ZKXQ9Bci y4pipeSbkcbUE/VBlDEau3/QVvYpSlnG2ZChFjnk3tzfYhDQgwXRMb60kpcSthbcEj1Z /E76+mo5OQ0m+8KKSvcaJmr7KCw8R0ruJCP5SHEFVNCeZf/DB0PjB0tlDAC2R/0vJozH 2h5NIIcmz7bY1vcJpZtzaUyvCU0i4JhWgsWpf7rupwX1NzY5Oh4Fop6v8bSJrWVdfiUs SKvw== 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=+JXw0vQy1uR3qTeMAtXht99q1aPV6hv5qvMieDfcRlo=; b=N4GlbhIcU+cjW9kaEDzBKvnbJyMcwtevjuJElkccGVOWTouOkWGuOM4swlW0G8sHLM LXFdow18Nw8PRUyqGhxEtfR9nNHZio/GsdGO2RUJ1x46SsgTc8jtWB1Kv4tpB4fWKdux x//WeODf+VMeQ5z4dDNcbdArV0UcrYkZ8Up3Ja6n6/AhH55mUg5E72E7WjaQddBw4El/ Hu92ClnjZ5kCdS04QmcDGOeGx3/kTzypyUdQM0dZw+nGpHwq0+V66ncBuwuPtE7uy2Qh 6gHtOU90r216DW6goQn9BKdqEkqp5gq4nDRa7lgf7ZdY6JAreT6021/ZEoxmAK5JGwSj q0Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dmwiWqbj; 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 d5-v6si12553312pgc.150.2018.05.22.00.39.42; Tue, 22 May 2018 00:39:58 -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=dmwiWqbj; 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 S1751380AbeEVHjf (ORCPT + 99 others); Tue, 22 May 2018 03:39:35 -0400 Received: from mail-lf0-f41.google.com ([209.85.215.41]:32782 "EHLO mail-lf0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750753AbeEVHjd (ORCPT ); Tue, 22 May 2018 03:39:33 -0400 Received: by mail-lf0-f41.google.com with SMTP id u9-v6so10497065lfc.0 for ; Tue, 22 May 2018 00:39:33 -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=+JXw0vQy1uR3qTeMAtXht99q1aPV6hv5qvMieDfcRlo=; b=dmwiWqbjGdPdC9P+M7tVaynhMd4BmoJ0sDiKF7txzn50NLHnv7Vb/hSONgeHDiW0xC 5F2WsenaLgdcIYYWgtJcD5shY/daX7hfN9lQx6BTiQq3grCZmnggHYfYE1srTCaPYWXY a1XLQXEiweNgkP2O9HyvaiXeCNM26D5JEedzW75NgezMP2G6GbzGVMFl9uERRRbOQanM r+FylcO7gU059uZ1qGTRxNNi9/tAbjxa29XQvfK0GIB+z7KL4Wpy2rVbgtXy5KmQyNzx jRE0l/EEpfZvrO4Ho78DhsZ4pOsyALe5bN1QjNAv9k4X+p8OJ6azadFSz7pj501V2J7O eTwQ== 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=+JXw0vQy1uR3qTeMAtXht99q1aPV6hv5qvMieDfcRlo=; b=sCGqeYhSopu8PgZK0q2/1yC5C+wJdbTIpOYedUComGhHXk0yL0AXoPBMASRVu+I16x BMs7VwAPteGh3DrJfY/lLM24bqpK+QoQP96VMGC0aIR6QTupAadvfvztS5gXoJ9RDzxM zvuSH7SQ55nz0cTqg79kaOhQoBqFo/x3FeA4l4C8tJXEMkoHWW+48T7zbM4ogcV3ot0d wgPz2JlzmfqXaE6i5LBlzxPzYzaDEryKTcck0yt3bgDztAYIwcrzoupfP5pDgt5Ton11 TY2OjTo2sIMMZiAwzgHvNgdGPNj6UOEa3AIlbpNyUnhEu4M3aqRbx2PpuPIueXQL7q7M D5Dg== X-Gm-Message-State: ALKqPwcajZGiUH+GSbf1x0A2hiP5iWQCN+y0F4TClHO8oayu7toHpO2Y zNy2ZL9HknW7iwr6s10kQ1mrsux175COpPufbxGoYQ== X-Received: by 2002:a19:9cc6:: with SMTP id f189-v6mr7411423lfe.119.1526974772448; Tue, 22 May 2018 00:39:32 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:ce89:0:0:0:0:0 with HTTP; Tue, 22 May 2018 00:39:31 -0700 (PDT) Reply-To: sedat.dilek@gmail.com In-Reply-To: References: <20180423174224.GA243180@google.com> <20180424230645.GB243180@google.com> <20180507174909.GF19594@google.com> From: Sedat Dilek Date: Tue, 22 May 2018 09:39:31 +0200 Message-ID: Subject: Re: Clang patch stacks for LTS kernels (v4.4 and v4.9) and status update To: Nick Desaulniers Cc: Matthias Kaehlcke , lkml , Arnd Bergmann , Manoj Gupta , AlistairStrachan , "Steven Rostedt (VMware)" 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 Sat, May 19, 2018 at 12:54 AM, Nick Desaulniers wrote: > Sedat, > Thanks for the report. We have a fix ready in > https://bugs.llvm.org/show_bug.cgi?id=37512. Can you report what > version of clang you were using and if earlier versions of clang have > this issue? > Thanks, Can you give some advices on how to implement "attribute((no_stack_protector))" for Clang? I looked on how this is done for GCC... [ include/linux/compiler-gcc.h ] #if GCC_VERSION >= 40400 #define __optimize(level) __attribute__((__optimize__(level))) #define __nostackprotector __optimize("no-stack-protector") #endif /* GCC_VERSION >= 40400 */ [ include/linux/compiler_types.h ] #ifndef __nostackprotector # define __nostackprotector #endif LLVM-bug #37512 says: "GCC option for this is: attribute((optimize("no-stack-protector"))) and the equivalent clang syntax would be: attribute((no_stack_protector))" So, there should be a define in "include/linux/compiler-clang.h" for this? [ include/linux/compiler-clang.h ] #define __nostackprotector attribute((no_stack_protector)) Looks that good to you? - Sedat -