@@ -300,6 +300,20 @@ static int parse_config_v2(FILE *f, char *line, struct lxc_conf *conf)
300
300
default_policy_action );
301
301
if (!compat_ctx )
302
302
goto bad ;
303
+ } else if (native_arch == lxc_seccomp_arch_ppc64 ) {
304
+ cur_rule_arch = lxc_seccomp_arch_all ;
305
+ compat_arch = SCMP_ARCH_PPC ;
306
+ compat_ctx = get_new_ctx (lxc_seccomp_arch_ppc ,
307
+ default_policy_action );
308
+ if (!compat_ctx )
309
+ goto bad ;
310
+ } else if (native_arch == lxc_seccomp_arch_arm64 ) {
311
+ cur_rule_arch = lxc_seccomp_arch_all ;
312
+ compat_arch = SCMP_ARCH_ARM ;
313
+ compat_ctx = get_new_ctx (lxc_seccomp_arch_arm ,
314
+ default_policy_action );
315
+ if (!compat_ctx )
316
+ goto bad ;
303
317
}
304
318
305
319
if (default_policy_action != SCMP_ACT_KILL ) {
@@ -327,7 +341,7 @@ static int parse_config_v2(FILE *f, char *line, struct lxc_conf *conf)
327
341
if (strcmp (line , "[x86]" ) == 0 ||
328
342
strcmp (line , "[X86]" ) == 0 ) {
329
343
if (native_arch != lxc_seccomp_arch_i386 &&
330
- native_arch != lxc_seccomp_arch_amd64 ) {
344
+ native_arch != lxc_seccomp_arch_amd64 ) {
331
345
cur_rule_arch = lxc_seccomp_arch_unknown ;
332
346
continue ;
333
347
}
@@ -346,7 +360,8 @@ static int parse_config_v2(FILE *f, char *line, struct lxc_conf *conf)
346
360
#ifdef SCMP_ARCH_ARM
347
361
else if (strcmp (line , "[arm ]") == 0 ||
348
362
strcmp (line , "[ARM ]") == 0 ) {
349
- if (native_arch != lxc_seccomp_arch_arm ) {
363
+ if (native_arch != lxc_seccomp_arch_arm &&
364
+ native_arch != lxc_seccomp_arch_arm64 ) {
350
365
cur_rule_arch = lxc_seccomp_arch_unknown ;
351
366
continue ;
352
367
}
@@ -386,7 +401,8 @@ static int parse_config_v2(FILE *f, char *line, struct lxc_conf *conf)
386
401
#ifdef SCMP_ARCH_PPC
387
402
else if (strcmp (line , "[ppc ]") == 0 ||
388
403
strcmp (line , "[PPC ]") == 0 ) {
389
- if (native_arch != lxc_seccomp_arch_ppc ) {
404
+ if (native_arch != lxc_seccomp_arch_ppc &&
405
+ native_arch != lxc_seccomp_arch_ppc64 ) {
390
406
cur_rule_arch = lxc_seccomp_arch_unknown ;
391
407
continue ;
392
408
}
@@ -435,7 +451,7 @@ static int parse_config_v2(FILE *f, char *line, struct lxc_conf *conf)
435
451
if (compat_ctx ) {
436
452
INFO ("Merging in the compat seccomp ctx into the main one" );
437
453
if (seccomp_merge (conf -> seccomp_ctx , compat_ctx ) != 0 ) {
438
- ERROR ("Error merging i386 seccomp contexts" );
454
+ ERROR ("Error merging compat seccomp contexts" );
439
455
goto bad ;
440
456
}
441
457
}
0 commit comments