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]
Date:	Sat, 30 Nov 2013 16:20:13 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Jiri Kosina <jkosina@...e.cz>
Cc:	Andi Kleen <andi@...stfloor.org>, linux-kernel@...r.kernel.org,
	torvalds@...ux-foundation.org, x86@...nel.org,
	Andi Kleen <ak@...ux.intel.com>,
	"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...nel.org>,
	Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH] Add a text_poke syscall v2

On 11/30, Jiri Kosina wrote:
>
> On Fri, 29 Nov 2013, Oleg Nesterov wrote:
>
> > > > Andi, et al. I am going to discuss the things I do not really
> > > > understand, probably this can't make any sense, but...
> > >
> > > I think it's enough to set the dirty bit in the underlying
> > > struct page, no need to play games with the PTE.
> >
> > Ah, sorry for confusion, I guess you misunderstood.
> >
> > I meant, perhaps sys_text_poke() doesn't the in-kernel text_poke
> > machinery altogether?
> >
> > Can't we invalidate pte (so that any user will stuck in page fault),
> > update the page(s), restore the pte and drop the locks?
>
> Do you think this'd be faster than the int3-based aproach?

No.

And more, I simply do not know if it would be slower or faster, and how
much. Just I hope that this won't be "much" slower.

OTOH, this is obviously more scalable, and this way sys_text_poke() won't
block, say, jump_label or kprobes. Not sure this actually matters though.

> We have moved from using stop_machine() to int3-based patching exactly
> because it's much more lightweight.

Oh, I do not think it makes sense to compare stop_machine() with this
approach...

Oleg.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ