From owner-freebsd-hackers@freebsd.org Wed Sep 2 17:18:51 2020 Return-Path: Delivered-To: freebsd-hackers@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 D9BC83DD2E7 for ; Wed, 2 Sep 2020 17:18:51 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf31.google.com (mail-qv1-xf31.google.com [IPv6:2607:f8b0:4864:20::f31]) (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 4BhVyz0q3Vz3XYT; Wed, 2 Sep 2020 17:18:50 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qv1-xf31.google.com with SMTP id db4so2423988qvb.4; Wed, 02 Sep 2020 10:18:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=8RsDLynQUuEcgFtNQU98KbNMBN1jRWp/xKeIs5NmWM0=; b=SfirtPNUCl8YZGQx4YW4Ek2pmmgZCVs11Mf6Vncan6mNYYBmRie4V1FCbxR8lyqHtg vEcoec0EXC1RASfJWhIlpGz4c13HjNs5ao5Oc8ElG4nhtJy8zwKkig2FhgzmSOwLPvWe hqMwJ6JBNcf3cI3aXCKIwOvZ6ykImGRGxHJeX8Er6CN1rzqgaU1sPP0uwwCKIf0mhOMq rtLZ7ohY5guzXLgXSz2OW30ngJp1gAokpyECSIH+XBtuBCSj5AL2zuCPW9eV8eY0H5ZP eCt7NQe3r77Xa860Hir7LB1k4WfZZSkdfjPjWUCo+6bk7i8TB+X/TyS10ZqD8SLjZERr b7vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mime-version:content-disposition; bh=8RsDLynQUuEcgFtNQU98KbNMBN1jRWp/xKeIs5NmWM0=; b=c5mGQNPwqPCmfvJ2ZXEq7hMOb6KuBtvo+XwqI7b3ttBcv+n/J9lmm8ZVrXZPWH0b2b bOeH5wSk5kTB34qkLf/wN/oR13GbgKhWMlx8F+Pb+ymyaSmUTzyozzXLbI6ASYeXFham GfX+DS+LqTQyX0G4kxsIi+hnlHj+89ExfPjb0HpOK5/VzhIy64MCYKTYgKBO3TP6dC9x Sk3o6ERgtuSRpAPdqJn+vCShEoEDoJ+WGrA6ihidFd9Enxj/Sa+Ir3pnD61mUPkt+GDb ahm/A2pLlU+bOzc+dgqEEq2nRkPrWTL409VFXNRgtogPqVk9AbzLcykovDob9//5+ttx J/gA== X-Gm-Message-State: AOAM5338+axVBYcvcF8k8sPUAIEmdKW4AAXizNy9/jwdF/Vp8BPpMtLu ar6BdknkV2ZxhpteVvV4aFrz8Q8rvZq87g== X-Google-Smtp-Source: ABdhPJxCDZeIP3ZnzuaEq1Kaz7tNd5IWvzy/VSCLR2d8oLw0EPGb51Kic09DA5wnD8jjf419AFxIjA== X-Received: by 2002:a0c:e085:: with SMTP id l5mr7904847qvk.178.1599067129522; Wed, 02 Sep 2020 10:18:49 -0700 (PDT) Received: from raichu (toroon0560w-lp130-08-67-71-176-35.dsl.bell.ca. [67.71.176.35]) by smtp.gmail.com with ESMTPSA id e7sm22151qtk.17.2020.09.02.10.18.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 10:18:48 -0700 (PDT) Sender: Mark Johnston Date: Wed, 2 Sep 2020 13:18:46 -0400 From: Mark Johnston To: freebsd-hackers@freebsd.org Cc: kib@freebsd.org, jah@freebsd.org Subject: unix socket locking cleanups Message-ID: <20200902171846.GI95175@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: 4BhVyz0q3Vz3XYT X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=SfirtPNU; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::f31 as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-2.40 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.08)[-1.084]; RCVD_COUNT_THREE(0.00)[3]; MID_RHS_NOT_FQDN(0.50)[]; DKIM_TRACE(0.00)[gmail.com:+]; NEURAL_HAM_SHORT(-0.61)[-0.611]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f31:from]; NEURAL_HAM_MEDIUM(-1.01)[-1.007]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2020 17:18:51 -0000 Hi, I posted a series of patches that try to simplify synchronization in the unix socket code. Most of them are bite-sized but D26299 and D26301 require some thought. The last couple of patches fix some races found by syzkaller, and an earlier version of the patch series was tested by Peter Holm. I'd appreciate any feedback. Thanks in advance. https://reviews.freebsd.org/D26294 https://reviews.freebsd.org/D26295 https://reviews.freebsd.org/D26296 https://reviews.freebsd.org/D26297 https://reviews.freebsd.org/D26298 https://reviews.freebsd.org/D26299 https://reviews.freebsd.org/D26300 https://reviews.freebsd.org/D26301