Compare commits

...

4 Commits
1.7.4 ... 1.7.5

Author SHA1 Message Date
daed585347 release: 1.7.5: fix ihk_*str() functions
Change-Id: Ic412029f856f34a10724f03e36f211f6026acd8e
2021-03-11 12:18:43 +09:00
11d7229525 docs: spec: ihk_reserve_mem_conf_str: use defaults for those not specified
Change-Id: I7cfddd3203b952cabb919ea6401e226e151e696a
2021-03-11 02:26:18 +00:00
e43d52df20 Revert "mcexec_open_exec: make fput and add to mckernel_exec_files atomic"
This reverts commit c80ea0ed23.

Change-Id: I0541e8af5157c7128f8774f6581cc207d13b649a
2021-03-10 14:21:57 +09:00
1c0da3c5b9 Revert "mcexec_open_exec: guard fput and add to mckernel_exec_files with spin_lock_irqsave"
This reverts commit cba263ff12.

Change-Id: Ifcd03a2048a3f9d6c155dd8ecd522081b5dde276
2021-03-10 14:21:49 +09:00
5 changed files with 195 additions and 25 deletions

View File

@ -7,7 +7,7 @@ endif (NOT CMAKE_BUILD_TYPE)
enable_language(C ASM)
project(mckernel C ASM)
set(MCKERNEL_VERSION "1.7.4")
set(MCKERNEL_VERSION "1.7.5")
# See "Fedora Packaging Guidelines -- Versioning"
set(MCKERNEL_RELEASE "")

View File

@ -1,3 +1,173 @@
=============================================
Version 1.7.5 (Mar 11, 2021)
=============================================
----------------------
IHK major updates
----------------------
N/A
------------------------
IHK major bug fixes
------------------------
#. ihklib: fix cgroup cpuset.cpus/mems check when using krm
#. ihklib: ihk_reserve_mem_conf_str: set default values to those not specified
----------------------
McKernel major updates
----------------------
N/A
------------------------
McKernel major bug fixes
------------------------
N/A
=============================================
Version 1.7.4 (Mar 7, 2021)
=============================================
----------------------
IHK major updates
----------------------
N/A
------------------------
IHK major bug fixes
------------------------
N/A
----------------------
McKernel major updates
----------------------
N/A
------------------------
McKernel major bug fixes
------------------------
N/A
=============================================
Version 1.7.3 (Mar 5, 2021)
=============================================
----------------------
IHK major updates
----------------------
N/A
------------------------
IHK major bug fixes
------------------------
N/A
----------------------
McKernel major updates
----------------------
N/A
------------------------
McKernel major bug fixes
------------------------
N/A
=============================================
Version 1.7.2 (Mar 5, 2021)
=============================================
----------------------
IHK major updates
----------------------
#. ihklib: add *_str() functions for reserve, assign, IKC-map, kargs
#. smp: make smp_call_func() arch independent
------------------------
IHK major bug fixes
------------------------
#. ihklib: ihk_reserve_mem: fix capped best-effort
#. TO RESET: fake missing NUMA node pieces, 90% memory limit
#. ihklib: ihk_reserve_mem_conf: range-check for IHK_RESERVE_MEM_MAX_SIZE_RATIO_ALL
#. ihklib: ihk_os_kargs: check if "hidos" is included
#. SMP: omit slab/slub shrink, use 95% limit by default
#. check cpu / numa cgroup set by krm
#. SMP: __ihk_smp_reserve_mem: add __GFP_COMP to __GFP_ATOMIC allocation
#. ihk_register_device: record minor to IHK device object
----------------------
McKernel major updates
----------------------
#. mcexec: memory policy control by environmental variable
#. mempolicy: Support MPOL_INTERLEAVE
#. uti: futex call function in mcctrl
#. uti: integrate libuti and redirect to mck/libuti.so
#. uti: integrate syscall_intercept
#. shmobj: support large page
#. xpmem: support large page
#. MM: handle zero_at_free in page faults
------------------------
McKernel major bug fixes
------------------------
#. TO RESET: stack changes
#. Tofu: keep track of stags per memory range
#. Tofu: match page sizes to MBPT and fault PTEs if not present
#. Tofu: fix phys addr calculation for contiguous pages in MBPT/BCH update
#. rus_vm_fault: vmf_insert_pfn: treat VM_FAULT_NOPAGE as success
#. Tofu: mcctrl side MMU notifier and CQ/BCH cleanup
#. copy_user_ranges: copy straight_start of struct vm_range
#. mcctrl: abort on invalid addr in mcexec_transfer_image()
#. mcctrl: fix access to uninitialized usrdata->cpu_topology_list
#. mcexec: propagate error in __NR_gettid handler
#. mcexec_transfer_image(): map exact size of remote memory (instead of forcing PAGE_SIZE)
#. xpmem: fault stack area of remote process if VM range doesn't yet exist
#. Tofu: fault stack area if VM range doesn't exist in STAG registration
#. __mcctrl_os_read_write_cpu_register: fix timeout
#. mbind: Use range_policy's numamask as priority on MPOL_BIND
#. migrate: Don't migrate on in-kernel interrupt
#. Send a signal to mcexec after switching to that process.
#. uti: fix syscall response is mis-consumed by __do_in_kernel_irq_syscall
#. uti: fix handling UTI_CPU_SET env
#. do_execveat: kill instead of panic when init_process_stack fails
#. remote_page_fault is handled by the offloaded thread.
#. coredump: fix behavior when gencore fail
#. xpmem: truncates the size of xpmem_attach at the page boundary (workaround for fjmpi)
#. __mcctrl_os_read_write_cpu_register: spin timeout in mcctrl_ikc_send_wait()
=============================================
Version 1.7.1 (Dec 23, 2020)
=============================================
----------------------
IHK major updates
----------------------
#. d5d5c23 Tofu: support for barrier gate
#. Tofu: proper cleanup of premapped DMA regions
#. Tofu: initial version
#. SMP: try with GFP_ATOMIC as well in mem reserve
------------------------
IHK major bug fixes
------------------------
#. ihklib: ihk(_os)_query_{cpu,mem}: allow to pass empty array
#. SMP: non compound page free and GFP_ATOMIC
#. ihk_get_num_os_instances: don't open /dev/mcdN
#. ihklib: ihk_create_os_str: fix variable prefix
----------------------
McKernel major updates
----------------------
#. stragiht map: creates a straight map covering the whole physical memory, and gives virtual address ranges out of it to maps to which physical pages are allocated on map
#. free-time, lazy, potentially Linux-side page-zeroing
#. Tofu built-in driver: supports memory registration and barrier gate setup
#. kmalloc cache
------------------------
McKernel major bug fixes
------------------------
#. mmap: return -EINVAL for non-anonymous, MAP_HUGETLB map
#. kernel: increase stack size
#. Tofu: proper cleanup of device files when mcexec gets killed
=============================================
Version 1.7.0 (Nov 25, 2020)
=============================================

View File

@ -702,7 +702,7 @@ IHKはLinuxに以下の機能を提供する。
\end{tabular}
\vspace{-0em}
\end{table}
\\なお、これ以外の設定は無視される。
\\上記の項目のうち、文字列で指定されなかったものに対してはデフォルト値が設定される。また、これ以外の設定項目は無視される。
\FloatBarrier
\subsubsection*{戻り値}

View File

@ -1799,7 +1799,8 @@ out:
}
LIST_HEAD(mckernel_exec_files);
static DEFINE_SPINLOCK(mckernel_exec_file_lock);
DEFINE_SEMAPHORE(mckernel_exec_file_lock);
struct mckernel_exec_file {
ihk_os_t os;
@ -1976,7 +1977,6 @@ int mcexec_open_exec(ihk_os_t os, char * __user filename)
char *fullpath = NULL;
char *kfilename = NULL;
int len;
unsigned long flags;
if (os_ind < 0) {
return -EINVAL;
@ -1991,42 +1991,36 @@ int mcexec_open_exec(ihk_os_t os, char * __user filename)
kfilename = kmalloc(PATH_MAX, GFP_KERNEL);
if (!kfilename) {
retval = -ENOMEM;
kfree(pathbuf);
goto out;
}
len = strncpy_from_user(kfilename, filename, PATH_MAX);
if (unlikely(len < 0)) {
retval = -EINVAL;
goto out;
goto out_free;
}
/* fget and list_add should not be interrupted by hardware interrupt */
spin_lock_irqsave(&mckernel_exec_file_lock, flags);
file = open_exec(kfilename);
retval = PTR_ERR(file);
if (IS_ERR(file)) {
spin_unlock_irqrestore(&mckernel_exec_file_lock, flags);
goto out;
goto out_free;
}
fullpath = d_path(&file->f_path, pathbuf, PATH_MAX);
if (IS_ERR(fullpath)) {
fput(file);
spin_unlock_irqrestore(&mckernel_exec_file_lock, flags);
retval = PTR_ERR(fullpath);
goto out;
goto out_free;
}
mcef = kmalloc(sizeof(*mcef), GFP_KERNEL);
if (!mcef) {
fput(file);
spin_unlock_irqrestore(&mckernel_exec_file_lock, flags);
retval = -ENOMEM;
goto out;
goto out_put_file;
}
memset(mcef, 0, sizeof(struct mckernel_exec_file)); /* debug */
down(&mckernel_exec_file_lock);
/* Find previous file (if exists) and drop it */
list_for_each_entry(mcef_iter, &mckernel_exec_files, list) {
if (mcef_iter->os == os && mcef_iter->pid == task_tgid_vnr(current)) {
@ -2047,15 +2041,22 @@ int mcexec_open_exec(ihk_os_t os, char * __user filename)
/* Create /proc/self/exe entry */
add_pid_entry(os_ind, task_tgid_vnr(current));
proc_exe_link(os_ind, task_tgid_vnr(current), fullpath);
spin_unlock_irqrestore(&mckernel_exec_file_lock, flags);
up(&mckernel_exec_file_lock);
dprintk("%d open_exec and holding file: %s\n", (int)task_tgid_vnr(current),
kfilename);
retval = 0;
out:
kfree(kfilename);
kfree(pathbuf);
return 0;
out_put_file:
fput(file);
out_free:
kfree(pathbuf);
kfree(kfilename);
out:
return retval;
}
@ -2063,14 +2064,13 @@ int mcexec_close_exec(ihk_os_t os, int pid)
{
struct mckernel_exec_file *mcef = NULL;
int found = 0;
int os_ind = ihk_host_os_get_index(os);
unsigned long flags;
int os_ind = ihk_host_os_get_index(os);
if (os_ind < 0) {
return EINVAL;
}
spin_lock_irqsave(&mckernel_exec_file_lock, flags);
down(&mckernel_exec_file_lock);
list_for_each_entry(mcef, &mckernel_exec_files, list) {
if (mcef->os == os && mcef->pid == pid) {
allow_write_access(mcef->fp);
@ -2083,7 +2083,7 @@ int mcexec_close_exec(ihk_os_t os, int pid)
}
}
spin_unlock_irqrestore(&mckernel_exec_file_lock, flags);
up(&mckernel_exec_file_lock);
return (found ? 0 : EINVAL);
}

2
ihk

Submodule ihk updated: 17cd4c9656...0c568c8da6