Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3131744yba; Mon, 8 Apr 2019 11:50:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqzHcLkfs9N28jXQBVoib8vlAGganWd72zdbN2jHNleux8OvkavWXtsEgd86iYXbsxH5LDD0 X-Received: by 2002:a63:1f52:: with SMTP id q18mr30731746pgm.134.1554749450014; Mon, 08 Apr 2019 11:50:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554749450; cv=none; d=google.com; s=arc-20160816; b=A2ctz3Rowm2isVriTMeD4mvJo2M+9SqexAl9X0jeoeZDausfXVQyGjdJfMQ3gJqGGi pNL1xH2grbeL9g9bnt/3yl+aMIGlH59EzVAq5Gy3ZTac7Yi4xjPx3V2X6WvIyp4uvSps 0YxPa9rV/+QQTHD1Hia3m4KNnxfodZ0czdrjd4t1CNoawi/tGrlmvLAnCNTqoKtI29CY aH3ZH0gUeRZAebUOkDAsJ5alhNPAnm59SxJ2IT5F1dlj9GTWjWnle6BxfaRj8kIPQN/6 8Fb8JcpL1fJecBYFv2r1HNkjy/zZm9tbHXMDUVhCuLgFJbigoQDTszaodZh8HowoQtRY fU4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=FGQYKpCnazjT54bTTIGuRCYcvNyyScveT4xOgq2kK7A=; b=nQXK5vjrlRT7ZoF267dYCGqszlB0lAGMNQXdyICqMGQH/QOb+SGYhzkI8i06x9LrZ2 2WwyBP394s62K3DPMRhYqTwApX+6Y97aLiJ+cbaanU/AMJA3qZZGRWohNMWcAiL2KKX4 qTop7Z6kgT/+0kYs9k+zSIzgKPtPogS/aNX15QLJT7jm+28lGkcXIf4QvGKCTXEHbtEV t2IlkFGS6FK0HU6Ul8yw6yKmvV7QSk7eXXlaybjgCttq1/AOJ6xkO8kOP2H/AkMyGmni Ow5OIOFEo+VB4fSh9Zp2LBjkB1wXIlFC22DbX6nJlUJSB8MBr9qnoboTwM3KQw8lnNE8 gWWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazonses.com header.s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw header.b=BhquHNQ7; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c15si9546130pls.358.2019.04.08.11.50.33; Mon, 08 Apr 2019 11:50:49 -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=@amazonses.com header.s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw header.b=BhquHNQ7; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727228AbfDHR4V (ORCPT + 99 others); Mon, 8 Apr 2019 13:56:21 -0400 Received: from a9-34.smtp-out.amazonses.com ([54.240.9.34]:37248 "EHLO a9-34.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726349AbfDHR4V (ORCPT ); Mon, 8 Apr 2019 13:56:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1554746180; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:MIME-Version:Content-Type:Feedback-ID; bh=FGQYKpCnazjT54bTTIGuRCYcvNyyScveT4xOgq2kK7A=; b=BhquHNQ7AZfbW9NrrEMamL4FnrexNg+/metU16jwMylL1GaWxsF42EFPAsJg0J9v tc+5WCOmNP0dP6L1HXS1/yFJJ0wnr1KoG/nafsQIPh3W7juc87F9jGdDw0vfUMRQq5u 56cVXB49zLi4dYei2YPpbeVQ06b1OZMNm0aOpwAs= Date: Mon, 8 Apr 2019 17:56:20 +0000 From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Thomas Garnier cc: Kernel Hardening , Kristen Carlson Accardi , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , the arch/x86 maintainers , Dennis Zhou , Tejun Heo , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , Andrew Morton , Andi Kleen , "Kirill A. Shutemov" , Michal Hocko , Mike Rapoport , Stephen Rothwell , Cao jin , Brijesh Singh , Masahiro Yamada , Joerg Roedel , Peter Zijlstra , Kees Cook , Mathieu Desnoyers , LKML , xen-devel Subject: Re: [PATCH v6 14/27] x86/percpu: Adapt percpu for PIE support In-Reply-To: Message-ID: <01000169fe18026e-a0951268-516c-4604-a4c3-140f3cbb6f7a-000000@email.amazonses.com> References: <20190131192533.34130-1-thgarnie@chromium.org> <20190131192533.34130-15-thgarnie@chromium.org> <01000168a5b35a86-b79bfe67-191e-43bc-a5c7-0e74eac06195-000000@email.amazonses.com> <01000168a6e5ab88-0deea73f-387f-4941-bd11-d1c161aac88a-000000@email.amazonses.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SES-Outgoing: 2019.04.08-54.240.9.34 Feedback-ID: 1.us-east-1.fQZZZ0Xtj2+TD7V5apTT/NrT6QKuPgzCT/IC7XYgDKI=:AmazonSES Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 8 Apr 2019, Thomas Garnier wrote: > > It didn't work originally but I will revisit to see if I missed something. > > I revisited and couldn't find a way to prevent relocations to the > percpu section. Without PIE, you can reference absolute address which > was convenient for percpu. Can you switch PIE off for the percpu section? If not maybe the linker needs to have an additional option? Cannot imagine that this is not possible. You neeed to be able to reference registers that are in fixed memory locations. > Christopher: Did you have something specific in mind? I thought that we just leave it as is.