From nobody Tue May 31 14:33:29 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8EFE71B4FE58; Tue, 31 May 2022 14:33:32 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LCFBh3HDRz4T95; Tue, 31 May 2022 14:33:32 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-lj1-x236.google.com with SMTP id 1so14881295ljp.8; Tue, 31 May 2022 07:33:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=93KCPcjlxl+/SOgLLnoxvpZ5304Stm2BNpBz/BqQCeM=; b=RFDDGPydWz/k/FY5QMOjIJ7VlofxAWjlD32YeCRQ45ibDPHTP+1ZVmHk++g3gb59ml ox8jhLFQ0xc1B4AqYddmon/79qoU0e587HnrYbLZ01e3t4RMVwjlIKI/L3U48x4E+7dK a6F603AtsYIuvWUZifJ5AWQkRifKRHBk/SYZf+tL56y5V2lwPl2JpNcot2XvfrYcfFYy ycWdkt+jrn+R8sqXDklgl7d3lsN1E73IGKfwTlIBvnxWgjK1huTM2AMFObOvP1xM32VJ Y6fU/0mA9d+thErLg16ayH5Xg0rWGHFLXK6KjsUQIgfeWFskbVBNeQrO4q7TszbjtHgH Yj2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=93KCPcjlxl+/SOgLLnoxvpZ5304Stm2BNpBz/BqQCeM=; b=BbkOFqZ7f5zRok3pPNV3uUw+cWY+GGoPKbvZ1nA5DsvTQ0Agg1mwn/kPtVasKWZXXK Fc7u/ORuPs84NAfvsklR2TBmrE9o5PSiLMHFTLIz4bEQWa2lxVyr2YvYvahT+XHYllkt tiy/qYpKmE5Ycp28SYupgFyeUAaRHp/x9KzqHYU0BKGHPx868ZZn8lUnrUwP+uVFJT+F fRpLA+veYjfgoXvjybAFUtXWJ/Giru4WYhB9V6/LeQXbF4m3qBtf1Cg0+iq4ZnLeeLXW a0ZbZss4FZhKWmW7ODi89rymhXHL6NJltCUwOJme7mxB2KN6uQUKIaU3UtrRAM14/Mu5 sQ/g== X-Gm-Message-State: AOAM532ITYZcGEQzLTWd2Vk8/oMkKWqOgHnxj3Od3rZzIrfU8dnR0/jj p7gxBcWKpBSDaVNEYAABezA28b9CI02juLX/lzY= X-Google-Smtp-Source: ABdhPJxBJ7mGwwffM2qmHkSwgZLg4nY/CbIMpo8RntEifykiilCgbplsDMysU5Ynv8zS6dPnKwervIABAe4cUNkVxJo= X-Received: by 2002:a2e:9ecb:0:b0:24b:4e2a:a555 with SMTP id h11-20020a2e9ecb000000b0024b4e2aa555mr35885911ljk.149.1654007611008; Tue, 31 May 2022 07:33:31 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Received: by 2002:aa6:c2d2:0:b0:1e6:e5ee:dbad with HTTP; Tue, 31 May 2022 07:33:29 -0700 (PDT) In-Reply-To: <8909171653936542@iva6-17bf07036239.qloud-c.yandex.net> References: <202205301510.24UFAxvj014259@gitrepo.freebsd.org> <8909171653936542@iva6-17bf07036239.qloud-c.yandex.net> From: Mateusz Guzik Date: Tue, 31 May 2022 16:33:29 +0200 Message-ID: Subject: Re: git: 8c0d1eca7834 - main - sockbuf: retain backward compatibility with userland after d59bc188d652 To: "Alexander V. Chernikov" Cc: "Alexander V. Chernikov" , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4LCFBh3HDRz4T95 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On 5/30/22, Alexander V. Chernikov wrote: > > > 30.05.2022, 16:18, "Mateusz Guzik" : >> >> should probably CTASSERT on size then > > Sorry, I=E2=80=99m afraid I don=E2=80=99t get it. Could you please clarif= y? >> diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index 249e0800f915..5fc21206b1bf 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -586,6 +586,14 @@ struct xsocket { } so_rcv, so_snd; }; +#if _LP64 +_Static_assert(sizeof(struct xsocket) =3D=3D 240, "bad") +#elsif _LP32 +.... +#else +#error "port me" +#endif + #ifdef _KERNEL void sotoxsocket(struct socket *so, struct xsocket *xso); void sbtoxsockbuf(struct sockbuf *sb, struct xsockbuf *xsb); >> On 5/30/22, Alexander V. Chernikov wrote: >>> >>> The branch main has been updated by melifaro: >>> >>> URL: >>> https://cgit.FreeBSD.org/src/commit/?id=3D8c0d1eca7834bfd5a05c86bf20a7= 600917057492 >>> >>> commit 8c0d1eca7834bfd5a05c86bf20a7600917057492 >>> Author: Alexander V. Chernikov >>> AuthorDate: 2022-05-30 14:56:25 +0000 >>> Commit: Alexander V. Chernikov >>> CommitDate: 2022-05-30 15:10:53 +0000 >>> >>> sockbuf: retain backward compatibility with userland after >>> d59bc188d652 >>> >>> Add spare fields to xsockbuf in place of sb_mcnt / sb_ccnt to avoi= d >>> rebuilding userland binaries like sockstat(1). >>> >>> Reviewed by: glebius >>> --- >>> sys/sys/socketvar.h | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h >>> index 52b9376f0559..249e0800f915 100644 >>> --- a/sys/sys/socketvar.h >>> +++ b/sys/sys/socketvar.h >>> @@ -577,6 +577,8 @@ struct xsocket { >>> uint32_t sb_cc; >>> uint32_t sb_hiwat; >>> uint32_t sb_mbcnt; >>> + uint32_t sb_spare0; /* was sb_mcnt */ >>> + uint32_t sb_spare1; /* was sb_ccnt */ >>> uint32_t sb_mbmax; >>> int32_t sb_lowat; >>> int32_t sb_timeo; >>> >> >> >> -- >> Mateusz Guzik > --=20 Mateusz Guzik