Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp868925ybt; Fri, 26 Jun 2020 13:37:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzr6Wz0FBRK2++H8h+Ygc/G0eAR6NLrB1/x1SMulLxZK29pQzW5buj4iJuoM2IHeCkTpHKS X-Received: by 2002:a17:907:20c4:: with SMTP id qq4mr4104247ejb.85.1593203859255; Fri, 26 Jun 2020 13:37:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593203859; cv=none; d=google.com; s=arc-20160816; b=0Zp7PB5VOPiiiS7OjR143qyhqE2cBZrJQrEHQ/D6sZwfElWO/T6j9TsuBgAciBphKd Yo5VX3QnaXqHcP80nnaGJ/95XFkiZnYli/KLEItn7Vy/6RL8y/NRHKCw6xlQqSQHimLj JSrnAelEE9cxbYUU1AA8YOTERKLui3QlFvhm44lRq8BvRQeR1c8NafVUVAlgjGPPFzTj YKp5nVCMlhe5Y65Yf9Ax7lnr2FHMYq393aIVpPyAo68upy3s80XUtbn5vGPIXwgmbJb3 7IBvElqOFOpN/UyWt3OweX5I+062xmX04kteOT772gl0+cPOO88glWDh8iUzh53RVM8C f38Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=nt/218p7v20WGusEjZTRWNofL1UTU7wXJpxnIwWbqck=; b=qHQv3hAOS3Bapup8MfAjRCdpx6HXX2HO28GJ2JcTSk3D7hXQpPyVQTteNM3D3cxa4d 04Za81wtrNRIBmK/wWryLcv5RiDchxrTGOE+GP7Ty/E9iEYOF0mNoAqqEAEhGbtlVphZ iOIY7XYBrERMLbm1WoYJZfWe24//rFcyLosORyfXViRxWCelbZIiMVneI9yPh0BMcLcg OvRswNGBmuJ6iO3IiSHNHUlR0KZKsWXIyWnSQnqrA/SvRHpii7UBzEpiVB6njVTEVLh3 R0yUZFQz9YoHPMbfx2kta/680RtL+tWhn5TSd23lTzt5CyvXWtiqZOd6Ucjfl8gGj0hI B61w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LasIkQVy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id ga5si5643698ejb.567.2020.06.26.13.37.15; Fri, 26 Jun 2020 13:37:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LasIkQVy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1725832AbgFZUhD (ORCPT + 99 others); Fri, 26 Jun 2020 16:37:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725828AbgFZUhC (ORCPT ); Fri, 26 Jun 2020 16:37:02 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDD75C03E97A for ; Fri, 26 Jun 2020 13:37:02 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id q90so4645081pjh.3 for ; Fri, 26 Jun 2020 13:37:02 -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; bh=nt/218p7v20WGusEjZTRWNofL1UTU7wXJpxnIwWbqck=; b=LasIkQVyh7YOVLhmmWjNknLdRMiIhvmSIsX6upZZEv19wZkBLTDXThFG+IoJtTQ1DK zcl6LQej91z8gS9IaBIyAs1OvHj/0GDMvNCjRsmmphnLs25aUBJeB2/1LelcaqiXTaN0 pdUtgwESOtklxyeVHayu+6UmjFTjibUVnEUdE= 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; bh=nt/218p7v20WGusEjZTRWNofL1UTU7wXJpxnIwWbqck=; b=J90vN3ekmXcZblDtBDdYoKht/MCnHheoMxZd15/8sMSMuEPgg0snjXssQaPJb8QWOj YFb3v1ECCbGqE4RtIFtQ6sFVSlpoo6i1/hxPO83/6qOH0k+WGGHfS3znM681vL5w4+Lj ylq/CT6vCMgFmKpsDdaNP5BgbBGvOMywyKqBusHAe23E6ppBrOHK46sv4qilGRFEmZSu Gp0ksvc76ZOiczpNyAl01RMNyGaDQkG9gGqIKPJnKRiCOX3naX4EOlNCd8wEhalHqqyi 129+0qxwve7BYm9/pOAOd7eUn9kCqic1f84wI415RfpZWp5wvwZyxRoTrUOCExuZPZQO JI+A== X-Gm-Message-State: AOAM533nhbLf+5ivh6RJ5Tr3syq7MuC3Kly+4QC1DcpAvQKNTfDAe7Q/ GCvNRGu0B9is06T3Rxuo+zO2ZQ== X-Received: by 2002:a17:902:7896:: with SMTP id q22mr3972740pll.338.1593203822398; Fri, 26 Jun 2020 13:37:02 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id r8sm27166377pfq.16.2020.06.26.13.37.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 13:37:01 -0700 (PDT) Date: Fri, 26 Jun 2020 13:37:00 -0700 From: Kees Cook To: Nick Desaulniers Cc: Masahiro Yamada , Linux Kbuild mailing list , clang-built-linux , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , linux-efi , LKML Subject: Re: [PATCH 1/2] kbuild: remove cc-option test of -fno-stack-protector Message-ID: <202006261331.3A94DB7@keescook> References: <20200626185913.92890-1-masahiroy@kernel.org> <202006261319.F130204@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 26, 2020 at 01:25:27PM -0700, Nick Desaulniers wrote: > Ah, right. Thanks for pointing that out. I'm still curious if the > CFLAGS_.o rules get appended or overwrite all flags for that > translation unit? CFLAGS_file.o gets appended to the CFLAGS. For example, after my updated patch[1], the command line for syscall_64.o looks like this: gcc -Wp,-MMD,arch/x86/entry/.syscall_64.o.d -nostdinc -isystem \ ... -Wframe-larger-than=2048 -fstack-protector-strong \ ... -fno-stack-protector -Wno-override-init \ -DKBUILD_MODFILE='"arch/x86/entry/syscall_64"' \ -DKBUILD_BASENAME='"syscall_64"' \ -DKBUILD_MODNAME='"syscall_64"' \ -c -o arch/x86/entry/syscall_64.o \ arch/x86/entry/syscall_64.c -Kees [1] https://lore.kernel.org/lkml/202006261333.585319CA6B@keescook/ -- Kees Cook