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


Groups > linux.kernel > #1671859

Re: [criu] 1M guard page ruined restore

From Cyrill Gorcunov <gorcunov@gmail.com>
Newsgroups linux.kernel
Subject Re: [criu] 1M guard page ruined restore
Date 2017-06-21 20:00 +0200
Message-ID <tUS54-VR-13@gated-at.bofh.it> (permalink)
References (2 earlier) <tUQFY-8uH-7@gated-at.bofh.it> <tUQFY-8uH-9@gated-at.bofh.it> <tUQFY-8uH-5@gated-at.bofh.it> <tURiF-zB-1@gated-at.bofh.it> <tURsl-E0-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Jun 21, 2017 at 07:15:45PM +0200, Oleg Nesterov wrote:
> On 06/21, Oleg Nesterov wrote:
> >
> > On 06/21, Cyrill Gorcunov wrote:
> > >
> > > On Wed, Jun 21, 2017 at 05:57:30PM +0200, Oleg Nesterov wrote:
> > > > >
> > > > > 	p = fake_grow_down;
> > > > > 	*p-- = 'c';
> > > >
> > > > I guess this works? I mean, *p-- = 'c' should not fail...
> > >
> > > It fails.
> > 
> > Hmm. Impossible ;) could you add the additional printf's to re-check?
> 
> Yes, please...

I meant of course second store, sorry for confusion :)

> 
> > > 	p = fake_grow_down;
> > > 	*p-- = 'c';
> > 
> > once again, I can't believe this STORE can fail...
> > 
> > > 	*p = 'b';
> > 
> > Ah. I forgot about another kernel "feature" ;) not related to the recent guard
> > page changes...
> 
> On the second thought it is actually connected, and it seems we really need to
> remove this code in do_page_fault... I'll re-check tomorrow, need to run away.
> 
> > Could you test the patch below?
> > 
> > Oleg.
> > 
> > 
> > diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
> > index 8ad91a0..edc5d68 100644
> > --- a/arch/x86/mm/fault.c
> > +++ b/arch/x86/mm/fault.c
> > @@ -1416,7 +1416,7 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code,
> >  		 * and pusha to work. ("enter $65535, $31" pushes
> >  		 * 32 pointers and then decrements %sp by 65535.)
> >  		 */
> > -		if (unlikely(address + 65536 + 32 * sizeof(unsigned long) < regs->sp)) {
> > +if (0)		if (unlikely(address + 65536 + 32 * sizeof(unsigned long) < regs->sp)) {
> >  			bad_area(regs, error_code, address);
> >  			return;
> >  		}

It does the trick

[root@fc2 ~]# ~/st2
start_addr 7fce7c3f8000
start_addr 7fce7c529000
test_addr 7fce7c527000
grow_down 7fce7c526000

	Cyrill

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


Thread

[criu] 1M guard page ruined restore Cyrill Gorcunov <gorcunov@gmail.com> - 2017-06-20 10:00 +0200
  Re: [criu] 1M guard page ruined restore Hugh Dickins <hughd@google.com> - 2017-06-20 12:30 +0200
    Re: [criu] 1M guard page ruined restore Cyrill Gorcunov <gorcunov@gmail.com> - 2017-06-20 12:50 +0200
    Re: [criu] 1M guard page ruined restore Cyrill Gorcunov <gorcunov@gmail.com> - 2017-06-21 18:30 +0200
      Re: [criu] 1M guard page ruined restore Oleg Nesterov <oleg@redhat.com> - 2017-06-21 19:10 +0200
        Re: [criu] 1M guard page ruined restore Oleg Nesterov <oleg@redhat.com> - 2017-06-21 19:20 +0200
          Re: [criu] 1M guard page ruined restore Cyrill Gorcunov <gorcunov@gmail.com> - 2017-06-21 20:00 +0200
        Re: [criu] 1M guard page ruined restore Willy Tarreau <w@1wt.eu> - 2017-06-21 19:20 +0200
        Re: [criu] 1M guard page ruined restore Oleg Nesterov <oleg@redhat.com> - 2017-06-21 19:40 +0200
          Re: [criu] 1M guard page ruined restore Hugh Dickins <hughd@google.com> - 2017-06-22 03:30 +0200
            Re: [criu] 1M guard page ruined restore Cyrill Gorcunov <gorcunov@gmail.com> - 2017-06-22 10:10 +0200
        Re: [criu] 1M guard page ruined restore Oleg Nesterov <oleg@redhat.com> - 2017-06-22 16:30 +0200
          Re: [criu] 1M guard page ruined restore Cyrill Gorcunov <gorcunov@gmail.com> - 2017-06-22 17:10 +0200
    Re: [criu] 1M guard page ruined restore Cyrill Gorcunov <gorcunov@gmail.com> - 2017-06-21 18:30 +0200
      Re: [criu] 1M guard page ruined restore Oleg Nesterov <oleg@redhat.com> - 2017-06-21 18:40 +0200
      Re: [criu] 1M guard page ruined restore Cyrill Gorcunov <gorcunov@gmail.com> - 2017-06-21 18:50 +0200
  Re: [criu] 1M guard page ruined restore Oleg Nesterov <oleg@redhat.com> - 2017-06-20 13:00 +0200
    Re: [criu] 1M guard page ruined restore Cyrill Gorcunov <gorcunov@gmail.com> - 2017-06-20 13:20 +0200
    Re: [criu] 1M guard page ruined restore Cyrill Gorcunov <gorcunov@gmail.com> - 2017-06-20 14:00 +0200

csiph-web