From: deraadt Date: Mon, 11 Dec 2023 00:40:31 +0000 (+0000) Subject: Report system call pinning violations. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=088ad7e529ff97273d238dcbc8d47014c27f6741;p=openbsd Report system call pinning violations. --- diff --git a/usr.bin/lastcomm/lastcomm.1 b/usr.bin/lastcomm/lastcomm.1 index 5fc0bb1dac9..45ac2087324 100644 --- a/usr.bin/lastcomm/lastcomm.1 +++ b/usr.bin/lastcomm/lastcomm.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: lastcomm.1,v 1.25 2023/02/21 14:31:07 deraadt Exp $ +.\" $OpenBSD: lastcomm.1,v 1.26 2023/12/11 00:40:31 deraadt Exp $ .\" $NetBSD: lastcomm.1,v 1.5 1995/10/22 01:43:41 ghudson Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)lastcomm.1 8.1 (Berkeley) 6/6/93 .\" -.Dd $Mdocdate: February 21 2023 $ +.Dd $Mdocdate: December 11 2023 $ .Dt LASTCOMM 1 .Os .Sh NAME @@ -122,6 +122,10 @@ pointer was not in stack memory. The command was terminated due to a .Xr pledge 2 violation. +.It Li S +The command tried to execute a system call from the wrong +system call instruction, see +.Xr pinsyscalls 2 . .It Li T The command did a memory access violation detected by a processor trap. diff --git a/usr.bin/lastcomm/lastcomm.c b/usr.bin/lastcomm/lastcomm.c index 23078738828..865860503ba 100644 --- a/usr.bin/lastcomm/lastcomm.c +++ b/usr.bin/lastcomm/lastcomm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lastcomm.c,v 1.33 2023/02/21 14:31:07 deraadt Exp $ */ +/* $OpenBSD: lastcomm.c,v 1.34 2023/12/11 00:40:31 deraadt Exp $ */ /* $NetBSD: lastcomm.c,v 1.9 1995/10/22 01:43:42 ghudson Exp $ */ /* @@ -178,6 +178,7 @@ flagbits(int f) BIT(ATRAP, 'T'); BIT(AUNVEIL, 'U'); BIT(AEXECVE, 'E'); + BIT(APINSYS, 'S'); *p = '\0'; return (flags); }