From owner-svn-src-all@freebsd.org Thu Jan 17 07:07:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFA3A14863DD for ; Thu, 17 Jan 2019 07:07:39 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 833E4770AD for ; Thu, 17 Jan 2019 07:07:39 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-qk1-x72f.google.com with SMTP id q1so5406059qkf.13 for ; Wed, 16 Jan 2019 23:07:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zb7ITq9cCfqEw59hAAkIy7bDwZMGBVLJSgTcfFDerYQ=; b=DocWam9cIQ7Sfc78RMP6rmXppFa4m6Hx+DiIH1ajrRnu87xaKNUnDhIKVw2etZABFj yezGf5iakarZx9XGtlpiYWTvY9nRiWbgM91NsiIlygZvSuS44yROH/KLKR8c8GED9VYL EOojjP1wleD9FhKamqhqJIl2gXhbef8iWHce+GTNyijo+RogTlHudAnXvqKlRWDhff+l B4h1tfU4nHFMe5PDTdi5O90cEmzs8UfGpdc6DJJAU3DlcpWMcMC3xS4tade3WA7/e09w Ia76122uEBwz0nAKbTIX7pI7/Qa3XfbKEkcs/UJerNPPuSo2PxzOf4FgzXb8emBJI/QK ysAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zb7ITq9cCfqEw59hAAkIy7bDwZMGBVLJSgTcfFDerYQ=; b=bGjLOY5Lej5ak5FuvoR8A87Npcjc2ZIeJWLCGEtQAPemFDFi4b51x47D08VQD0+hEi +fmC7qpcdoiXDEThl9QnLPKm3lPK0Msbgz32QTrg1Kqk4WVZoI/JabauaVTpO7WvqYng LVmpirkFhn8UmgJ2Ddt2qjaSYixR3vbYxx/RCzCbGIUDgn3g8brV0WtBskzBpvM9I4jy PaajKdov9yCQjUIQWxgy0X1Gn9dfLC4xqxCsmoZvpNud2/D5w8V0zC7MFxgi5NJ2ZkvR O0NhNo77vH12xt23aqLfaWparAW0yuhkv2/6A4wEwVMIt+dTHMKlma47t5x5GDGAq844 XiKQ== X-Gm-Message-State: AJcUuke6+IVf1YmDPwynojxqNhXDIAAbA7viMjOBFS7lgfVYfV+Wtcby sLaLpYvNR4w80pVFLqM90EPs6/4vJ/oxZ5p/VjB/og== X-Google-Smtp-Source: ALg8bN6zNForQS8P01R0ncQFYRblTtApCnNvldqtiZsK04dBDe25tLquiv8UpFabprlTLApy0nkMaUcUYf2il1OC3is= X-Received: by 2002:a37:bdc6:: with SMTP id n189mr9653918qkf.330.1547708858824; Wed, 16 Jan 2019 23:07:38 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a0c:b542:0:0:0:0:0 with HTTP; Wed, 16 Jan 2019 23:07:38 -0800 (PST) In-Reply-To: <201901170635.x0H6ZjEs003767@repo.freebsd.org> References: <201901170635.x0H6ZjEs003767@repo.freebsd.org> From: Oliver Pinter Date: Thu, 17 Jan 2019 08:07:38 +0100 Message-ID: Subject: Re: svn commit: r343111 - in head: cddl/lib/libdtrace contrib/libc++/include contrib/libxo/tests/gettext contrib/libxo/tests/gettext/po/pig_latin contrib/openbsm/libbsm contrib/openbsm/sys/bsm lib/libc... To: Kirk McKusick Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Rspamd-Queue-Id: 833E4770AD X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-7.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.995,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 07:07:40 -0000 On Thursday, January 17, 2019, Kirk McKusick wrote: > Author: mckusick > Date: Thu Jan 17 06:35:45 2019 > New Revision: 343111 > URL: https://svnweb.freebsd.org/changeset/base/343111 > > Log: > Create new EINTEGRITY error with message "Integrity check failed". > > An integrity check such as a check-hash or a cross-correlation failed. > The integrity error falls between EINVAL that identifies errors in > parameters to a system call and EIO that identifies errors with the > underlying storage media. EINTEGRITY is typically raised by intermediate > kernel layers such as a filesystem or an in-kernel GEOM subsystem when > they detect inconsistencies. Uses include allowing the mount(8) command > to return a different exit value to automate the running of fsck(8) > during a system boot. > > These changes make no use of the new error, they just add it. Later > commits will be made for the use of the new error number and it will > be added to additional manual pages as appropriate. > > Reviewed by: gnn, dim, brueffer, imp > Discussed with: kib, cem, emaste, ed, jilles > Differential Revision: https://reviews.freebsd.org/D18765 > > Modified: > head/cddl/lib/libdtrace/errno.d > head/contrib/libc++/include/__errc > head/contrib/libc++/include/errno.h > head/contrib/libxo/tests/gettext/po/pig_latin/strerror.po > head/contrib/libxo/tests/gettext/strerror.pot > head/contrib/openbsm/libbsm/bsm_errno.c > head/contrib/openbsm/sys/bsm/audit_errno.h > head/lib/libc/gen/errlst.c > head/lib/libc/nls/C.msg > head/lib/libc/sys/intro.2 > head/stand/liblua/lerrno.c > head/sys/bsm/audit_errno.h > head/sys/compat/cloudabi/cloudabi_errno.c > head/sys/compat/linux/linux_errno.inc > head/sys/security/audit/bsm_errno.c > head/sys/sys/errno.h > > Modified: head/cddl/lib/libdtrace/errno.d > ============================================================ > ================== > --- head/cddl/lib/libdtrace/errno.d Thu Jan 17 06:34:39 2019 > (r343110) > +++ head/cddl/lib/libdtrace/errno.d Thu Jan 17 06:35:45 2019 > (r343111) > @@ -225,7 +225,9 @@ inline int ENOTRECOVERABLE = 95; > #pragma D binding "1.13" ENOTRECOVERABLE > inline int EOWNERDEAD = 96; > #pragma D binding "1.13" EOWNERDEAD > -inline int ELAST = 96; > +inline int EINTEGRITY = 96; > +#pragma D binding "1.13" EINTEGRITY > +inline int ELAST = 97; > #pragma D binding "1.0" ELAST > inline int ERESTART = -1; > #pragma D binding "1.0" ERESTART > @@ -340,6 +342,7 @@ inline string strerror[int errno] = > errno == ECAPMODE ? "Not permitted in capability mode" > : > errno == ENOTRECOVERABLE ? "State not recoverable" : > errno == EOWNERDEAD ? "Previous owner died" : > + errno == EINTEGRITY ? "Integrity check failed" : > errno == ERESTART ? "restart syscall" : > errno == EJUSTRETURN ? "don't modify regs, just return" : > errno == ENOIOCTL ? "ioctl not handled by this layer" : > > Modified: head/contrib/libc++/include/__errc > ============================================================ > ================== > --- head/contrib/libc++/include/__errc Thu Jan 17 06:34:39 2019 > (r343110) > +++ head/contrib/libc++/include/__errc Thu Jan 17 06:35:45 2019 > (r343111) > @@ -46,6 +46,7 @@ enum class errc > identifier_removed, // EIDRM > illegal_byte_sequence, // EILSEQ > inappropriate_io_control_operation, // ENOTTY > + integrity_check_failed, // EINTEGRITY > interrupted, // EINTR > invalid_argument, // EINVAL > invalid_seek, // ESPIPE > @@ -143,6 +144,7 @@ _LIBCPP_DECLARE_STRONG_ENUM(errc) > identifier_removed = EIDRM, > illegal_byte_sequence = EILSEQ, > inappropriate_io_control_operation = ENOTTY, > + integrity_check_failed = EINTEGRITY, > interrupted = EINTR, > invalid_argument = EINVAL, > invalid_seek = ESPIPE, > > Modified: head/contrib/libc++/include/errno.h > ============================================================ > ================== > --- head/contrib/libc++/include/errno.h Thu Jan 17 06:34:39 2019 > (r343110) > +++ head/contrib/libc++/include/errno.h Thu Jan 17 06:35:45 2019 > (r343111) > @@ -33,49 +33,72 @@ Macros: > > #ifdef __cplusplus > > -#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) > +#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) || > !defined(EINTEGRITY) > > #ifdef ELAST > > static const int __elast1 = ELAST+1; > static const int __elast2 = ELAST+2; > +static const int __elast2 = ELAST+3; I think this should be __elast3 > > #else > > static const int __elast1 = 104; > static const int __elast2 = 105; > +static const int __elast2 = 106; And here too > > #endif > > -#ifdef ENOTRECOVERABLE > +#if !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && > !defined(EINTEGRITY) > +#define ENOTRECOVERABLE __elast1 > +#define EOWNERDEAD __elast2 > +#define EINTEGRITY __elast3 > +#ifdef ELAST > +#undef ELAST > +#define ELAST EINTEGRITY > > +#elif !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && > defined(EINTEGRITY) > +#define ENOTRECOVERABLE __elast1 > +#define EOWNERDEAD __elast2 > +#ifdef ELAST > +#undef ELAST > +#define ELAST EOWNERDEAD > + > +#elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && > !defined(EINTEGRITY) > #define EOWNERDEAD __elast1 > +#define EINTEGRITY __elast2 > +#ifdef ELAST > +#undef ELAST > +#define ELAST EINTEGRITY > > +#elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && > defined(EINTEGRITY) > +#define EOWNERDEAD __elast1 > #ifdef ELAST > #undef ELAST > #define ELAST EOWNERDEAD > -#endif > > -#elif defined(EOWNERDEAD) > +#elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && > !defined(EINTEGRITY) > +#define ENOTRECOVERABLE __elast1 > +#define EINTEGRITY __elast2 > +#ifdef ELAST > +#undef ELAST > +#define ELAST EINTEGRITY > > +#elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && > defined(EINTEGRITY) > #define ENOTRECOVERABLE __elast1 > #ifdef ELAST > #undef ELAST > #define ELAST ENOTRECOVERABLE > -#endif > > -#else // defined(EOWNERDEAD) > - > -#define EOWNERDEAD __elast1 > -#define ENOTRECOVERABLE __elast2 > +#elif defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && > !defined(EINTEGRITY) > +#define EINTEGRITY __elast1 > #ifdef ELAST > #undef ELAST > -#define ELAST ENOTRECOVERABLE > -#endif > +#define ELAST EINTEGRITY > > -#endif // defined(EOWNERDEAD) > +#endif // !defined(OWNERDEAD) && !defined(NOTRECOVERABLE) && > !defined(INTEGRITY) > > -#endif // !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) > +#endif // !defined(OWNERDEAD) || !defined(NOTRECOVERABLE) || > !defined(INTEGRITY) > > // supply errno values likely to be missing, particularly on Windows > > @@ -391,6 +414,10 @@ static const int __elast2 = 105; > > #ifndef EMLINK > #define EMLINK 9979 > +#endif > + > +#ifndef EINTEGRITY > +#define EINTEGRITY 9980 > #endif > > #endif // __cplusplus > > Modified: head/contrib/libxo/tests/gettext/po/pig_latin/strerror.po > ============================================================ > ================== > --- head/contrib/libxo/tests/gettext/po/pig_latin/strerror.po Thu Jan > 17 06:34:39 2019 (r343110) > +++ head/contrib/libxo/tests/gettext/po/pig_latin/strerror.po Thu Jan > 17 06:35:45 2019 (r343111) > @@ -457,3 +457,7 @@ msgstr "Atestay otnay ecoverableray" > # 96 - EOWNERDEAD > msgid "Previous owner died" > msgstr "Eviouspray ownerway iedday" > + > +# 97 - EINTEGRITY > +msgid "Integrity check failed" > +msgstr "integrityyay eckchay ailedfay" > > Modified: head/contrib/libxo/tests/gettext/strerror.pot > ============================================================ > ================== > --- head/contrib/libxo/tests/gettext/strerror.pot Thu Jan 17 > 06:34:39 2019 (r343110) > +++ head/contrib/libxo/tests/gettext/strerror.pot Thu Jan 17 > 06:35:45 2019 (r343111) > @@ -466,3 +466,7 @@ msgstr "" > # 96 - EOWNERDEAD > msgid "Previous owner died" > msgstr "" > + > +# 97 - EINTEGRITY > +msgid "Integrity check failed" > +msgstr "" > > Modified: head/contrib/openbsm/libbsm/bsm_errno.c > ============================================================ > ================== > --- head/contrib/openbsm/libbsm/bsm_errno.c Thu Jan 17 06:34:39 2019 > (r343110) > +++ head/contrib/openbsm/libbsm/bsm_errno.c Thu Jan 17 06:35:45 2019 > (r343111) > @@ -239,6 +239,13 @@ static const struct bsm_errno bsm_errnos[] = { > ERRNO_NO_LOCAL_MAPPING, > #endif > ES("Process died with the lock") }, > + { BSM_ERRNO_EINTEGRITY, > +#ifdef EINTEGRITY > + EINTEGRITY, > +#else > + ERRNO_NO_LOCAL_MAPPING, > +#endif > + ES("Integrity check failed") }, > { BSM_ERRNO_ENOTRECOVERABLE, > #ifdef ENOTRECOVERABLE > ENOTRECOVERABLE, > > Modified: head/contrib/openbsm/sys/bsm/audit_errno.h > ============================================================ > ================== > --- head/contrib/openbsm/sys/bsm/audit_errno.h Thu Jan 17 06:34:39 2019 > (r343110) > +++ head/contrib/openbsm/sys/bsm/audit_errno.h Thu Jan 17 06:35:45 2019 > (r343111) > @@ -204,6 +204,7 @@ > #define BSM_ERRNO_EKEYREJECTED 222 /* Linux-specific. > */ > #define BSM_ERRNO_ENOTCAPABLE 223 /* > FreeBSD-specific. */ > #define BSM_ERRNO_ECAPMODE 224 /* > FreeBSD-specific. */ > +#define BSM_ERRNO_EINTEGRITY 225 /* > FreeBSD-specific. */ > > /* > * In the event that OpenBSM doesn't have a file representation of a local > > Modified: head/lib/libc/gen/errlst.c > ============================================================ > ================== > --- head/lib/libc/gen/errlst.c Thu Jan 17 06:34:39 2019 (r343110) > +++ head/lib/libc/gen/errlst.c Thu Jan 17 06:35:45 2019 (r343111) > @@ -158,12 +158,12 @@ const char *const sys_errlist[] = { > "Not permitted in capability mode", /* 94 - ECAPMODE */ > "State not recoverable", /* 95 - ENOTRECOVERABLE */ > "Previous owner died", /* 96 - EOWNERDEAD */ > + "Integrity check failed", /* 97 - EINTEGRITY */ > > /* > * Reserved space in sys_errlist, take the next slot for a next error > code. > * Reserve prevents the array size from changing for some time. > */ > - __uprefix, /* 97 */ > __uprefix, /* 98 */ > __uprefix, /* 99 */ > __uprefix, /* 100 */ > > Modified: head/lib/libc/nls/C.msg > ============================================================ > ================== > --- head/lib/libc/nls/C.msg Thu Jan 17 06:34:39 2019 (r343110) > +++ head/lib/libc/nls/C.msg Thu Jan 17 06:35:45 2019 (r343111) > @@ -197,6 +197,8 @@ $ ENOTRECOVERABLE > 95 State not recoverable > $ EOWNERDEAD > 96 Previous owner died > +$ EINTEGRITY > +97 Integrity check failed > $ > $ strsignal() support catalog > $ > > Modified: head/lib/libc/sys/intro.2 > ============================================================ > ================== > --- head/lib/libc/sys/intro.2 Thu Jan 17 06:34:39 2019 (r343110) > +++ head/lib/libc/sys/intro.2 Thu Jan 17 06:35:45 2019 (r343111) > @@ -472,6 +472,20 @@ The system call or operation is not permitted for capa > The state protected by a robust mutex is not recoverable. > .It Er 96 EOWNERDEAD Em "Previous owner died" . > The owner of a robust mutex terminated while holding the mutex lock. > +.It Er 97 EINTEGRITY Em "Integrity check failed" . > +An integrity check such as a check-hash or a cross-correlation failed. > +The integrity error falls between > +.Er EINVAL > +that identifies errors in parameters to a system call and > +.Er EIO > +that identifies errors with the underlying storage media. > +It is typically raised by intermediate kernel layers such as a > +filesystem or an in-kernel GEOM subsystem when they detect > inconsistencies. > +Uses include allowing the > +.Xr mount 8 > +command to return a different exit value to automate the running of > +.Xr fsck 8 > +during a system boot. > .El > .Sh DEFINITIONS > .Bl -tag -width Ds > > Modified: head/stand/liblua/lerrno.c > ============================================================ > ================== > --- head/stand/liblua/lerrno.c Thu Jan 17 06:34:39 2019 (r343110) > +++ head/stand/liblua/lerrno.c Thu Jan 17 06:35:45 2019 (r343111) > @@ -146,6 +146,7 @@ static const struct err_name_number { > ENTRY(ECAPMODE), > ENTRY(ENOTRECOVERABLE), > ENTRY(EOWNERDEAD), > + ENTRY(EINTEGRITY), > ENTRY(ELAST), > ENTRY(ERESTART), > ENTRY(EJUSTRETURN), > > Modified: head/sys/bsm/audit_errno.h > ============================================================ > ================== > --- head/sys/bsm/audit_errno.h Thu Jan 17 06:34:39 2019 (r343110) > +++ head/sys/bsm/audit_errno.h Thu Jan 17 06:35:45 2019 (r343111) > @@ -208,6 +208,7 @@ > #define BSM_ERRNO_EKEYREJECTED 222 /* Linux-specific. > */ > #define BSM_ERRNO_ENOTCAPABLE 223 /* > FreeBSD-specific. */ > #define BSM_ERRNO_ECAPMODE 224 /* > FreeBSD-specific. */ > +#define BSM_ERRNO_EINTEGRITY 225 /* > FreeBSD-specific. */ > > /* > * In the event that OpenBSM doesn't have a file representation of a local > > Modified: head/sys/compat/cloudabi/cloudabi_errno.c > ============================================================ > ================== > --- head/sys/compat/cloudabi/cloudabi_errno.c Thu Jan 17 06:34:39 2019 > (r343110) > +++ head/sys/compat/cloudabi/cloudabi_errno.c Thu Jan 17 06:35:45 2019 > (r343111) > @@ -63,6 +63,7 @@ cloudabi_convert_errno(int error) > [EIDRM] = CLOUDABI_EIDRM, > [EILSEQ] = CLOUDABI_EILSEQ, > [EINPROGRESS] = CLOUDABI_EINPROGRESS, > + [EINTEGRITY] = CLOUDABI_EINVAL, > [EINTR] = CLOUDABI_EINTR, > [EINVAL] = CLOUDABI_EINVAL, > [EIO] = CLOUDABI_EIO, > > Modified: head/sys/compat/linux/linux_errno.inc > ============================================================ > ================== > --- head/sys/compat/linux/linux_errno.inc Thu Jan 17 06:34:39 2019 > (r343110) > +++ head/sys/compat/linux/linux_errno.inc Thu Jan 17 06:35:45 2019 > (r343111) > @@ -142,7 +142,8 @@ const int linux_errtbl[ELAST + 1] = { > -1, /* ECAPMODE -> EPERM */ > -131, /* ENOTRECOVERABLE */ > -130, /* EOWNERDEAD */ > + -22, /* EINTEGRITY -> EINVAL */ > }; > > -_Static_assert(ELAST == 96, > +_Static_assert(ELAST == 97, > "missing errno entries in linux_errtbl"); > > Modified: head/sys/security/audit/bsm_errno.c > ============================================================ > ================== > --- head/sys/security/audit/bsm_errno.c Thu Jan 17 06:34:39 2019 > (r343110) > +++ head/sys/security/audit/bsm_errno.c Thu Jan 17 06:35:45 2019 > (r343111) > @@ -243,6 +243,13 @@ static const struct bsm_errno bsm_errnos[] = { > ERRNO_NO_LOCAL_MAPPING, > #endif > ES("Process died with the lock") }, > + { BSM_ERRNO_EINTEGRITY, > +#ifdef EINTEGRITY > + EINTEGRITY, > +#else > + ERRNO_NO_LOCAL_MAPPING, > +#endif > + ES("Integrity check failed") }, > { BSM_ERRNO_ENOTRECOVERABLE, > #ifdef ENOTRECOVERABLE > ENOTRECOVERABLE, > > Modified: head/sys/sys/errno.h > ============================================================ > ================== > --- head/sys/sys/errno.h Thu Jan 17 06:34:39 2019 (r343110) > +++ head/sys/sys/errno.h Thu Jan 17 06:35:45 2019 (r343111) > @@ -180,10 +180,11 @@ __END_DECLS > #define ECAPMODE 94 /* Not permitted in > capability mode */ > #define ENOTRECOVERABLE 95 /* State not recoverable */ > #define EOWNERDEAD 96 /* Previous owner died */ > +#define EINTEGRITY 97 /* Integrity check failed > */ > #endif /* _POSIX_SOURCE */ > > #ifndef _POSIX_SOURCE > -#define ELAST 96 /* Must be equal largest > errno */ > +#define ELAST 97 /* Must be equal largest > errno */ > #endif /* _POSIX_SOURCE */ > > #if defined(_KERNEL) || defined(_WANT_KERNEL_ERRNO) > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" >