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


Groups > linux.kernel > #1448709

Re: [PATCH 2/3] x86: add some better documentation for probe_kernel_address()

Path csiph.com!feeder.erje.net!1.us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news.unit0.net!news.panservice.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomod
From Andy Lutomirski <luto@amacapital.net>
Newsgroups linux.kernel
Subject Re: [PATCH 2/3] x86: add some better documentation for probe_kernel_address()
Date Fri, 22 Jul 2016 20:20:01 +0200
Message-ID <rXNdf-Tw-7@gated-at.bofh.it> (permalink)
References <rXN3z-Qn-3@gated-at.bofh.it> <rXN3A-Qn-25@gated-at.bofh.it>
X-Original-To Dave Hansen <dave@sr71.net>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=qPnRkmPHmLh6nbCE955v/ZuClYROXte3v6ByNRpgcA4=; b=IzSel19LEZa7oxc505J4VchHF7jxU2QOmW+8Q7Tb1sg+L9TmedQVYE1g1QeWwi04rJ VU84FOwUC8CyUtY+scpLVOYpAHP03c27uli7roEAXDirOE7xhTr0o+vdfRAgBvd7g8ax QN/2KRpRR9fMrTDFvJ2AVtKzjZWnr4o/V7QTfk82AY/t8NG13NhLjhoHOHuzwti0JImL jq2t+LPXLgtT5p35ev5eF9PRfXNKC5G7oSoYEshwO7ymu2dFvAzrc5oR8Eixj3w1FXbk ZjSseBeeDVNlvjQC/BinfAa23HrRVe7a0eWtDUo+7sItoC9VqjGlPlETRJ3geyZ63dCL HOXg==
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:from:date :message-id:subject:to:cc; bh=qPnRkmPHmLh6nbCE955v/ZuClYROXte3v6ByNRpgcA4=; b=hE0J5s7o4U9lG+cBLEVQubqxiVL3OcA1MxCuk/ED623n6+QRuhWVdgX6kuFZQ3dZjs QLyj1/8RtYdS6sMB+cBj6HJc5yyMruTE9+d97cQXo5gx1lKH1Xijtbf/aVsc7BAFTN6X T7khPdg3LYSp+ux5xdwbASRPp4OutUI6FZLAsZjzZku+bvE0H5fG/3DL0JgISPIbheP5 SKFMty2Am9eqGrMB/zmtuZ6w6eM8tLPBk3hRDxEx6RIBJLi2BrdzUOVBPWQOvuuAPW50 2NVot5+O6Cj34nl+jhNGvzdI6WJ8tqriaxrrLXAd7B/dEb7eFiUQQJf+mDp/TfcA4Mhs k7nQ==
X-Gm-Message-State AEkoouu8Mw4IXcc4y0hNPkXr8/Mmrn6F482HC1BPAp5ei8MaxXymhNdi0SGFLeyKmL2cYaxLMj5KizPaxJNzMI8o
X-Received by 10.176.65.66 with SMTP id j60mr2549365uad.65.1469211035438; Fri, 22 Jul 2016 11:10:35 -0700 (PDT)
MIME-Version 1.0
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 17
Organization linux.* mail to news gateway
X-Original-Cc "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, X86 ML <x86@kernel.org>, Dave Hansen <dave.hansen@linux.intel.com>
X-Original-Date Fri, 22 Jul 2016 11:10:16 -0700
X-Original-Message-ID <CALCETrXNUCzE3V-Ef3yXNjojp3V_Z-idfMDdYb3T5bq-EbcOLA@mail.gmail.com>
X-Original-References <20160722180310.99F5BCFF@viggo.jf.intel.com> <20160722180313.59F73015@viggo.jf.intel.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1448709

Show key headers only | View raw


On Jul 22, 2016 11:03 AM, "Dave Hansen" <dave@sr71.net> wrote:
>
>
> From: Dave Hansen <dave.hansen@linux.intel.com>
>
> probe_kernel_address() has an unfortunate name since it is used
> to probe kernel *and* userspace addresses.  Add a comment
> explaining some of the situation to help the next developer who
> might make the silly assumption that it is for probing kernel
> addresses.

This can't work on architectures like s390 that have separate,
overlapping user and kernel address spaces.  Maybe we should fix x86
to stop abusing it and use get_user instead.  (In which case, your new
function should be called get_user_insn_byte or similar.)

--Andy

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


Thread

[PATCH 0/3] x86, pkeys: fix prefetch/pkeys interaction Dave Hansen <dave@sr71.net> - 2016-07-22 20:10 +0200
  [PATCH 2/3] x86: add some better documentation for probe_kernel_address() Dave Hansen <dave@sr71.net> - 2016-07-22 20:10 +0200
    Re: [PATCH 2/3] x86: add some better documentation for probe_kernel_address() Andy Lutomirski <luto@amacapital.net> - 2016-07-22 20:20 +0200
      Re: [PATCH 2/3] x86: add some better documentation for  probe_kernel_address() Dave Hansen <dave@sr71.net> - 2016-07-22 20:20 +0200
        Re: [PATCH 2/3] x86: add some better documentation for probe_kernel_address() Andy Lutomirski <luto@amacapital.net> - 2016-07-22 20:30 +0200
  [PATCH 3/3] x86, pkeys: allow instruction fetches in presence of pkeys Dave Hansen <dave@sr71.net> - 2016-07-22 20:10 +0200

csiph-web