Bug 126158

Summary: [vm] [patch] integer overflow in vm_pageout.c
Product: Base System Reporter: Dmitrij Tejblum <tejblum>
Component: kernAssignee: Alan Cox <alc>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 7.0-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Dmitrij Tejblum 2008-08-01 12:50:02 UTC
The function vm_pageout_page_stats() compute 
(vm_pageout_stats_max * cnt.v_active_count) / cnt.v_page_count
at the start. The intention is to compute
(cnt.v_active_count / cnt.v_page_count) fraction of vm_pageout_stats_max.
But on machine with relatively large amount of memory,
vm_pageout_stats_max * cnt.v_active_count easily overflows 32-bit numbers.
Say, on some our machines with 16G RAM, cnt.v_active_count is about 3000000,
and default value of vm_pageout_stats_max is about 100000.
Comment 1 dfilter service freebsd_committer freebsd_triage 2008-09-21 19:01:48 UTC
alc         2008-09-21 18:01:34 UTC

  FreeBSD src repository

  Modified files:
    sys/vm               vm_pageout.c 
  Log:
  SVN rev 183236 on 2008-09-21 18:01:34Z by alc
  
  Prevent an integer overflow in vm_pageout_page_stats() on machines with a
  large number of physical pages.
  
  PR:             126158
  Submitted by:   Dmitry Tejblum
  MFC after:      3 days
  
  Revision  Changes    Path
  1.299     +2 -1      src/sys/vm/vm_pageout.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 2 Alan Cox freebsd_committer freebsd_triage 2008-09-21 21:53:47 UTC
State Changed
From-To: open->patched

Patch applied to HEAD.
Comment 3 dfilter service freebsd_committer freebsd_triage 2008-09-25 07:12:26 UTC
alc         2008-09-25 06:11:58 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_7)
    sys/vm               vm_pageout.c 
  Log:
  SVN rev 183338 on 2008-09-25 06:11:58Z by alc
  
  MFC r183236
    Prevent an integer overflow in vm_pageout_page_stats() on machines with a
    large number of physical pages.
  
  PR:             126158
  Approved by:    re (kib)
  
  Revision   Changes    Path
  1.292.2.4  +2 -1      src/sys/vm/vm_pageout.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 dfilter service freebsd_committer freebsd_triage 2008-09-26 04:06:39 UTC
alc         2008-09-26 03:06:08 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_6)
    sys/vm               vm_pageout.c 
  Log:
  SVN rev 183369 on 2008-09-26 03:06:08Z by alc
  
  MFC r183236
    Prevent an integer overflow in vm_pageout_page_stats() on machines with a
    large number of physical pages.
  
  PR:             126158
  Approved by:    re (kib)
  
  Revision   Changes    Path
  1.268.2.6  +2 -1      src/sys/vm/vm_pageout.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 Alan Cox freebsd_committer freebsd_triage 2008-09-26 04:06:52 UTC
State Changed
From-To: patched->closed

The patch has been applied to RELENG_6 and RELENG_7. 


Comment 6 Alan Cox freebsd_committer freebsd_triage 2008-09-26 04:06:52 UTC
Responsible Changed
From-To: freebsd-bugs->alc

The patch has been applied to RELENG_6 and RELENG_7.