lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160824071308.GA24311@localhost.localdomain>
Date:   Wed, 24 Aug 2016 12:43:08 +0530
From:   Pratyush Anand <panand@...hat.com>
To:     Oleg Nesterov <oleg@...hat.com>
Cc:     linux-arm-kernel@...ts.infradead.org, linux@....linux.org.uk,
        catalin.marinas@....com, will.deacon@....com,
        linux-kernel@...r.kernel.org, wcohen@...hat.com,
        dave.long@...aro.org, steve.capper@...aro.org,
        srikar@...ux.vnet.ibm.com, vijaya.kumar@...iumnetworks.com,
        Shi Yang <yang.shi@...aro.org>,
        Andre Przywara <andre.przywara@....com>,
        Ard Biesheuvel <ard.biesheuvel@...aro.org>,
        Ashok Kumar <ashoks@...adcom.com>,
        James Morse <james.morse@....com>,
        Jungseok Lee <jungseoklee85@...il.com>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Mark Rutland <mark.rutland@....com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Robin Murphy <robin.murphy@....com>,
        Sandeepa Prabhu <sandeepa.s.prabhu@...il.com>,
        Shaokun Zhang <zhangshaokun@...ilicon.com>,
        "Suzuki K. Poulose" <suzuki.poulose@....com>,
        Vladimir Murzin <vladimir.murzin@....com>
Subject: Re: [PATCH 5/5] arm64: Add uprobe support

Hi Oleg,

Thanks a lot for your review, and sorry for delayed response.

On 09/08/2016:08:49:44 PM, Oleg Nesterov wrote:
> On 08/02, Pratyush Anand wrote:
> >
> > This patch adds support for uprobe on ARM64 architecture.
> 
> I know nothing about ARM, so I can't actually review this change.
> But it looks good to me ;)
> 
> Just one note,
> 
> > +int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs)
> > +{
> > +	struct uprobe_task *utask = current->utask;
> > +
> > +	/* saved fault code is restored in post_xol */
> > +	utask->autask.saved_fault_code = current->thread.fault_code;
> > +
> > +	/* An invalid fault code between pre/post xol event */
> > +	current->thread.fault_code = UPROBE_INV_FAULT_CODE;
> > +
> > +	/* Instruction point to execute ol */
> > +	instruction_pointer_set(regs, utask->xol_vaddr);
> > +
> > +	user_enable_single_step(current);
> 
> I don't think we want user_{enable,disable{_single_step in the long term,
> please look at 9bd1190a11c9d2 "uprobes/x86: Do not (ab)use TIF_SINGLESTEP
> /user_*_single_step() for single-stepping". it seems that ARM64 sets/clears
> TIF_SINGLESTEP. You can also lool at saved_tf logic, probably ARM64 needs
> the same.

IIUC, then you mean that TIF_SINGLESTEP is a per task flag, while
arch_uprobe_pre/post_xol() should enable/disable single stepping using a per
uprobe_task, and we should have a flag in "struct arch_uprobe_task" to handle
this, right?

> 
> However, I agree we can do this later and initial version can use these
> ptrace helpers.

Yes, I would also like to do that change latter, because these set of patches
have already been tested heavily with systemtap, so it would be better to go
with an incremental changes latter on.

~Pratyush

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ