From owner-svn-src-all@freebsd.org Tue Jun 2 11:32:10 2020 Return-Path: Delivered-To: svn-src-all@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 E06FE332AC0; Tue, 2 Jun 2020 11:32:10 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (cross.sbone.de [195.201.62.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49bqdP74BKz4YxX; Tue, 2 Jun 2020 11:32:09 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 080FD8D4A157; Tue, 2 Jun 2020 11:32:01 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 728C9E70810; Tue, 2 Jun 2020 11:32:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id MImnB1x8AKPJ; Tue, 2 Jun 2020 11:32:00 +0000 (UTC) Received: from [169.254.19.139] (unknown [IPv6:fde9:577b:c1a9:4902:ac27:826c:db4:4bfa]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 9CA1AE7080F; Tue, 2 Jun 2020 11:31:59 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Emmanuel Vadot" Cc: "Hans Petter Selasky" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r361723 - head/sys/compat/linuxkpi/common/include/linux Date: Tue, 02 Jun 2020 11:31:58 +0000 X-Mailer: MailMate (2.0BETAr6146) Message-ID: In-Reply-To: <20200602123612.fc6dbafe55c2c981cb0ec9a1@bidouilliste.com> References: <202006021019.052AJjxk060018@repo.freebsd.org> <20200602123612.fc6dbafe55c2c981cb0ec9a1@bidouilliste.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 49bqdP74BKz4YxX X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of bzeeb-lists@lists.zabbadoz.net designates 195.201.62.131 as permitted sender) smtp.mailfrom=bzeeb-lists@lists.zabbadoz.net X-Spamd-Result: default: False [-2.67 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; NEURAL_HAM_MEDIUM(-1.02)[-1.020]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:195.201.62.131]; NEURAL_HAM_LONG(-1.03)[-1.026]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[zabbadoz.net]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.33)[-0.326]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:24940, ipnet:195.201.0.0/16, country:DE]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 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: Tue, 02 Jun 2020 11:32:10 -0000 On 2 Jun 2020, at 10:36, Emmanuel Vadot wrote: > Hello Hans, > > On Tue, 2 Jun 2020 10:19:45 +0000 (UTC) > Hans Petter Selasky wrote: > >> Author: hselasky >> Date: Tue Jun 2 10:19:45 2020 >> New Revision: 361723 >> URL: https://svnweb.freebsd.org/changeset/base/361723 >> >> Log: >> Implement struct_size() function macro in the LinuxKPI. >> >> MFC after: 1 week >> Sponsored by: Mellanox Technologies >> >> Modified: >> head/sys/compat/linuxkpi/common/include/linux/kernel.h >> >> Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/compat/linuxkpi/common/include/linux/kernel.h Tue Jun 2 = >> 09:45:43 2020 (r361722) >> +++ head/sys/compat/linuxkpi/common/include/linux/kernel.h Tue Jun 2 = >> 10:19:45 2020 (r361723) >> @@ -555,4 +555,10 @@ linux_ratelimited(linux_ratelimit_t *rl) >> return (ppsratecheck(&rl->lasttime, &rl->counter, 1)); >> } >> >> +#define struct_size(ptr, field, num) ({ \ >> + const size_t __size =3D offsetof(__typeof(*(ptr)), field); \ >> + const size_t __max =3D (SIZE_MAX - __size) / sizeof((ptr)->field[0])= ; = >> \ >> + ((num) > __max) ? SIZE_MAX : (__size + sizeof((ptr)->field[0]) * = >> (num)); \ >> +}) >> + >> #endif /* _LINUX_KERNEL_H_ */ > > Can you bump FreeBSD_version so I can fix > https://github.com/freebsd/drm-kmod/ and update the > graphics/drm-devel-kmod port please ? I almost wonder if we want a =E2=80=9Clinuxkkpi version=E2=80=9D to check= instead. If there=E2=80=99s a lot more =E2=80=9Cwork=E2=80=9D on the linuxkpi we m= ight not want to = bump __FreeBSD_version for every change which can conflict/affect = external code? /bz