Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp879587pxb; Wed, 27 Oct 2021 14:20:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHH5Bye/54EGe9vEdba1pIQjsyW1ios/l6iffiQotSQbI4AJpxsfR9C1MUIycSZ+3FXQES X-Received: by 2002:a50:c05b:: with SMTP id u27mr484908edd.56.1635369643810; Wed, 27 Oct 2021 14:20:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635369643; cv=none; d=google.com; s=arc-20160816; b=zaj5sbaMLBNX5zYb2ZS0KY7cio/BAhq/b0PODykQSFS/4kt+mGBTkc6S7N5Pe9sBMG dkpcDVguLUs23QK/ALbCAt6cZ7UT/v+WIQP+bwig+gEz2uw3qKJXYSEjJhl5e6/OSZS1 3vkGDCJ4/FL7ogbMmmbMqRY2Uv3IciIC1vOpYGj+jr9aI5XZCoy9h8vpTSfBbAEv8Sms sqzwEM1t5XSJqbtxtIe86ftcv4/6c7X4xahH22egoMriioBWG39ym4npehieaxaab+Ak GFzoQi/ZNQinF2PmX+Q6hCrtOftikcXIxR4hbqiYH6GCUEU0Zb5r9VsNoSZRszf7dO1O XflQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=a9x0VT35zZ6DKokrr3tUZmRN5kTv6DVJhdONoSV2YHg=; b=uY4gMQzrs66hIixxfFUjSRNCzRTpIvGymSVIS/rlwdQEmdxzFCBFWsTANmErdUDe14 H1YPOTqOlvN6Y+WV5HtLwidz2wcj7/FDZbMIaqiT0A1gPbNCG9tD8HUXysq+l4glV2Ya f1h/J20PHTng3mCcdE+19e5EXrtDTaMvZ8q4cH9mNcsIr7/6yb4ki0ouaaxrnGKd6XcG zkCQBkSh+fdL0nU1CqjqODcH3DMky51bw/jeqNP5QE/e4FqXsjZWsPal1gIq4HYr3hkh 1X5Ejx/ifvJLsBAjr6WmhXzwkAe78r4yRzQCjlGJoyu6tpToM8cKpNssVvMmJQ4tW/pI 1XbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=Wmd9duBl; 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=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ji5si1282762ejc.662.2021.10.27.14.20.20; Wed, 27 Oct 2021 14:20:43 -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=@canonical.com header.s=20210705 header.b=Wmd9duBl; 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=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241141AbhJ0JB3 (ORCPT + 97 others); Wed, 27 Oct 2021 05:01:29 -0400 Received: from smtp-relay-internal-0.canonical.com ([185.125.188.122]:54080 "EHLO smtp-relay-internal-0.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241138AbhJ0JB2 (ORCPT ); Wed, 27 Oct 2021 05:01:28 -0400 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id CAA813F172 for ; Wed, 27 Oct 2021 08:59:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1635325142; bh=a9x0VT35zZ6DKokrr3tUZmRN5kTv6DVJhdONoSV2YHg=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Wmd9duBlxuXSt9PsDzNLhXnOS+hoq7r0LgbdivvSo7xpxyS4GLmZKvURsGZdTV3ba EUDYdSg1dCvzLZO1XYpIMthuEjqWaf9mK34QRdE/7WpHRKmzKevdOYECnVg1G9WlEI ktsl9dbuIUcelhxsIZGEG/FiTkNvZTwQ1OQyj9tLRqFi5Hc+8R/31cwCDM27rNKmAY HTVAS3FV+Q7zzfCwaPce7NDyArO5OqlVhoKzxfEsUpT9cfFt3oExOHiOLs3gmOQ+rB qOQg1tEEdqWTAWqF5jb/P2/50CyWxefEfG0roC82OXZ636F+dfxZTsvqjpfDAMCW7B 6vkkSAdlnEHIg== Received: by mail-ed1-f70.google.com with SMTP id t1-20020a056402524100b003dd9a419eb5so1701732edd.4 for ; Wed, 27 Oct 2021 01:59:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=a9x0VT35zZ6DKokrr3tUZmRN5kTv6DVJhdONoSV2YHg=; b=5Qow276jMDCM2ImdTD5vijE0Zhgn2iWBFYdMKn4H0xGcAFDnhKO9ErTgQwNKTBx8A+ O8IAn8y5OrGHNlKMTIVYfkjq8ey4yUwxoVha+oLCHhyVFOp8ZYMv31+xBwM3t2hbgSGy Daw0HacCuBS0zItfXNW1+pOSBv+/iZj/uJ2wQvmYPYEoCxVX4g6vFyjS3LJ3A5gR3ziU HjYJSnhRVJFJa73XQY6mgRsxb1gdYgkMa4SfXmyloxlJRQVy4d89hfFT/To83jsfyjce K1ZNP3LfYRjkig6C7+ytOZ5lAHRrO2myvHPXKQfIuvA4feUO/LCvllRqQhk8M/FkROLR g2RA== X-Gm-Message-State: AOAM530rQpQll67epKz0UARUo4j4VadIRymxfu91PRFjBSYRMsToHgja TXBMy1qKQ7gmmHwaweuNpVYzZKdWL/FLwMHtqTlnUni0feRDeUOMWjSTceCFOlimg1Yd+qzZaG2 dWtJqWv8t/y8MLgFT8UweFoVjRUFe4lyyUnTESMWuqkwJIoXuhaHtrX/X9g== X-Received: by 2002:a17:907:3e0a:: with SMTP id hp10mr12537373ejc.156.1635325141458; Wed, 27 Oct 2021 01:59:01 -0700 (PDT) X-Received: by 2002:a17:907:3e0a:: with SMTP id hp10mr12536862ejc.156.1635325135141; Wed, 27 Oct 2021 01:58:55 -0700 (PDT) MIME-Version: 1.0 References: <20211026212847.43108-1-palmer@dabbelt.com> <87mtmuaodc.fsf@igel.home> In-Reply-To: <87mtmuaodc.fsf@igel.home> From: Alexandre Ghiti Date: Wed, 27 Oct 2021 10:58:44 +0200 Message-ID: Subject: Re: [PATCH] RISC-V: Make CONFIG_RELOCATABLE user selectable To: Andreas Schwab Cc: Palmer Dabbelt , alex@ghiti.fr, Paul Walmsley , aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-team@android.com, Palmer Dabbelt Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 27, 2021 at 10:03 AM Andreas Schwab wrote: > > On Okt 26 2021, Palmer Dabbelt wrote: > > > +config RELOCATABLE > > + bool "Build a relocatable kernel" > > + depends on MMU && 64BIT && !XIP_KERNEL > > + help > > + This builds a kernel as a Position Independent Executable (PIE), > > + which retains all relocation metadata required to relocate the > > + kernel binary at runtime to a different virtual address than the > > + address it was linked at. > > + Since RISCV uses the RELA relocation format, this requires a > > + relocation pass at runtime even if the kernel is loaded at the > > + same address it was linked at. > > When in doubt, do what? Then do not enable. it will be automatically selected by other configs like KASLR, but otherwise you should not say yes since you'll just have an identical slightly slower kernel. But I imagine you mean adding a default value for this config? That sounds right and it should be "default n". Alex > > Andreas. > > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 > "And now for something completely different." > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv