Date: Fri, 11 Nov 2016 18:57:41 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308538 - head/sys/dev/cpuctl Message-ID: <201611111857.uABIvfp8083721@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611111857.uABIvfp8083721>