Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1329358

Re: [PATCH 0/4] support for text-relative kallsyms table

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Ard Biesheuvel <ard.biesheuvel@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH 0/4] support for text-relative kallsyms table
Date Mon, 08 Feb 2016 18:20:02 +0100
Message-ID <qZXDI-8ih-25@gated-at.bofh.it> (permalink)
References <qSWW6-4hT-3@gated-at.bofh.it> <qTfP5-x3-31@gated-at.bofh.it>
X-Original-To Rusty Russell <rusty@rustcorp.com.au>, Andrew Morton <akpm@linux-foundation.org>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Dv5GnOPPxgI17Uj5Y9757/bt4FO6ZDnYuRpZdDPbQYY=; b=c7UtsH3CFH4C8w3nDxOywzlx4qoNawwxOA4jrlFf071BzmpYKXULX0kQwmIBhMpoVP iPt9qnlwXXk8wbWCdykDOib5PsAwFyvViFaa1XJRb871Z+NYYaO9bmD7gGjJTVmrtGcc AR8pAHWwzAbxj2c6RtyF8ekBefmMQi7GL5HzM=
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Dv5GnOPPxgI17Uj5Y9757/bt4FO6ZDnYuRpZdDPbQYY=; b=ZlQ4tpX+xs/jx0fl8CHzsAPYaKFYGGd9uf5/I7d7P4BPKzUeWQgZiER+dtTX2AmvFl uZTUR1/bpSbLrFM4el/nFeMgtxewtTHa99mb7/uTFrCkvdRdGnqoy+pwmxO3doCdtX+d OSeu8FqgodKb78iUNSJvnJkUCF3dXLifOWmQ1aWM6kZS+mvDYteUzLHpuvLnbsQHYmqt n+5UazBcmoOYjU39hkcAqiIU5DobIMQ6B9h59isEaP6LCZ+BEPiMko31NiG94hYA1ptK iSxJinET5ZTZ/5ULRd5QJpqpBSc1NE8N0STvxl3EbNx5b9hljdIp6/CpUOwSggpdTgBI CjkQ==
X-Gm-Message-State AG10YOQ4hxKtF2fD9/YmHPJ8MJ6KMXQazR41/c0mMnWDOG1VfROCN/A4pZDAsP/CBhVdBItpN/0lQuqQFjzrjFhX
MIME-Version 1.0
X-Received by 10.50.141.226 with SMTP id rr2mr22419246igb.75.1454951978235; Mon, 08 Feb 2016 09:19:38 -0800 (PST)
Content-Type text/plain; charset=UTF-8
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 46
Organization linux.* mail to news gateway
X-Original-Cc "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "x86@kernel.org" <x86@kernel.org>, Kees Cook <keescook@chromium.org>, Ingo Molnar <mingo@kernel.org>, "hpa@zytor.com" <hpa@zytor.com>, Heiko Carstens <heiko.carstens@de.ibm.com>, Guenter Roeck <linux@roeck-us.net>
X-Original-Date Mon, 8 Feb 2016 18:19:38 +0100
X-Original-Message-ID <CAKv+Gu84LmMpGoA2Cs4_UJJZZwTWAyZ+u94QnwNd7=7J8KPoTw@mail.gmail.com>
X-Original-References <1453280738-18721-1-git-send-email-ard.biesheuvel@linaro.org> <878u3jy0te.fsf@rustcorp.com.au>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1329358

Show key headers only | View raw


On 21 January 2016 at 06:10, Rusty Russell <rusty@rustcorp.com.au> wrote:
> Ard Biesheuvel <ard.biesheuvel@linaro.org> writes:
>> This implements text-relative kallsyms address tables. This was developed
>> as part of my series to implement KASLR/CONFIG_RELOCATABLE for arm64, but
>> I think it may be beneficial to other architectures as well, so I am
>> presenting it as a separate series.
>
> Nice work!
>
> AFAICT this should work for every arch, as long as they start with _text
> (esp: data and init must be > _text).  In addition, it's not harmful on
> 32 bit archs.
>
> IOW, I'd like to turn it on for everyone and discard some code.  But
> it's easier to roll in like you've done first.
>
> Should we enable it by default for every arch for now, and see what
> happens?
>

OK, that's what I did, and this is what happened:

Initially, some breakage on sparc32 and !smp x86_64, as reported by
Guenter. After fixing that, all looked fine until Andrew picked up my
patch the other day to actually abort the build when kallsyms fails
(where before that, it would emit the warning but continue with the
build and produce a broken binary). Now, I have new reports for
Blackfin and Tile-GX as well, neither of which I can build myself
easily, since no toolchains for them are available on
https://www.kernel.org/pub/tools/crosstool/

SInce --absolute-percpu is only used by x86_64, I can fix the 32-bit
case generically by using the full 32-bits for relative symbols, and
only split the kallsyms address space into 2 GB of absolute values and
2 GB of relative values if --absolute-percpu is in effect. For the
Tile-GX case, the only thing I can propose is to disable this feature
for that architecture, and perhaps someone with a clue can figure out
whether the symbols are in fact laid out that sparsely, or something
else is going on.

I will send a v5 of my 3 piece kallsyms series momentarily. The patch
that forces the build failure on kallsyms failure can remain as is
(http://ozlabs.org/~akpm/mmotm/broken-out/scripts-link-vmlinuxsh-force-error-on-kallsyms-failure.patch)

Thanks,
Ard.

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH 0/4] support for text-relative kallsyms table Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-02-08 18:20 +0100

csiph-web