Author: kib
Date: Fri Nov 11 18:57:41 2016
New Revision: 308538
URL: https://svnweb.freebsd.org/changeset/base/308538

Log:
  Increase the max allowed size of the microcode update blob for x86.
  
  Newer CPUs (SkyLakes) have updates of 100K size, which is bigger than
  current limit 32K. Increase it to 4M but leave the check around to
  prevent kernel memory allocator abuse.  Some time ago, the memory for
  update was allocated by contigmalloc(9), and it was reasonable to be
  conservative as much as possible.  Since all uses of contigmalloc(9)
  appear to be either misunderstanding or too cautious, and were
  removed, provide more slack than strictly neccessary.
  
  Submitted by: Oliver Pinter
  MFC after:    1 week
  Differential revision:        https://reviews.freebsd.org/D8486

Modified:
  head/sys/dev/cpuctl/cpuctl.c

Modified: head/sys/dev/cpuctl/cpuctl.c
==============================================================================
--- head/sys/dev/cpuctl/cpuctl.c        Fri Nov 11 18:47:53 2016        
(r308537)
+++ head/sys/dev/cpuctl/cpuctl.c        Fri Nov 11 18:57:41 2016        
(r308538)
@@ -63,7 +63,7 @@ static d_ioctl_t cpuctl_ioctl;
 # define       DPRINTF(...)
 #endif
 
-#define        UCODE_SIZE_MAX  (32 * 1024)
+#define        UCODE_SIZE_MAX  (4 * 1024 * 1024)
 
 static int cpuctl_do_msr(int cpu, cpuctl_msr_args_t *data, u_long cmd,
     struct thread *td);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to