Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp262125ybs; Tue, 26 May 2020 08:35:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylv0AujyqeWBKoIrMRlRpO/LXdWPjJcXXqSn3v/f37DC2mRHTq3aSGIS+R5qgdlcj1Ukdc X-Received: by 2002:a17:906:2c08:: with SMTP id e8mr1594522ejh.385.1590507346660; Tue, 26 May 2020 08:35:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590507346; cv=none; d=google.com; s=arc-20160816; b=wpQV2vYo/CZKOwxWeHZEJfdimICoL4Pkon/5ars4Uve//fkZfUsdpRpZA7vKaZtDkY ydVuoi7Gjk/nBiLq73hsgshFqKErdAH/Q89GiDb6D1Z4aOfFCQ7Bj50jBzK/LdammBl/ 3Mcd/b6Jp3/BMsJ1cJJsY8pdNVtwsLKOg3GZMVUp/Uj4Fu8cyvtYYIuE0czrRBH1uGHc qAAP1egqnbPWxbPlJIOuhqLIXLFvfYwcYa7/eEoMLZPjmuot7ryOSPYwowgflftGPT4s DbqcK1903BDQo/wDZHUTYIjONxD2wsDGO0LOv7lYDBo2U1XI2iCEQdwKIw66Faulke9u h+BA== 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:date:from :dkim-signature; bh=nVAali8dSpr9v23zA2CiQyVc5uAWU4kfctYwAsBlH/o=; b=q9DbWqSNxDQPUZEKd0ObV0XVHkXONMjugnr+xk9pT1LrTB18x9CcU5abaSRsFwcgWc onCabplecTCK5McIdz4gintBiflDxwjxEyMclGRj63B10g1TLdrh+UzX980Y9zo5DXm8 Hmly3peTwsCVmJFNq8jgcdV+7o7uv8Mlf5JpioGXhh3fB8TqcxjdF9bMOA95OAoAN0v1 xqF/bUmAa1HgNcnnSOPO5W6tAeUPYYXcReYauzuat3G4yXbO3czPuzumv1XjMBm6/yQw CM1duZ8W/IZ6CcT/LL5kKBWvHH6UE7LD5wj71TboCkwVjGfVpdwxuXPlOFIy88X8Nbui eYjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=MlMqhymq; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id eb11si125601edb.302.2020.05.26.08.35.23; Tue, 26 May 2020 08:35:46 -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=fail header.i=@gmail.com header.s=20161025 header.b=MlMqhymq; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729470AbgEZPbI (ORCPT + 99 others); Tue, 26 May 2020 11:31:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727898AbgEZPbH (ORCPT ); Tue, 26 May 2020 11:31:07 -0400 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59CE1C03E96D for ; Tue, 26 May 2020 08:31:07 -0700 (PDT) Received: by mail-qt1-x844.google.com with SMTP id x12so16390886qts.9 for ; Tue, 26 May 2020 08:31:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=nVAali8dSpr9v23zA2CiQyVc5uAWU4kfctYwAsBlH/o=; b=MlMqhymqjZPS+Xk2oM/nsOGlwmsVKEvRj4bQK8+GHRYvx7kOElq385DciMHFdWZ2pN GASgbbgs5hMREcR6xa8j4+PrKAcUIuIBVetVBWfpypo0erTrV+EC1lpQSQmubuOlzucY hPblqe0W+D0iSCX2mYKLxLF9ycsTl5mJ7XTnOXIWbOztP301r5zS4/LWrcSFzWRFamxz Ng5lqfW4+c8KpRlAtmj+N7aQvvugxtYrPSLWk2xEhuPvLDW7ZbSvJBR3nscZTHMEt2wc d6Qx7q2Wld8mQ8o9zjYRS5SH6TO3ik47KhkD9QwpkXfO5t6Ooj89/j5cbP1Zf+mPboKl d1+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=nVAali8dSpr9v23zA2CiQyVc5uAWU4kfctYwAsBlH/o=; b=A3KTFr907yXAcjCcPh0+h1gZuJX+9KjdSRiDEjBm+t0F/ZAN9CvJxuJxszX9Ae4QGi FP9rYs4eNYUo7xJ3rnhinpJVuy+HZmZl70Qatwms+jVFG4BOIArBzd7jZslT4KYBGjqO JPX4yyTd1CxcLsRS+VXfI/cv5l2xpBnk/WEcbNRlY+lNkmlkbYHEk58vcXdaGHQzFce+ gn/bIvbyOQw44U6FV/ROLg4+flZnhGh9XJ/1usreMcKVr9t7xtBdtIWXQyTZuBFQxpBA 8NLm27bTv/fMmZhLfqkHrj9I9/rseZUA7aFj7xvQmiYl6OYneesyWYbjkgdLlJXZ6v8p fltQ== X-Gm-Message-State: AOAM533IlImyph6zD91nZmjODT7vBgwqhjpVIUR4gIpU2uPatc8onse1 XNCqlPHQUXrSikRthHCSLpQ= X-Received: by 2002:ac8:768c:: with SMTP id g12mr1859594qtr.51.1590507066478; Tue, 26 May 2020 08:31:06 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id n63sm7791312qkn.104.2020.05.26.08.31.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 08:31:05 -0700 (PDT) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Tue, 26 May 2020 11:31:04 -0400 To: Sedat Dilek Cc: Ard Biesheuvel , Arvind Sankar , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , X86 ML , Nick Desaulniers , Fangrui Song , Dmitry Golovin , Clang-Built-Linux ML , Masahiro Yamada , Daniel Kiper , Linux Kernel Mailing List Subject: Re: [PATCH v2 0/4] x86/boot: Remove runtime relocations from compressed kernel Message-ID: <20200526153104.GC2190602@rani.riverdale.lan> References: <20200524212816.243139-1-nivedita@alum.mit.edu> <20200525225918.1624470-1-nivedita@alum.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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 Tue, May 26, 2020 at 05:07:24PM +0200, Sedat Dilek wrote: > > > > > > > Maybe this should be: > > > > [ arch/x86/boot/compressed/Makefile ] > > > > -KBUILD_CFLAGS += -include hidden.h > > +KBUILD_CFLAGS += -include ./hidden.h > > > > NOPE. > > This works: > > [ arch/x86/boot/compressed/Makefile ] > > -KBUILD_CFLAGS += -include hidden.h > +KBUILD_CFLAGS += -include ./arch/x86/boot/compressed/hidden.h > > $ ll arch/x86/boot/bzImage arch/x86/boot/compressed/vmlinux > -rw-r--r-- 1 dileks dileks 6,5M Mai 26 17:05 arch/x86/boot/bzImage > -rwxr-xr-x 1 dileks dileks 6,5M Mai 26 17:05 arch/x86/boot/compressed/vmlinux > > - Sedat - It needs to either be $(srctree)/$(src)/hidden.h, or we should add -I $(srctree)/$(src) to the KBUILD_CFLAGS. The latter option is added automatically when building in a separate builddir with O=${KOBJ} (which is how I, and I assume Ard, was testing), but for some reason is not added when building in-tree. The -include option doesn't automatically search the directory of the source file. -include file Process file as if "#include "file"" appeared as the first line of the primary source file. However, the first directory searched for file is the preprocessor's working directory instead of the directory containing the main source file. If not found there, it is searched for in the remainder of the "#include "..."" search chain as normal.