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


Groups > linux.kernel > #1165546

Re: [PATCH 0/2] Consolidate redundant register/stack access code

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Kees Cook <keescook@chromium.org>
Newsgroups linux.kernel
Subject Re: [PATCH 0/2] Consolidate redundant register/stack access code
Date Mon, 15 Jun 2015 22:50:03 +0200
Message-ID <pBJur-65B-29@gated-at.bofh.it> (permalink)
References <pBFKa-Gk-15@gated-at.bofh.it>
X-Original-To David Long <dave.long@linaro.org>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=neaCC0/4A2PmRXGmM9lScaTvK6iPRM9zQWCZ31ehZfI=; b=VU2Qq4fsc/N2ltOJSKbTk3aK/M7AY10+qD4o5GMZG6Tqesfyg/wzw5fRDdLe7SWM9w Qo1ssH1RJuN4OzLCkH3qyu4nI/MoGYz0qANIxPU1msnOUBDjW0SxbrV8l6ulPQ+ajpg2 0KQa43P2OPDvPlqoSsHv/OGP2Y4Q3jxLx9/wI7/tSS62CIJAiK3s23HpqNYFQ01k1DqL LAhhISl8GEgbKokvb+hyWehVvy0fstfpKF+7lLUHF/3+eowMcCQEU2fAP2KZ1AkWmYWH r65C5kvTCgN08mVnjgWr1tjMgrV7bDh8PDunX50fisqDodd+mEWP1B8rQSg9o/WjGwWr 0gNA==
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=neaCC0/4A2PmRXGmM9lScaTvK6iPRM9zQWCZ31ehZfI=; b=dYibaP4ioGAQYaTcnH1/8ZRR0lMO2NewPwjbbTLpbXbYbfe2SSyoAAQJcae+ceC36I 8D5qZZRZzwkIyoAhLaImyVNrYZJfqqUE5V5O3yMaq5RWwwnrekFvveuOJEEKZ6GtSP0Z bqgKJnd0eOozrkbMyk5dbn7A57lJOAt1ats4I=
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=neaCC0/4A2PmRXGmM9lScaTvK6iPRM9zQWCZ31ehZfI=; b=KPzkLufL7HnTu3blcJV/JOSr8optzhHaRfB1quG/WCWBhnJA+5FuGNay7r5gf5sR9w q/YwrHLh/+0EYFoA4Zi4BNHRIQYI2T/+nG73+IuAdEfa8KZwP+wpkNx7pjmVPhK9SgD1 cn/FTwfdSijyGBVveoB2kI40fMURxs7mEd40ZzhxI7NY2eNauepokoyU2cb5a0QZ4Ms1 OB8ZMWTO5yCwMWHEvdpnGwsTery00DIvWi9xIRwWptbrOj7m7cqZ3VeEZCtfTIh4+clI /U/ms+v1RsHigvNT+4X4pgpj08kZb0r3/c//7/PMBpiOtn5Edo/zWiktbekrLXbT4fPY 7dSw==
X-Gm-Message-State ALoCoQk2eTsbD3YambT4ttn0RWWjbl5JGybULnXhSmDqa1mf2wCMeUbESXJDeheze8Su/1fEl1P8
MIME-Version 1.0
X-Received by 10.52.112.36 with SMTP id in4mr23428720vdb.3.1434401082257; Mon, 15 Jun 2015 13:44:42 -0700 (PDT)
X-Google-Sender-Auth fjEBHau2agDX6BVc9QqcG4dBWPM
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 52
Organization linux.* mail to news gateway
X-Original-Cc "H. Peter Anvin" <hpa@zytor.com>, Andy Lutomirski <luto@amacapital.net>, Anton Blanchard <anton@samba.org>, Behan Webster <behanw@converseincode.com>, Benjamin Herrenschmidt <benh@kernel.crashing.org>, Eric Paris <eparis@redhat.com>, Heiko Carstens <heiko.carstens@de.ibm.com>, Ingo Molnar <mingo@redhat.com>, Jan Willeke <willeke@de.ibm.com>, Martin Schwidefsky <schwidefsky@de.ibm.com>, Michael Ellerman <mpe@ellerman.id.au>, Nikolay Borisov <Nikolay.Borisov@arm.com>, Oleg Nesterov <oleg@redhat.com>, Paul Mackerras <paulus@samba.org>, Richard Kuo <rkuo@codeaurora.org>, Robert Richter <rric@kernel.org>, Roland McGrath <roland@hack.frob.com>, Russell King <linux@arm.linux.org.uk>, Tejun Heo <tj@kernel.org>, Thomas Gleixner <tglx@linutronix.de>, Will Deacon <will.deacon@arm.com>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, linux-hexagon@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>, "linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>, linux-sh <linux-sh@vger.kernel.org>, "linux390@de.ibm.com" <linux390@de.ibm.com>, "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>, "x86@kernel.org" <x86@kernel.org>
X-Original-Date Mon, 15 Jun 2015 13:44:42 -0700
X-Original-Message-ID <CAGXu5jJ7i6qgUOXuaNJ8vT7+D+6_C_hrOwWHZA+6f9zFJQ+Vbw@mail.gmail.com>
X-Original-References <1434386579-6045-1-git-send-email-dave.long@linaro.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref aioe.org linux.kernel:1165546

Show key headers only | View raw


On Mon, Jun 15, 2015 at 9:42 AM, David Long <dave.long@linaro.org> wrote:
> From: "David A. Long" <dave.long@linaro.org>
>
> Move duplicate and functionally equivalent code for accessing registers
> and stack (CONFIG_HAVE_REGS_AND_STACK_ACCESS_API) from arch subdirs into
> common kernel files.
>
> Note: Help regression testing s390, hexagon, and sh would be appreciated.
>       Powerpc builds but I have not verified the functionality.
>
> David A. Long (2):
>   Move the pt_regs_offset struct definition from arch to common include
>     file
>   Consolidate redundant register/stack access code
>
>  arch/arm/include/asm/ptrace.h          |  6 ---
>  arch/arm/kernel/ptrace.c               | 72 +---------------------------------
>  arch/hexagon/include/uapi/asm/ptrace.h |  3 --
>  arch/powerpc/include/asm/ptrace.h      | 38 ------------------
>  arch/powerpc/kernel/ptrace.c           | 39 +-----------------
>  arch/s390/include/asm/ptrace.h         |  3 --
>  arch/s390/kernel/ptrace.c              | 70 ++++++++++-----------------------
>  arch/sh/include/asm/ptrace.h           | 44 ---------------------
>  arch/sh/kernel/Makefile                |  2 +-
>  arch/sh/kernel/ptrace.c                | 33 ----------------
>  arch/sh/kernel/ptrace_32.c             |  2 +-
>  arch/sh/kernel/ptrace_64.c             |  2 +-
>  arch/x86/include/asm/ptrace.h          | 37 -----------------
>  arch/x86/kernel/ptrace.c               | 39 +-----------------
>  include/linux/ptrace.h                 | 51 ++++++++++++++++++++++++
>  kernel/ptrace.c                        | 38 ++++++++++++++++++
>  16 files changed, 116 insertions(+), 363 deletions(-)
>  delete mode 100644 arch/sh/kernel/ptrace.c

I love the deletions:insertions ratio! :)

Reviewed-by: Kees Cook <keescook@chromium.org>

I wonder why arm64 doesn't define CONFIG_HAVE_REGS_AND_STACK_ACCESS_API?

Thanks!

-Kees

-- 
Kees Cook
Chrome OS Security
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

Re: [PATCH 0/2] Consolidate redundant register/stack access code Kees Cook <keescook@chromium.org> - 2015-06-15 22:50 +0200
  Re: [PATCH 0/2] Consolidate redundant register/stack access code David Long <dave.long@linaro.org> - 2015-06-15 23:00 +0200

csiph-web