mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-18 00:58:31 +00:00
parasite: Make max size for path being PATH_MAX
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Acked-by: Pavel Emelianov <xemul@parallels.com>
This commit is contained in:
parent
6adce279e8
commit
6485fbd25f
2 changed files with 9 additions and 3 deletions
|
|
@ -1,6 +1,9 @@
|
|||
#ifndef CR_PARASITE_H_
|
||||
#define CR_PARASITE_H_
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "syscall.h"
|
||||
#include "image.h"
|
||||
|
|
@ -8,7 +11,7 @@
|
|||
#define __parasite_head __used __section(.parasite.head.text)
|
||||
|
||||
#define PARASITE_STACK_SIZE 2048
|
||||
#define PARASITE_ARG_SIZE 256
|
||||
#define PARASITE_ARG_SIZE 8196
|
||||
#define PARASITE_BRK_SIZE 32768
|
||||
|
||||
#define PARASITE_MAX_SIZE (64 << 10)
|
||||
|
|
@ -60,14 +63,14 @@ typedef struct {
|
|||
unsigned long fd;
|
||||
unsigned long open_mode;
|
||||
unsigned long open_flags;
|
||||
char open_path[256];
|
||||
char open_path[PATH_MAX];
|
||||
} parasite_args_cmd_dumppages_t;
|
||||
|
||||
typedef struct {
|
||||
parasite_status_t status;
|
||||
unsigned long open_mode;
|
||||
unsigned long open_flags;
|
||||
char open_path[256];
|
||||
char open_path[PATH_MAX];
|
||||
} parasite_args_cmd_dumpsigacts_t;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -280,6 +280,9 @@ static int __used parasite_service(unsigned long cmd, void *args, void *brk)
|
|||
{
|
||||
brk_init(brk);
|
||||
|
||||
BUILD_BUG_ON(sizeof(parasite_args_cmd_dumppages_t) > PARASITE_ARG_SIZE);
|
||||
BUILD_BUG_ON(sizeof(parasite_args_cmd_dumpsigacts_t) > PARASITE_ARG_SIZE);
|
||||
|
||||
switch (cmd) {
|
||||
case PARASITE_CMD_KILLME:
|
||||
sys_close(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue