Skip to content

Commit

Permalink
Fix some codespell warnings
Browse files Browse the repository at this point in the history
Brought to you by

	codespell -w

(using codespell v2.1.0).

Signed-off-by: Kir Kolyshkin <[email protected]>
  • Loading branch information
kolyshkin authored and avagin committed Apr 29, 2022
1 parent 3f18004 commit 0194ed3
Show file tree
Hide file tree
Showing 83 changed files with 124 additions and 124 deletions.
2 changes: 1 addition & 1 deletion Documentation/compel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ The parasitic code is compiled and converted to a header using *compel*, and inc

*#include "parasite.h"*

Following steps are perfomed to infect the victim process:
Following steps are performed to infect the victim process:

- stop the task: *int compel_stop_task(int pid);*
- prepare infection handler: *struct parasite_ctl *compel_prepare(int pid);*
Expand Down
2 changes: 1 addition & 1 deletion Documentation/criu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ be restored with *mount(src, mountpoint, flags, options)*. When used,
*dump* is expected to always succeed if a mountpoint is to be
auto-detected, however *restore* may fail (or do something wrong)
if the assumption for restore logic is incorrect. This option is
not compatable with *--external* *dev*.
not compatible with *--external* *dev*.

*--action-script* 'script'::
Add an external action script to be executed at certain stages.
Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ architecture changes should be reviewed by the chief maintainer.
Also the chief maintainer has the veto power on any change submitted
to any branch. Naturally, a change in the criu-dev branch can be reverted
after a chief maintainer veto, a change in the master branch must be
carefully reviwed by the chief maintainer and vetoed in advance.
carefully reviewed by the chief maintainer and vetoed in advance.

### How are maintainers added (and removed)?

Expand Down
2 changes: 1 addition & 1 deletion compel/arch/x86/src/lib/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ static int compel_fpuid(compel_cpuinfo_t *c)
memset(c->xstate_comp_offsets, 0xff, sizeof(c->xstate_comp_offsets));
memset(c->xstate_comp_sizes, 0xff, sizeof(c->xstate_comp_sizes));

/* start at the beginnning of the "extended state" */
/* start at the beginning of the "extended state" */
last_good_offset = offsetof(struct xsave_struct, extended_state_area);

/*
Expand Down
2 changes: 1 addition & 1 deletion compel/arch/x86/src/lib/include/uapi/asm/fpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ struct xsave_struct_ia32 {

typedef struct {
/*
* The FPU xsave area must be continious and FP_MIN_ALIGN_BYTES
* The FPU xsave area must be continuous and FP_MIN_ALIGN_BYTES
* aligned, thus make sure the compiler won't insert any hole here.
*/

Expand Down
2 changes: 1 addition & 1 deletion compel/arch/x86/src/lib/infect.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ int compel_get_task_regs(pid_t pid, user_regs_struct_t *regs, user_fpregs_struct

/*
* FPU fetched either via fxsave or via xsave,
* thus decode it accrodingly.
* thus decode it accordingly.
*/

pr_info("Dumping GP/FPU registers for %d\n", pid);
Expand Down
2 changes: 1 addition & 1 deletion compel/include/uapi/infect.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ struct infect_ctx {
unsigned long syscall_ip; /* entry point of infection */
unsigned long flags; /* fine-tune (e.g. faults) */

void (*child_handler)(int, siginfo_t *, void *); /* hander for SIGCHLD deaths */
void (*child_handler)(int, siginfo_t *, void *); /* handler for SIGCHLD deaths */
struct sigaction orig_handler;

open_proc_fn open_proc;
Expand Down
2 changes: 1 addition & 1 deletion compel/src/lib/handle-elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ int __handle_elf(void *mem, size_t size)
#ifdef ELF_S390
/*
* See also arch/s390/kernel/module.c/apply_rela():
* A PLT reads the GOT (global offest table). We can handle it like
* A PLT reads the GOT (global offset table). We can handle it like
* R_390_PC32DBL because we have linked statically.
*/
case R_390_PLT32DBL: /* PC relative on a PLT (predure link table) */
Expand Down
8 changes: 4 additions & 4 deletions compel/src/lib/infect.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,8 @@ static int parasite_run(pid_t pid, int cmd, unsigned long ip, void *stack, user_

ksigfillset(&block);
/*
* FIXME(issues/1429): SIGTRAP can't be blocked, otherwice its hanlder
* will be reseted to the default one.
* FIXME(issues/1429): SIGTRAP can't be blocked, otherwise its handler
* will be reset to the default one.
*/
ksigdelset(&block, SIGTRAP);
if (ptrace(PTRACE_SETSIGMASK, pid, sizeof(k_rtsigset_t), &block)) {
Expand Down Expand Up @@ -956,7 +956,7 @@ int compel_infect(struct parasite_ctl *ctl, unsigned long nr_threads, unsigned l
ctl->args_size = args_size;
parasite_size += ctl->args_size;

/* RESTORE_STACK_SIGFRAME needs a 64 bytes alignement */
/* RESTORE_STACK_SIGFRAME needs a 64 bytes alignment */
parasite_size = round_up(parasite_size, 64);

map_exchange_size = parasite_size;
Expand Down Expand Up @@ -1476,7 +1476,7 @@ int compel_run_in_thread(struct parasite_thread_ctl *tctl, unsigned int cmd)

/*
* compel_unmap() is used for unmapping parasite and restorer blobs.
* A blob can contain code for unmapping itself, so the porcess is
* A blob can contain code for unmapping itself, so the process is
* trapped on the exit from the munmap syscall.
*/
int compel_unmap(struct parasite_ctl *ctl, unsigned long addr)
Expand Down
2 changes: 1 addition & 1 deletion coredump/criu_coredump/coredump.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ def _gen_mem_chunk(self, pid, vma, size):

if page_mem is not None:
# Page from pages.img has higher priority
# than one from maped file on disk.
# than one from mapped file on disk.
page = page_mem

if page is None:
Expand Down
2 changes: 1 addition & 1 deletion criu/apparmor.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* Thus, the old code that saves and restores AA profiles is still relevant, we
* just need to add the new code in this file to walk the namespace and dump
* any blobs in that AA namespace, and then restore these blobs on restore so
* that the profiles the old code tries to use are actualy present.
* that the profiles the old code tries to use are actually present.
*/

static AaNamespace **namespaces = NULL;
Expand Down
2 changes: 1 addition & 1 deletion criu/arch/s390/crtools.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ static UserS390GsCbEntry *allocate_gs_cb(void)
}

/*
* Free Guareded Storage control blocks
* Free Guarded Storage control blocks
*/
static void free_gs_cb(UserS390GsCbEntry *gs_cb)
{
Expand Down
2 changes: 1 addition & 1 deletion criu/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ int check_options(void)
if (opts.link_remap_ok)
pr_info("Will allow link remaps on FS\n");
if (opts.weak_sysctls)
pr_info("Will skip non-existant sysctls on restore\n");
pr_info("Will skip non-existent sysctls on restore\n");

if (opts.deprecated_ok)
pr_info("Turn deprecated stuff ON\n");
Expand Down
4 changes: 2 additions & 2 deletions criu/cr-dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ static int dump_task_threads(struct parasite_ctl *parasite_ctl, const struct pst
* What this routine does is just reads pid-s of dead
* tasks in item's children list from item's ns proc.
*
* It does *not* find wihch real pid corresponds to
* It does *not* find which real pid corresponds to
* which virtual one, but it's not required -- all we
* need to dump for zombie can be found in the same
* ns proc.
Expand Down Expand Up @@ -1472,7 +1472,7 @@ static void alarm_handler(int signo)
pr_err("Timeout reached. Try to interrupt: %d\n", alarm_attempts);
if (alarm_attempts++ < 5) {
alarm(1);
/* A curren syscall will be exited with EINTR */
/* A current syscall will be exited with EINTR */
return;
}
pr_err("FATAL: Unable to interrupt the current operation\n");
Expand Down
2 changes: 1 addition & 1 deletion criu/cr-restore.c
Original file line number Diff line number Diff line change
Expand Up @@ -2061,7 +2061,7 @@ static int finalize_restore_detach(void)
for (i = 0; i < item->nr_threads; i++) {
pid = item->threads[i].real;
if (pid < 0) {
pr_err("pstree item has unvalid pid %d\n", pid);
pr_err("pstree item has invalid pid %d\n", pid);
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion criu/eventpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ static int dump_one_eventpoll(int lfd, u32 id, const struct fd_parms *p)
* files is tricky: we need to use kcmp
* to find out where file came from. Until
* it's implemented lets use simpler approach
* just check the targets are blonging to the
* just check the targets are belonging to the
* pid's file set.
*/
if (p->dfds) {
Expand Down
10 changes: 5 additions & 5 deletions criu/files-reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@ static int get_build_id_32(Elf32_Ehdr *file_header, unsigned char **build_id, co
return -1;

/*
* If the file doesn't have atleast 1 program header entry, it definitely can't
* If the file doesn't have at least 1 program header entry, it definitely can't
* have a build-id.
*/
if (!file_header->e_phnum) {
Expand Down Expand Up @@ -1490,7 +1490,7 @@ static int get_build_id_64(Elf64_Ehdr *file_header, unsigned char **build_id, co
return -1;

/*
* If the file doesn't have atleast 1 program header entry, it definitely can't
* If the file doesn't have at least 1 program header entry, it definitely can't
* have a build-id.
*/
if (!file_header->e_phnum) {
Expand Down Expand Up @@ -1621,7 +1621,7 @@ static int store_validation_data_build_id(RegFileEntry *rfe, int lfd, const stru
int fd;

/*
* Checks whether the file is atleast big enough to try and read the first
* Checks whether the file is at least big enough to try and read the first
* four (SELFMAG) bytes which should correspond to the ELF magic number
* and the next byte which indicates whether the file is 32-bit or 64-bit.
*/
Expand Down Expand Up @@ -1659,7 +1659,7 @@ static int store_validation_data_build_id(RegFileEntry *rfe, int lfd, const stru
* This routine stores metadata about the open file (File size, build-id, CRC32C checksum)
* so that validation can be done while restoring to make sure that the right file is
* being restored.
* Returns true if atleast some metadata was stored, if there was an error it returns false.
* Returns true if at least some metadata was stored, if there was an error it returns false.
*/
static bool store_validation_data(RegFileEntry *rfe, const struct fd_parms *p, int lfd)
{
Expand Down Expand Up @@ -2008,7 +2008,7 @@ static int rfi_remap(struct reg_file_info *rfi, int *level)
BUG_ON(tmi->s_dev != rmi->s_dev);
BUG_ON(tmi->s_dev != mi->s_dev);

/* Calcalate paths on the device (root mount) */
/* Calculate paths on the device (root mount) */
convert_path_from_another_mp(rfi->path, path, sizeof(_path), mi, tmi);
convert_path_from_another_mp(rfi->remap->rpath, rpath, sizeof(_rpath), rmi, tmi);

Expand Down
2 changes: 1 addition & 1 deletion criu/fsnotify.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ static char *get_mark_path(const char *who, struct file_remap *remap, FhEntry *f
/*
* fanotify/inotify open syscalls want path to attach
* watch to. But the only thing we have is an FD obtained
* via fhandle. Fortunatelly, when trying to attach the
* via fhandle. Fortunately, when trying to attach the
* /proc/pid/fd/ link, we will watch the inode the link
* points to, i.e. -- just what we want.
*/
Expand Down
4 changes: 2 additions & 2 deletions criu/include/mount-v2.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ struct sharing_group {
struct list_head mnt_list;

/*
* List of dependant shared groups:
* List of dependent shared groups:
* - all siblings have equal master_id
* - the parent has shared_id equal to children's master_id
*
* This is a bit tricky: parent pointer indicates if there is one
* parent sharing_group in list or only siblings.
* So for traversal if parent pointer is set we can do:
* list_for_each_entry(t, &sg->parent->children, siblings)
* and overvise we can do:
* and otherwise we can do:
* list_for_each_entry(t, &sg->siblings, siblings)
*/
struct list_head children;
Expand Down
2 changes: 1 addition & 1 deletion criu/include/mount.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ struct ns_id;
/*
* Here are a set of flags which we know how to handle for the one mount call.
* All of them except MS_RDONLY are set only as mnt flags.
* MS_RDONLY is set for both mnt ans sb flags, so we can restore it for one
* MS_RDONLY is set for both mnt and sb flags, so we can restore it for one
* mount call only if it set for both masks.
*/
#define MS_MNT_KNOWN_FLAGS (MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_NOATIME | MS_NODIRATIME | MS_RELATIME | MS_RDONLY)
Expand Down
6 changes: 3 additions & 3 deletions criu/kerndat.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,14 +756,14 @@ static int kerndat_detect_stack_guard_gap(void)

/*
* When reading /proc/$pid/[s]maps the
* start/end addresses might be cutted off
* start/end addresses might be cut off
* with PAGE_SIZE on kernels prior 4.12
* (see kernel commit 1be7107fbe18ee).
*
* Same time there was semi-complete
* patch released which hitted a number
* of repos (Ubuntu, Fedora) where instead
* of PAGE_SIZE the 1M gap is cutted off.
* of PAGE_SIZE the 1M gap is cut off.
*/
if (start == (unsigned long)mem) {
kdat.stack_guard_gap_hidden = false;
Expand Down Expand Up @@ -1111,7 +1111,7 @@ static int kerndat_uffd(void)
if (err == ENOSYS)
return 0;
if (err == EPERM) {
pr_info("Lazy pages are not permited\n");
pr_info("Lazy pages are not permitted\n");
return 0;
}
pr_err("Lazy pages are not available\n");
Expand Down
2 changes: 1 addition & 1 deletion criu/libnetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static int nlmsg_receive(char *buf, int len, int (*cb)(struct nlmsghdr *, struct
}

/*
* Default errror handler: just point our an error
* Default error handler: just point our an error
* and pass up to caller.
*/
static int rtnl_return_err(int err, struct ns_id *ns, void *arg)
Expand Down
14 changes: 7 additions & 7 deletions criu/mount-v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ int resolve_shared_mounts_v2(void)
/*
* Collect sharing groups tree. Mount propagation between sharing
* groups only goes down this tree, meaning that only mounts of same or
* descendant sharing groups recieve mount propagation.
* descendant sharing groups receive mount propagation.
*/
list_for_each_entry(sg, &sharing_groups, list) {
if (sg->master_id) {
Expand Down Expand Up @@ -270,7 +270,7 @@ static int do_new_mount_v2(struct mount_info *mi)
* Mount-v2 relies that before mount tree is constructed all mounts
* should remain private. Newly created mounts can become non-private
* initially depending on parent/source sharing, let's be as explicit
* as posible here and make it obvious that mount becomes private.
* as possible here and make it obvious that mount becomes private.
*/
if (mount(NULL, mi->plain_mountpoint, NULL, MS_PRIVATE, NULL)) {
pr_perror("Can't remount %s with MS_PRIVATE", mi->plain_mountpoint);
Expand Down Expand Up @@ -407,7 +407,7 @@ static int do_bind_mount_v2(struct mount_info *mi)
* Mount-v2 relies that before mount tree is constructed all mounts
* should remain private. Newly created mounts can become non-private
* initially depending on parent/source sharing, let's be as explicit
* as posible here and make it obvious that mount becomes private.
* as possible here and make it obvious that mount becomes private.
*/
if (mount(NULL, mi->plain_mountpoint, NULL, MS_PRIVATE, NULL)) {
pr_perror("Can't remount %s with MS_PRIVATE", mi->plain_mountpoint);
Expand Down Expand Up @@ -470,7 +470,7 @@ static int do_mount_root_v2(struct mount_info *mi)
* Mount-v2 relies that before mount tree is constructed all mounts
* should remain private. Newly created mounts can become non-private
* initially depending on parent/source sharing, let's be as explicit
* as posible here and make it obvious that mount becomes private.
* as possible here and make it obvious that mount becomes private.
*/
if (mount(NULL, mi->plain_mountpoint, NULL, MS_PRIVATE, NULL)) {
pr_perror("Can't remount %s with MS_PRIVATE", mi->plain_mountpoint);
Expand Down Expand Up @@ -617,7 +617,7 @@ static int detect_is_dir(struct mount_info *mi)

rel_path = get_relative_path(mi->ns_mountpoint, mi->parent->ns_mountpoint);
if (!rel_path) {
pr_err("Child-parent mountpoint missmatch %d:%s %d:%s\n", mi->mnt_id, mi->ns_mountpoint,
pr_err("Child-parent mountpoint mismatch %d:%s %d:%s\n", mi->mnt_id, mi->ns_mountpoint,
mi->parent->mnt_id, mi->parent->ns_mountpoint);
return -1;
}
Expand Down Expand Up @@ -952,7 +952,7 @@ static int restore_one_sharing_group(struct sharing_group *sg)
/*
* External slavery. We rely on the user to give us the
* right source for external mount with all proper
* sharing optioins setup (it should be either shared
* sharing options setup (it should be either shared
* or non-shared slave). If source is a private mount
* we would fail.
*/
Expand Down Expand Up @@ -1020,7 +1020,7 @@ static int restore_mount_sharing_options(void)
if (sg->parent)
continue;

/* Handle dependant sharing groups in tree order */
/* Handle dependent sharing groups in tree order */
for (t = sg; t != NULL; t = sharing_group_next(t)) {
if (restore_one_sharing_group(t))
return -1;
Expand Down
2 changes: 1 addition & 1 deletion criu/namespaces.c
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ int collect_user_ns(struct ns_id *ns, void *oarg)
{
/*
* User namespace is dumped before files to get uid and gid
* mappings, which are used for convirting local id-s to
* mappings, which are used for converting local id-s to
* userns id-s (userns_uid(), userns_gid())
*/
if (dump_user_ns(root_item->pid->real, root_item->ids->user_ns_id))
Expand Down
2 changes: 1 addition & 1 deletion criu/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -2340,7 +2340,7 @@ static int prepare_xtable_lock(void)
}

if (mount(NULL, "/", NULL, MS_SLAVE | MS_REC, NULL)) {
pr_perror("Unable to conver mounts to slave mounts");
pr_perror("Unable to convert mounts to slave mounts");
return -1;
}
/*
Expand Down
2 changes: 1 addition & 1 deletion criu/page-xfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ static inline u32 ppb_xfer_flags(struct page_xfer *xfer, struct page_pipe_buf *p
*
* Since, iov-C is not processed completely, we need to find
* "partial_read_byte" count to place out dummy-iov for
* remainig processing of iov-C. This function is performed by
* remaining processing of iov-C. This function is performed by
* analyze_iov function.
*
* dummy-iov will be(2): {C+3,1}. dummy-iov will be placed
Expand Down
2 changes: 1 addition & 1 deletion criu/path.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ char *mnt_get_sibling_path(struct mount_info *m, struct mount_info *p, char *buf

rpath = get_relative_path(m->ns_mountpoint, pa->ns_mountpoint);
if (!rpath) {
pr_warn("child - parent mountpoint missmatch %s - %s\n", m->ns_mountpoint, pa->ns_mountpoint);
pr_warn("child - parent mountpoint mismatch %s - %s\n", m->ns_mountpoint, pa->ns_mountpoint);
return NULL;
}

Expand Down
2 changes: 1 addition & 1 deletion criu/pie/parasite.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ static int get_proc_fd(void)
ret = sys_mount("proc", proc_mountpoint, "proc", MS_MGC_VAL, NULL);
if (ret) {
if (ret == -EPERM)
pr_err("can't dump unpriviliged task whose /proc doesn't belong to it\n");
pr_err("can't dump unprivileged task whose /proc doesn't belong to it\n");
else
pr_err("mount failed (%d)\n", ret);
sys_rmdir(proc_mountpoint);
Expand Down
Loading

0 comments on commit 0194ed3

Please sign in to comment.