From owner-svn-src-head@freebsd.org Sat Nov 14 22:56:32 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 69D15467C4B; Sat, 14 Nov 2020 22:56:32 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CYW0w1060z4WpM; Sat, 14 Nov 2020 22:56:31 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr1-x430.google.com with SMTP id 23so14306477wrc.8; Sat, 14 Nov 2020 14:56:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=kq82tm4Cu/WFJRZAdJCWhKhYDoZC68rqP8F/eDv2CQU=; b=gnXgfsrVgoQQGW6OIfoE8OSZ+OhEuTMrXjLaHne+Esui/rrR5FOSgEYK7whAUX+4iA pGI1v/AbKuh9lIDakjKP3UhGY7G8UG5DqQG/aAX+20sTTmkKfzXF4ftTNtfMaiMsuzEG 3rERnEXV6RbkVwqS0LwGqLz+tyHos4HfwvY+IfxkCilFWcauwoAHFvMJD4q8SBuB14bw lXv3boeNyhgfkaZOCVg+pnrgeb+gWlVQk0kvlXyJ1JBi8rUmJFJ/N5TvcWGzygJDbQcY vCY2Fqovv5xuA5WGtjvUTJTkt4OBaEgbMS2qA7hDGSmS8t3ATCoMt/JoLwk1+6UMh27x Uc4w== 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=kq82tm4Cu/WFJRZAdJCWhKhYDoZC68rqP8F/eDv2CQU=; b=hao+HMiKQ1Vj0EX0mKOQyk3n/+5m9ShNEjoooB8dGDNfmSSGa8Cmik1DTlSSrZG+KI xHHQbeBqkByo0tkymYaH3NPE9iHJ9CmBO4YB/yC55506pzQG7BN/D4h/ALK9Dq2firI6 R3Wsk0ZkDZcwZ3uH03qTvgTVM3qYS5KbzYSArupNqVZGOCaPr8uYuS3yQcDUmcqM73Sk ajowR4Rm14lmA7/4cqtP17Wn5c/uzfeQ8E74WkanGr6R4CoTO9j1B7wEPG6VfEtQjV8w 5kEjzVDgS98j7Hj32kMhpkNUbfg6KTa3zt03oY/It2P0b4XVuJ2V5rEviUWdniRGRKVE 4R6w== X-Gm-Message-State: AOAM530KQ3Y0URB14It4PzOhLWXOy42WHzD/AlSvUrEUSOGxo08GHmoh K4R21Yw0fApOOe4WldoukquazhETFV+ycRvkD1lzXEeHirM= X-Google-Smtp-Source: ABdhPJwOumJVKCsVe4rax6nQT+WCOuUX/2c2b5cjP9NPtkbqtKRuhBmfLc9e4g+TNvrq8UKzkyBWLv8gKsviuDxi/hc= X-Received: by 2002:a5d:5146:: with SMTP id u6mr11921017wrt.66.1605394590776; Sat, 14 Nov 2020 14:56:30 -0800 (PST) MIME-Version: 1.0 Received: by 2002:adf:dec7:0:0:0:0:0 with HTTP; Sat, 14 Nov 2020 14:56:29 -0800 (PST) In-Reply-To: References: <202011141920.0AEJKbpO050396@repo.freebsd.org> <20201114205036.tnxvwarsddmu4shz@mutt-hbsd> <20201114205355.j2ejnhouipjr6yhk@mutt-hbsd> From: Mateusz Guzik Date: Sat, 14 Nov 2020 23:56:29 +0100 Message-ID: Subject: Re: svn commit: r367692 - head/sys/sys To: Warner Losh Cc: Shawn Webb , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CYW0w1060z4WpM X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Nov 2020 22:56:32 -0000 There are "KBI" breaking changes happening all the time and version bumps only sometimes happen. The build process already has infrastructure to rebuild all port kmods as well -- see PORTS_MODULES in make.conf(5) Perhaps it would be beneficial to add checking that the kernel is older than the to-be-loaded module and refuse otherwise. Can be overwritten by a loader.conf knob, then people who run into problems explicitly asked for it. But it's not clear to me if "older" should mean build date or revision or something else. Still, I suspect it will be mostly annoying to developers. Regardless, I have no intention to working on any of this. Maybe PORTS_MODULES is just not advertised enough. On 11/14/20, Warner Losh wrote: > true, but a version bump forces that and versions are cheap enough... > > Warner > > On Sat, Nov 14, 2020 at 1:58 PM Mateusz Guzik wrote: > >> you are expected to recompile all your kernel modules every time you >> update head >> >> On 11/14/20, Shawn Webb wrote: >> > Are there any kernel modules (in base, in ports, or out-of-both-trees) >> > that access struct ucred? >> > >> > On Sat, Nov 14, 2020 at 09:51:47PM +0100, Mateusz Guzik wrote: >> >> I don't think so, it does not change any APIs >> >> >> >> On 11/14/20, Shawn Webb wrote: >> >> > On Sat, Nov 14, 2020 at 07:20:37PM +0000, Mateusz Guzik wrote: >> >> >> Author: mjg >> >> >> Date: Sat Nov 14 19:20:37 2020 >> >> >> New Revision: 367692 >> >> >> URL: https://svnweb.freebsd.org/changeset/base/367692 >> >> >> >> >> >> Log: >> >> >> cred: reorder cr_audit to be closer to the lock >> >> >> >> >> >> This makes cr_uid avoid sharing. >> >> >> >> >> >> Modified: >> >> >> head/sys/sys/ucred.h >> >> >> >> >> >> Modified: head/sys/sys/ucred.h >> >> >> >> ============================================================================== >> >> >> --- head/sys/sys/ucred.h Sat Nov 14 19:19:27 2020 (r367691) >> >> >> +++ head/sys/sys/ucred.h Sat Nov 14 19:20:37 2020 (r367692) >> >> >> @@ -63,6 +63,7 @@ struct ucred { >> >> >> struct mtx cr_mtx; >> >> >> u_int cr_ref; /* (c) reference count */ >> >> >> u_int cr_users; /* (c) proc + thread using this >> cred */ >> >> >> + struct auditinfo_addr cr_audit; /* Audit properties. */ >> >> >> #define cr_startcopy cr_uid >> >> >> uid_t cr_uid; /* effective user id */ >> >> >> uid_t cr_ruid; /* real user id */ >> >> >> @@ -78,7 +79,6 @@ struct ucred { >> >> >> void *cr_pspare2[2]; /* general use 2 */ >> >> >> #define cr_endcopy cr_label >> >> >> struct label *cr_label; /* MAC label */ >> >> >> - struct auditinfo_addr cr_audit; /* Audit properties. */ >> >> >> gid_t *cr_groups; /* groups */ >> >> >> int cr_agroups; /* Available groups */ >> >> >> gid_t cr_smallgroups[XU_NGROUPS]; /* storage for small >> groups */ >> >> > >> >> > Hey Mateusz, >> >> > >> >> > Since this changes KBI, does __FreeBSD_version need bumping? >> >> > >> >> > Thanks, >> >> > >> >> > -- >> >> > Shawn Webb >> >> > Cofounder / Security Engineer >> >> > HardenedBSD >> >> > >> >> > GPG Key ID: 0xFF2E67A277F8E1FA >> >> > GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 >> 0FB2 >> >> > >> https://git-01.md.hardenedbsd.org/HardenedBSD/pubkeys/src/branch/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc >> >> > >> >> >> >> >> >> -- >> >> Mateusz Guzik >> > >> > -- >> > Shawn Webb >> > Cofounder / Security Engineer >> > HardenedBSD >> > >> > GPG Key ID: 0xFF2E67A277F8E1FA >> > GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2 >> > >> https://git-01.md.hardenedbsd.org/HardenedBSD/pubkeys/src/branch/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc >> > >> >> >> -- >> Mateusz Guzik >> > -- Mateusz Guzik