From nobody Sat Sep 16 20:44:06 2023 X-Original-To: hackers@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 4Rp3290wCkz4tZLv for ; Sat, 16 Sep 2023 20:44:17 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rp3285kDJz4Xjg for ; Sat, 16 Sep 2023 20:44:16 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Authentication-Results: mx1.freebsd.org; none Received: from critter.freebsd.dk (unknown [192.168.55.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by phk.freebsd.dk (Postfix) with ESMTPS id B93048928E; Sat, 16 Sep 2023 20:44:07 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.17.1/8.16.1) with ESMTPS id 38GKi7N5022116 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 16 Sep 2023 20:44:07 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.17.1/8.16.1/Submit) id 38GKi7RZ022115; Sat, 16 Sep 2023 20:44:07 GMT (envelope-from phk) Message-Id: <202309162044.38GKi7RZ022115@critter.freebsd.dk> To: Sebastian Huber cc: hackers@freebsd.org Subject: Re: Remove timecounter tc_counter_mask member? In-reply-to: From: "Poul-Henning Kamp" References: List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22113.1694897046.1@critter.freebsd.dk> Date: Sat, 16 Sep 2023 20:44:06 +0000 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:1835, ipnet:130.225.0.0/16, country:EU] X-Rspamd-Queue-Id: 4Rp3285kDJz4Xjg -------- Sebastian Huber writes: > the timecounter structure contains a tc_counter_mask which enables > support for time counters implementing less than 32-bits: > Is the sys/x86/isa/clock.c still used? Are there chips on the market > with 24-bit ACPI timers? ... and are there any FreeBSD platforms using narrow timecounters outside the src-tree ? My personal gut feeling, is that we can get away with it, once i386 is out of the picture. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From nobody Sun Sep 17 13:59:43 2023 X-Original-To: freebsd-hackers@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 4RpV1g2mbyz4spxH; Sun, 17 Sep 2023 14:00:23 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) (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 4RpV1f3h90z3VTG; Sun, 17 Sep 2023 14:00:22 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=jQxh1bLv; spf=pass (mx1.freebsd.org: domain of marietto2008@gmail.com designates 2a00:1450:4864:20::634 as permitted sender) smtp.mailfrom=marietto2008@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-99c93638322so792142766b.1; Sun, 17 Sep 2023 07:00:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694959220; x=1695564020; darn=freebsd.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=I4kyz7/PiQ2XatmATVkbGpGplQFSIPsioi38OusTWYg=; b=jQxh1bLv0e0UG6Sb3HD0mWEomSZZIgdjmvKyvfcknxR85GcMx0GztzNFg1dlIvXDel a3wgMN5OMxc1Dfd9aGaJ5hLddOpq4lHqlNEiUdNB79P8haFpp78UbaZ2LGNphReJhu5/ jbR6Y/l+KV5f3KoCothd+MBEwWPK4SWNd3DjqYSUjk79b6DFhkn4FGsN/3JZW2SEgqYF 5/AoDHrrYvhAHXG5084zl6eoe4vKlY5CG+LOpjbHgrffC/rdVyXKK6Goaj8v0ZZoWcPV TR+v+mCP2w4eZGQliPIMYM4dKKtmLDh6FGUZZkJ5HuNQ1osQ7h4fHs79DPW8rhsFi8DP s5lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694959220; x=1695564020; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=I4kyz7/PiQ2XatmATVkbGpGplQFSIPsioi38OusTWYg=; b=R76dr7lXqkV7UehI4MDhO8nzVv6f0bZU/52357KUNoWQJ8APW1NVEmJEJKZbVcSmbp 5c2knF1L9ylcXQmvrcd9tgEX5HoUBvOsDQMtW/zK93+jDWYOaDV+el7xG5i/WCz6ZIFG sw5y6X5czlerl6R26nJlgBdF2qf7sbwVwzJ0q/CfC+UD0YjVUujbDPG8C+LHnJ8cwF+E 92Ow6PrOTx9FInBvkZXV3ZBMCBPdTEaF5vDEU0Rt55yOo+TcHUozgiphraxl6lE1H1nQ XkZW6yZB6MfppUuNrFi+Gttjq6g3uVxdHokbJUe45ZHFCdiVm3K/++3dTPegk4QtchLf FLyg== X-Gm-Message-State: AOJu0YwdmJZZuHQ5ED4ojU1+fUZ6D2D4KHpSok62CU33xxJMu1U+cTyw gZKreX8XBVI0xvbBRceOI3N6pY1X9Hw/UXe+t688rMTayyo= X-Google-Smtp-Source: AGHT+IG1ra0xdiigy432x3jqf2sI4oupYxFiHi6hYOl8GZP8NLKRI0idbh2G4cWqJoStbpK0YjpIYigAJn7Dh4OzN24= X-Received: by 2002:a17:906:31cb:b0:9a2:1e14:86b9 with SMTP id f11-20020a17090631cb00b009a21e1486b9mr8968987ejf.0.1694959219609; Sun, 17 Sep 2023 07:00:19 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Mario Marietto Date: Sun, 17 Sep 2023 15:59:43 +0200 Message-ID: Subject: Fwd: make[4]: "/build/armv7/usr/src/sys/conf/kmod.mk" line 234: Malformed conditional (!defined(DEBUG_FLAGS) || ${MK_SPLIT_KERNEL_DEBUG} =="no") To: freebsd-hackers , hackers@freebsd.org Content-Type: multipart/alternative; boundary="00000000000031978c06058e7271" X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.82 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; SUBJECT_HAS_CURRENCY(1.00)[]; NEURAL_HAM_SHORT(-0.82)[-0.823]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::634:from]; SUBJECT_HAS_EXCLAIM(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCPT_COUNT_TWO(0.00)[2]; RCVD_COUNT_ONE(0.00)[1]; DKIM_TRACE(0.00)[gmail.com:+]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org,hackers@freebsd.org] X-Rspamd-Queue-Id: 4RpV1f3h90z3VTG --00000000000031978c06058e7271 Content-Type: text/plain; charset="UTF-8" Hello to everyone, I'm trying to cross-compile the kernel on a different host (with the goal to apply a patch,but this a different story) : FreeBSD 13.2-RELEASE-p3 GENERIC amd64 to an armv7 target : bash export BASEDIR=/build/armv7 export MAKEOBJDIRPREFIX=/build/armv7/obj mkdir -p /build/armv7/usr cd /usr cp -r src /build/armv7/src cd /build/armv7 fetch -o if_vtnet.c.patch https://bugs.freebsd.org/bugzilla/attachment.cgi?id=242127&action=diff patch -u < if_vtnet.c.patch cd usr/src make -j4 -DNO_KERNELDEPEND -DNO_CLEAN buildkernel TARGET_ARCH=armv7 KERNCONF=GENERIC unfortunately I get these errors : make[4]: "/build/armv7/usr/src/sys/conf/kmod.mk" line 234: Malformed conditional (!defined(DEBUG_FLAGS) || ${MK_SPLIT_KERNEL_DEBUG} =="no") make[4]: "/build/armv7/usr/src/sys/conf/kmod.mk" line 334: Malformed conditional (defined(DEBUG_FLAGS) && ${MK_SPLIT_KERNEL_DEBUG} != "no") 'cause these errors I can't issue the next command : # make -DNO_KERNELDEPEND -DNO_CLEAN installkernel TARGET_ARCH=armv7 KERNCONF=GENERIC DESTDIR=$BASEDIR/build Any idea about how to fix it ? thanks. -- Mario. -- Mario. --00000000000031978c06058e7271 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello to = everyone,

I'm trying t= o cross-compile the kernel on a different host (with the goal to apply a pa= tch,but this a different story) :


Fr=
eeBSD 13.2-RELEASE-p3 GENERIC amd64

to an armv7 target :


bash

export BASEDIR=3D/build/armv7

export MAKEOBJDIRPREFIX=3D/build/armv7/obj

mkdir -p /build/armv7/usr

cd /usr

cp -r src /build/armv7/src

cd /build/armv7

fetch -o if_vtnet.c.patch https://bugs.fr=
eebsd.org/bugzilla/attachment.cgi?id=3D242127&action=3Ddiff

patch -u < if_vtnet.c.patch

cd usr/src

make -j4 -DNO_KERNELDEPEND -DNO_CLEAN buildkernel TARGET_ARCH=3Darmv7 KERNC=
ONF=3DGENERIC


unfortunately I get these errors :


make[4]: "/build/armv7/usr/src/sys/conf/kmod.mk" line 234: Malformed conditional (!defined(=
DEBUG_FLAGS) || ${MK_SPLIT_KERNEL_DEBUG} =3D=3D"no")

make[4]: "/build/armv7/usr/src/sys/conf/kmod.mk" line 334: Malformed conditional (defined(D=
EBUG_FLAGS) && ${MK_SPLIT_KERNEL_DEBUG} !=3D "no")


'cause these errors I can't issue the next command :


# make -DNO_KERNELDEPEND -DNO_CLEAN installkernel TARGET_ARCH=3Darmv7 KERNC=
ONF=3DGENERIC DESTDIR=3D$BASEDIR/build


Any idea about how to fix it ? thanks.

<= p>

--
Mario.


--
Mario.
--00000000000031978c06058e7271-- From nobody Sun Sep 17 13:59:43 2023 X-Original-To: hackers@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 4RpV1g2mbyz4spxH; Sun, 17 Sep 2023 14:00:23 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) (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 4RpV1f3h90z3VTG; Sun, 17 Sep 2023 14:00:22 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=jQxh1bLv; spf=pass (mx1.freebsd.org: domain of marietto2008@gmail.com designates 2a00:1450:4864:20::634 as permitted sender) smtp.mailfrom=marietto2008@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-99c93638322so792142766b.1; Sun, 17 Sep 2023 07:00:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694959220; x=1695564020; darn=freebsd.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=I4kyz7/PiQ2XatmATVkbGpGplQFSIPsioi38OusTWYg=; b=jQxh1bLv0e0UG6Sb3HD0mWEomSZZIgdjmvKyvfcknxR85GcMx0GztzNFg1dlIvXDel a3wgMN5OMxc1Dfd9aGaJ5hLddOpq4lHqlNEiUdNB79P8haFpp78UbaZ2LGNphReJhu5/ jbR6Y/l+KV5f3KoCothd+MBEwWPK4SWNd3DjqYSUjk79b6DFhkn4FGsN/3JZW2SEgqYF 5/AoDHrrYvhAHXG5084zl6eoe4vKlY5CG+LOpjbHgrffC/rdVyXKK6Goaj8v0ZZoWcPV TR+v+mCP2w4eZGQliPIMYM4dKKtmLDh6FGUZZkJ5HuNQ1osQ7h4fHs79DPW8rhsFi8DP s5lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694959220; x=1695564020; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=I4kyz7/PiQ2XatmATVkbGpGplQFSIPsioi38OusTWYg=; b=R76dr7lXqkV7UehI4MDhO8nzVv6f0bZU/52357KUNoWQJ8APW1NVEmJEJKZbVcSmbp 5c2knF1L9ylcXQmvrcd9tgEX5HoUBvOsDQMtW/zK93+jDWYOaDV+el7xG5i/WCz6ZIFG sw5y6X5czlerl6R26nJlgBdF2qf7sbwVwzJ0q/CfC+UD0YjVUujbDPG8C+LHnJ8cwF+E 92Ow6PrOTx9FInBvkZXV3ZBMCBPdTEaF5vDEU0Rt55yOo+TcHUozgiphraxl6lE1H1nQ XkZW6yZB6MfppUuNrFi+Gttjq6g3uVxdHokbJUe45ZHFCdiVm3K/++3dTPegk4QtchLf FLyg== X-Gm-Message-State: AOJu0YwdmJZZuHQ5ED4ojU1+fUZ6D2D4KHpSok62CU33xxJMu1U+cTyw gZKreX8XBVI0xvbBRceOI3N6pY1X9Hw/UXe+t688rMTayyo= X-Google-Smtp-Source: AGHT+IG1ra0xdiigy432x3jqf2sI4oupYxFiHi6hYOl8GZP8NLKRI0idbh2G4cWqJoStbpK0YjpIYigAJn7Dh4OzN24= X-Received: by 2002:a17:906:31cb:b0:9a2:1e14:86b9 with SMTP id f11-20020a17090631cb00b009a21e1486b9mr8968987ejf.0.1694959219609; Sun, 17 Sep 2023 07:00:19 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Mario Marietto Date: Sun, 17 Sep 2023 15:59:43 +0200 Message-ID: Subject: Fwd: make[4]: "/build/armv7/usr/src/sys/conf/kmod.mk" line 234: Malformed conditional (!defined(DEBUG_FLAGS) || ${MK_SPLIT_KERNEL_DEBUG} =="no") To: freebsd-hackers , hackers@freebsd.org Content-Type: multipart/alternative; boundary="00000000000031978c06058e7271" X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.82 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; SUBJECT_HAS_CURRENCY(1.00)[]; NEURAL_HAM_SHORT(-0.82)[-0.823]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::634:from]; SUBJECT_HAS_EXCLAIM(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCPT_COUNT_TWO(0.00)[2]; RCVD_COUNT_ONE(0.00)[1]; DKIM_TRACE(0.00)[gmail.com:+]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org,hackers@freebsd.org] X-Rspamd-Queue-Id: 4RpV1f3h90z3VTG --00000000000031978c06058e7271 Content-Type: text/plain; charset="UTF-8" Hello to everyone, I'm trying to cross-compile the kernel on a different host (with the goal to apply a patch,but this a different story) : FreeBSD 13.2-RELEASE-p3 GENERIC amd64 to an armv7 target : bash export BASEDIR=/build/armv7 export MAKEOBJDIRPREFIX=/build/armv7/obj mkdir -p /build/armv7/usr cd /usr cp -r src /build/armv7/src cd /build/armv7 fetch -o if_vtnet.c.patch https://bugs.freebsd.org/bugzilla/attachment.cgi?id=242127&action=diff patch -u < if_vtnet.c.patch cd usr/src make -j4 -DNO_KERNELDEPEND -DNO_CLEAN buildkernel TARGET_ARCH=armv7 KERNCONF=GENERIC unfortunately I get these errors : make[4]: "/build/armv7/usr/src/sys/conf/kmod.mk" line 234: Malformed conditional (!defined(DEBUG_FLAGS) || ${MK_SPLIT_KERNEL_DEBUG} =="no") make[4]: "/build/armv7/usr/src/sys/conf/kmod.mk" line 334: Malformed conditional (defined(DEBUG_FLAGS) && ${MK_SPLIT_KERNEL_DEBUG} != "no") 'cause these errors I can't issue the next command : # make -DNO_KERNELDEPEND -DNO_CLEAN installkernel TARGET_ARCH=armv7 KERNCONF=GENERIC DESTDIR=$BASEDIR/build Any idea about how to fix it ? thanks. -- Mario. -- Mario. --00000000000031978c06058e7271 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello to = everyone,

I'm trying t= o cross-compile the kernel on a different host (with the goal to apply a pa= tch,but this a different story) :


Fr=
eeBSD 13.2-RELEASE-p3 GENERIC amd64

to an armv7 target :


bash

export BASEDIR=3D/build/armv7

export MAKEOBJDIRPREFIX=3D/build/armv7/obj

mkdir -p /build/armv7/usr

cd /usr

cp -r src /build/armv7/src

cd /build/armv7

fetch -o if_vtnet.c.patch https://bugs.fr=
eebsd.org/bugzilla/attachment.cgi?id=3D242127&action=3Ddiff

patch -u < if_vtnet.c.patch

cd usr/src

make -j4 -DNO_KERNELDEPEND -DNO_CLEAN buildkernel TARGET_ARCH=3Darmv7 KERNC=
ONF=3DGENERIC


unfortunately I get these errors :


make[4]: "/build/armv7/usr/src/sys/conf/kmod.mk" line 234: Malformed conditional (!defined(=
DEBUG_FLAGS) || ${MK_SPLIT_KERNEL_DEBUG} =3D=3D"no")

make[4]: "/build/armv7/usr/src/sys/conf/kmod.mk" line 334: Malformed conditional (defined(D=
EBUG_FLAGS) && ${MK_SPLIT_KERNEL_DEBUG} !=3D "no")


'cause these errors I can't issue the next command :


# make -DNO_KERNELDEPEND -DNO_CLEAN installkernel TARGET_ARCH=3Darmv7 KERNC=
ONF=3DGENERIC DESTDIR=3D$BASEDIR/build


Any idea about how to fix it ? thanks.

<= p>

--
Mario.


--
Mario.
--00000000000031978c06058e7271-- From nobody Mon Sep 18 09:40:34 2023 X-Original-To: freebsd-hackers@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 4Rq0Cr34Scz4sstR for ; Mon, 18 Sep 2023 09:40:56 +0000 (UTC) (envelope-from freebsd@igalic.co) Received: from mail-40136.proton.ch (mail-40136.proton.ch [185.70.40.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "protonmail.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rq0Cp2vV8z3QpT for ; Mon, 18 Sep 2023 09:40:54 +0000 (UTC) (envelope-from freebsd@igalic.co) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=igalic.co header.s=protonmail2 header.b=hX6Vrutq; spf=pass (mx1.freebsd.org: domain of freebsd@igalic.co designates 185.70.40.136 as permitted sender) smtp.mailfrom=freebsd@igalic.co; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=igalic.co; s=protonmail2; t=1695030050; x=1695289250; bh=Ih6oDsZ13MJ3ipat+bNlj/Rfp8G3sY9GO/ZtrAfndEw=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=hX6VrutqCIHYqeQ4Ra60Mh6CQ9i1IZW6I8ibmsqOsCFGs23BHyc2sSitgykvgLKB3 6cK25UPYCnSe003YdFBj/idzUUwLWPEJTsCvw12hFT5LKRRFe5vqkN5Xs1ISArgle5 RF8nyY6mzPZfjvHuo58GGWc/Z++UGerbNO5EMdLytaM99H02Wh3IgM/yBTXq9Ub02Q lJOM7k3alosWZQp/MNb9hWet62mfnDuwRlwHLHdiHGfu4rV+5H90rG6MZ+ovLJIFYv 1xH2Yo5YqhlIyWwrYmhqj8vxwPill3IqYuNXzSudefF2OHJbGZrLQTEQVLrSUnMwI3 TIBU5wr9aWtvw== Date: Mon, 18 Sep 2023 09:40:34 +0000 To: "freebsd-virtualization@FreeBSD.org" , freebsd-hackers From: =?utf-8?Q?Mina_Gali=C4=87?= Subject: Soliciting reviews for virtio(9) man pages Message-ID: Feedback-ID: 66573723:user:proton List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="b1_YzxyyrXJ1wbJQRrcSFLCfwtR7TByGc4W8Zn5z4E68w" X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.80 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; RWL_MAILSPIKE_EXCELLENT(-0.40)[185.70.40.136:from]; R_SPF_ALLOW(-0.20)[+ip4:185.70.40.0/24]; R_DKIM_ALLOW(-0.20)[igalic.co:s=protonmail2]; MIME_BASE64_TEXT(0.10)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_COUNT_ZERO(0.00)[0]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+,1:+,2:~]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[igalic.co:+]; TO_DN_EQ_ADDR_SOME(0.00)[]; ASN(0.00)[asn:62371, ipnet:185.70.40.0/24, country:CH]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[igalic.co]; HAS_PHPMAILER_SIG(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4Rq0Cp2vV8z3QpT This is a multi-part message in MIME format. --b1_YzxyyrXJ1wbJQRrcSFLCfwtR7TByGc4W8Zn5z4E68w Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 SGkgZm9sa3MsCgpJJ3ZlIGJlZW4gd29ya2luZyBvbiBnZXR0aW5nIHRoZSB2aXJ0aW8gQVBJcyBk b2N1bWVudGVkLgpUaGUgcmVzdWx0IG9mIHRoYXQgd29yayBjYW4gYmUgZm91bmQgaW4gdGhpcyBz dGFjayBvZiByZXZpZXdzOiBodHRwczovL3Jldmlld3MuZnJlZWJzZC5vcmcvRDQxODUzCgpGaXJz dCBhbmQgZm9yZW1vc3QsIEkgbmVlZCBmZWVkYmFjayBpZiB0aGUgd29yZHMgaSBoYXZlIHdyaXR0 ZW4gYXJlIGNvcnJlY3QsIGFuZCB0aGVuIHNvbWUgYWR2aWNlIG9uIGhvdyB0byBzbGljZSB0aGUg cHJlc2VudGF0aW9uLgoKSSB3b3VsZCBsaWtlIHZpcnRpbyg5KSB0byBzZXJ2ZSBhcyBlbnRyeSB0 byB0aGUgQVBJLCBnaXZpbmcgYW5kIGEgc29ydCBvZiBpbnRybyg5KSBsaWtlIG92ZXJ2aWV3LCBi dXQgaSBkb24ndCBrbm93IHdoYXQgYSBnb29kIGdyb3VwaW5nIGlzIGZvciB0aGUgb3RoZXIgZnVu Y3Rpb25zIHZpcnRpby5oIGFuZCB2aXJ0cXVldWUuaCBmdW5jdGlvbnMuCgppbiBjYXNlIHlvdSdy ZSB3b25kZXJpbmc6IE1pbmEsIHdoeSBhcmUgeW91IGV2ZW4gZG9pbmcgdGhpcz8/IEkndmUgYmVl biB0cnlpbmcgdG8gaW1wbGVtZW50IGEgdmlydGlvIHZzb2NrIGRldmljZSBkcml2ZXIsIGFuZCBo aXQgYSB3YWxsIG9mIHVuZGVyc3RhbmRpbmcuIFJlbGF0ZWQgcGF0Y2hlczoKCi0gaHR0cHM6Ly9y ZXZpZXdzLmZyZWVic2Qub3JnL0Q0MTg4NwotIGh0dHBzOi8vZ2l0aHViLmNvbS9mcmVlYnNkL2Zy ZWVic2Qtc3JjL3B1bGwvODI3CgpUaGFuayB5b3UgaW4gYWR2YW5jZSBmb3IgeW91ciBoZWxwLgoK S2luZCByZWdhcmRzLAoKTWluYSBHYWxpxIc= --b1_YzxyyrXJ1wbJQRrcSFLCfwtR7TByGc4W8Zn5z4E68w Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: base64 SGkgZm9sa3MsPGJyPjxicj5JJ3ZlIGJlZW4gd29ya2luZyBvbiBnZXR0aW5nIHRoZSB2aXJ0aW8g QVBJcyBkb2N1bWVudGVkLjxicj5UaGUgcmVzdWx0IG9mIHRoYXQgd29yayBjYW4gYmUgZm91bmQg aW4gdGhpcyBzdGFjayBvZiByZXZpZXdzOiA8YSBocmVmPSJodHRwczovL3Jldmlld3MuZnJlZWJz ZC5vcmcvRDQxODUzIj5odHRwczovL3Jldmlld3MuZnJlZWJzZC5vcmcvRDQxODUzPC9hPjxicj48 YnI+Rmlyc3QgYW5kIGZvcmVtb3N0LCBJIG5lZWQgZmVlZGJhY2sgaWYgdGhlIHdvcmRzIGkgaGF2 ZSB3cml0dGVuIGFyZSBjb3JyZWN0LCBhbmQgdGhlbiBzb21lIGFkdmljZSBvbiBob3cgdG8gc2xp Y2UgdGhlIHByZXNlbnRhdGlvbi48YnI+PGJyPkkgd291bGQgbGlrZSB2aXJ0aW8oOSkgdG8gc2Vy dmUgYXMgZW50cnkgdG8gdGhlIEFQSSwgZ2l2aW5nIGFuZCBhIHNvcnQgb2YgaW50cm8oOSkgbGlr ZSBvdmVydmlldywgYnV0IGkgZG9uJ3Qga25vdyB3aGF0IGEgZ29vZCBncm91cGluZyBpcyBmb3Ig dGhlIG90aGVyIGZ1bmN0aW9ucyB2aXJ0aW8uaCBhbmQgdmlydHF1ZXVlLmggZnVuY3Rpb25zLjxi cj48YnI+aW4gY2FzZSB5b3UncmUgd29uZGVyaW5nOiBNaW5hLCB3aHkgYXJlIHlvdSBldmVuIGRv aW5nIHRoaXM/PyBJJ3ZlIGJlZW4gdHJ5aW5nIHRvIGltcGxlbWVudCBhIHZpcnRpbyB2c29jayBk ZXZpY2UgZHJpdmVyLCBhbmQgaGl0IGEgd2FsbCBvZiB1bmRlcnN0YW5kaW5nLiBSZWxhdGVkIHBh dGNoZXM6IDxicj48YnI+LSA8YSBocmVmPSJodHRwczovL3Jldmlld3MuZnJlZWJzZC5vcmcvRDQx ODg3Ij5odHRwczovL3Jldmlld3MuZnJlZWJzZC5vcmcvRDQxODg3PC9hPjxicj4tIDxhIGhyZWY9 Imh0dHBzOi8vZ2l0aHViLmNvbS9mcmVlYnNkL2ZyZWVic2Qtc3JjL3B1bGwvODI3Ij5odHRwczov L2dpdGh1Yi5jb20vZnJlZWJzZC9mcmVlYnNkLXNyYy9wdWxsLzgyNzwvYT48YnI+PGJyPlRoYW5r IHlvdSBpbiBhZHZhbmNlIGZvciB5b3VyIGhlbHAuPGJyPjxicj5LaW5kIHJlZ2FyZHMsIDxicj48 YnI+PGJyPk1pbmEgR2FsacSH --b1_YzxyyrXJ1wbJQRrcSFLCfwtR7TByGc4W8Zn5z4E68w-- From nobody Mon Sep 18 21:12:57 2023 X-Original-To: freebsd-hackers@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 4RqHZM0PHKz4tlqq for ; Mon, 18 Sep 2023 21:12:59 +0000 (UTC) (envelope-from rockyhotas@post.com) Received: from mout.gmx.com (mout.gmx.com [74.208.4.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.gmx.com", Issuer "GeoTrust TLS RSA CA G1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RqHZL37Mwz4Sg4 for ; Mon, 18 Sep 2023 21:12:58 +0000 (UTC) (envelope-from rockyhotas@post.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=post.com header.s=s1089575 header.b=cM42U1B2; spf=pass (mx1.freebsd.org: domain of rockyhotas@post.com designates 74.208.4.201 as permitted sender) smtp.mailfrom=rockyhotas@post.com; dmarc=pass (policy=none) header.from=post.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=post.com; s=s1089575; t=1695071577; x=1695676377; i=rockyhotas@post.com; bh=Jhg0U+RWt+M4yGIm4UQd+e959j7RQ5yXT5UCygYCD3U=; h=X-UI-Sender-Class:From:To:Subject:Date; b=cM42U1B2sB5/oIAENWdeve9dhqJE90hPYT46Wc0BJR7klJQpC6Bsm+FSBvqK6vFLFQJkev47JLy Q/dahKLvzbnwNQ58VvDkjdjCqIOPzZYoScAQeWLJ/zj4Kd30Eau4YKi8OM4lYHvrq652qbjOWLG1H qfxIyCtyYUV/yLpWYGrr3QB9HxPF3JIZ7cnqwp43hpgOzC3FV3nEuS77tAQIcd28aH5ZOT/neGC43 ziFeRucPC0tnG2jZ2rNOKPn0vNDsIbaD7BbL8KpMNP+HePJXa88QagVxWxtxxf4uty8oQzXRIIsHF cv7aKh4Gfxdzvo864S4C+qJQzI0VEpFIDG5A== X-UI-Sender-Class: f2cb72be-343f-493d-8ec3-b1efb8d6185a Received: from [91.81.140.147] ([91.81.140.147]) by web-mail.mail.com (3c-app-mailcom-lxa16.server.lan [10.76.45.17]) (via HTTP); Mon, 18 Sep 2023 23:12:57 +0200 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Message-ID: From: Rocky Hotas To: freebsd-hackers@FreeBSD.org Subject: Error while building a kernel module with mkdir(2) Content-Type: text/plain; charset=UTF-8 Date: Mon, 18 Sep 2023 23:12:57 +0200 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:h/E0rrLeuR3+5mXQDP4VCT9JnACJfO805Ms8bfla7mQPmdW691XOtgfYMx1fqUoxTXmj1 Ih9nwK0VIYYkI7kyiyzpAvrJLtc76GtkAylZsyTlqjaflHaXw/ebMKoQVE8fPhbcQBg8VHSKXp9b TlLeiJRj97x1AuXRx2IjLzrO8IQfD6iUokDXbHLaLekTGe5hUKjgJIsjOzg40iWj4DhUVI2HOlQR szreoEKKi/dWoG9QygxPk6gak6T3FZvuSTrKBxN/SH41KFCWiIbDD4xF+JJX/ZTeTaIMwfT41wQz kU= X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:1RcXozQnmcg=;D2gAldtroJHrxm2/1eUv8RrN24S njH38MPeeaPStZjwDXmGorCKiohhZamJ7aVY5NSXGPCt/YVflwk0nryFIiqTYe4c0AMQppM/Y YTcO6ozWNGG5Fd+1B1EE4C49JbtNkmXqkG3bs0GwWr5tbGwotwK4TOLeusGpEAkPek2JxPR3q TjdaTM2DopAJ+VyEbSyBlqu9VBPX3y5P1JbQXNutclFaC1C39If36NqKw0PxoQVXNn3CULyIR sp8ghlUQmefR+2JHB2f9uCaxM2XeTIs0rPbSTN/0UGF4qcTHBD5kp9NjPVE8mRyTl1piAES4a fVlybwS0oP4sdCveLCJuhnSmSQfElRrMEr6CXzlvnOqS/39rygciI5MG7jzQb3PSMNfm6BXxI JMVV17EyAKmc9YDZFPCD6n7dC+5iuWCO9U+fCSkvNUPORWHASU96KwO7cgujA8RGklceo8hdc v6O5EMDVIvlZ4YYJZhRXrWBWuLZ9F1LwEinN9C2A6tH6lalLkDEFbsEM2N6Lgg6rmwZ1WpR5k gOHRuFX0J0i5uVwY34P1HpiUTlZ1bfgKPWoJGV1pCRIBbdcsVHgOsUMKr9sA30Ao8bqDdKML+ uPKx7+Vh8Kx66vCxXI5iL9fnamoitx6r+mnlD2S6XOuVTWcxcCT/qoHEfkTrDlgJ0/tSo4xIK 3pzhAAlWqzbEVA6XxxhbCZlNmKerckma5irRMcYHoIL3qkz9DEHADLzfawgbFyciT1eqz0Qld IHoWUyvLsjbQu4eRwzd+QARYqbatgRtrXE6Gk2ywmRW1U+lsId24dI6dT46sQ0rw7XJ65RFXB Ed8rqCTG63i0Df27cNOrVx7w== X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.44 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.994]; NEURAL_HAM_LONG(-0.98)[-0.978]; NEURAL_HAM_SHORT(-0.97)[-0.965]; MID_RHS_NOT_FQDN(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[post.com,none]; R_DKIM_ALLOW(-0.20)[post.com:s=s1089575]; R_SPF_ALLOW(-0.20)[+ip4:74.208.4.192/26]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[74.208.4.201:from]; ONCE_RECEIVED(0.10)[]; MIME_TRACE(0.00)[0:+]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[post.com:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[freebsd-hackers@FreeBSD.org]; BLOCKLISTDE_FAIL(0.00)[91.81.140.147:server fail,74.208.4.201:server fail]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; HAS_X_PRIO_THREE(0.00)[3]; ASN(0.00)[asn:8560, ipnet:74.208.0.0/16, country:DE]; FREEMAIL_ENVFROM(0.00)[post.com]; RCVD_TLS_LAST(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[74.208.4.201:from]; RCVD_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; FREEMAIL_FROM(0.00)[post.com] X-Rspamd-Queue-Id: 4RqHZL37Mwz4Sg4 Hello! I hope this is the right ML to discuss about this issue. I am trying to build the example kernel module presented in paragraph 2.1 of Designing BSD Rootkits: An Introduction to Kernel Hacking by Joseph Kong However, I get this error: mkdir_hook.c:42:9: error: implicit declaration of function 'mkdir' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return(mkdir(td, syscall_args)); ^ mkdir_hook.c:57:45: error: use of undeclared identifier 'mkdir' sysent[SYS_mkdir].sy_call = (sy_call_t *)mkdir; mkdir(2) requires `#include ' and I added it (while it was not in the code from the book), but nothing changes. What's still wrong? After this text, I paste the code and the Makefile (written following https://docs.freebsd.org/en/books/arch-handbook/driverbasics/). Bye! Rocky === code: mkdir_hook.c === #include #include /* defines used in kernel.h */ #include #include #include #include /* types used in module initialization */ #include /* uprintf */ #include #include #include /* mkdir(2) */ /* mkdir system call hook. */ static int mkdir_hook(struct thread *td, void *syscall_args) { struct mkdir_args /* { char *path; int mode; } */ *uap; uap = (struct mkdir_args *)syscall_args; char path[255]; size_t done; int error; error = copyinstr(uap->path, path, 255, &done); if (error != 0) return(error); /* Print a debug message. */ uprintf("The directory \"%s\" will be created with the following" " permissions: %o\n", path, uap->mode); return(mkdir(td, syscall_args)); } /* The function called at load/unload. */ static int load(struct module *module, int cmd, void *arg) { int error = 0; switch (cmd) { case MOD_LOAD: /* Replace mkdir with mkdir_hook. */ sysent[SYS_mkdir].sy_call = (sy_call_t *)mkdir_hook; break; case MOD_UNLOAD: /* Change everything back to normal. */ sysent[SYS_mkdir].sy_call = (sy_call_t *)mkdir; break; default: error = EOPNOTSUPP; break; } return(error); } static moduledata_t mkdir_hook_mod = { "mkdir_hook", /* module name */ load, /* event handler */ NULL /* extra data */ }; DECLARE_MODULE(mkdir_hook, mkdir_hook_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); === Makefile === KMOD=mkdir_hook SRCS=mkdir_hook.c .include From nobody Mon Sep 18 21:38:18 2023 X-Original-To: freebsd-hackers@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 4RqJ7g6Q8Dz4tnLP for ; Mon, 18 Sep 2023 21:38:23 +0000 (UTC) (envelope-from yuri@aetern.org) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RqJ7g2qHKz4ZMg for ; Mon, 18 Sep 2023 21:38:23 +0000 (UTC) (envelope-from yuri@aetern.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=aetern.org header.s=fm1 header.b=uAUnUBwd; dkim=pass header.d=messagingengine.com header.s=fm2 header.b="C XGuWEh"; spf=pass (mx1.freebsd.org: domain of yuri@aetern.org designates 66.111.4.25 as permitted sender) smtp.mailfrom=yuri@aetern.org Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 70BE75C01CE for ; Mon, 18 Sep 2023 17:38:22 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 18 Sep 2023 17:38:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aetern.org; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1695073102; x=1695159502; bh=eiTNCJtdQCVL4YoPTc+9Gxd4JfEUVk8hgi1 Df2JlZcc=; b=uAUnUBwd3PdDAcHaIDdgKRKze9KoyLeIi38PxaU4r1NULDvQgLA 9uMOZHctLgWQvoDqMyVOoZPhOrnp6ueENPJ1bysSWM+v7D73E2SEeUKhkqvjwE/Z Y6oi1Opu1FxDupB+k95fV4SB+Q2XhBFAcqmfL8vYaWpy6T130Y494Yc21lL1/LZp lDVpW7xab+s165iYuZ+Or4HWGUIIv6XvofvWaVt3Eo66mXOfgM3zeCi1D58CMn6g iUFZm4UsKE/GDR01CEzNBVbw+rw8wqel1RJuiXZDn6ppVa+L7GQEzhdERgvKLr5c xltZfESeTYBpJ7RQcDuqNw4tbUCeTPdwcrg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1695073102; x= 1695159502; bh=eiTNCJtdQCVL4YoPTc+9Gxd4JfEUVk8hgi1Df2JlZcc=; b=C XGuWEhY7VJ34hidd3NK4WVKTi2ZLLrW+5KDOkt3ECKsvLQgCgsOxhyvD+jLCuD9D MrFO6Iquago3olstDQxKAIDwWmNckmBtQ/j2Kvs2ufQ0k0yIzmYvTIApcSa+Fl46 Zh0KHwnlFaUppQm8BXcFg6cNf5TQXicISa9mVhicEYu0Q80/dXfrAWJ7BzJjOyC4 Urgj7L8AW3n+0THhsDAf6DfOBjxLPrbPuISTjKbq2ExXETn6qBHw03JOFViDi7xB BijOHm7ljVZsy83CttfiKPxnxLFPAW2Y3F3sno8OILxPfHeKfYISbMSVzyXmL/E1 DoNZBXpGlYqcyYOlDc1Uw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudejlecutefuodetggdotefrodftvfcurf hrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthejredttd dvjeenucfhrhhomhepjghurhhiuceohihurhhisegrvghtvghrnhdrohhrgheqnecuggft rfgrthhtvghrnhepkefhgfetfffgleetvdeiudeijefgffefhfffffehieetkeetvdehff evveevveffnecuffhomhgrihhnpehfrhgvvggsshgurdhorhhgpdhkmhhougdrmhhknecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhephihurhhise grvghtvghrnhdrohhrgh X-ME-Proxy: Feedback-ID: i0d79475b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 18 Sep 2023 17:38:21 -0400 (EDT) Message-ID: <36d29d5c-43cd-4e77-9406-e786d08a79e2@aetern.org> Date: Mon, 18 Sep 2023 23:38:18 +0200 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Error while building a kernel module with mkdir(2) Content-Language: en-US To: freebsd-hackers@freebsd.org References: From: Yuri In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spamd-Bar: / X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: local_wl_from X-Spamd-Result: default: False [-0.39 / 15.00]; R_DKIM_ALLOW(-0.20)[aetern.org:s=fm1,messagingengine.com:s=fm2]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.25]; XM_UA_NO_VERSION(0.01)[]; local_wl_from(0.00)[yuri@aetern.org]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; FREEFALL_USER(0.00)[yuri]; DKIM_TRACE(0.00)[aetern.org:+,messagingengine.com:+]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; ASN(0.00)[asn:19151, ipnet:66.111.4.0/24, country:US] X-Rspamd-Queue-Id: 4RqJ7g2qHKz4ZMg Rocky Hotas wrote: > Hello! > I hope this is the right ML to discuss about this issue. I am trying to > build the example kernel module presented in paragraph 2.1 of > > Designing BSD Rootkits: An Introduction to Kernel Hacking > by Joseph Kong > > However, I get this error: > > mkdir_hook.c:42:9: error: implicit declaration of function 'mkdir' is invalid in C99 [-Werror,-Wimplicit-function-declaration] > return(mkdir(td, syscall_args)); > ^ > mkdir_hook.c:57:45: error: use of undeclared identifier 'mkdir' > sysent[SYS_mkdir].sy_call = (sy_call_t *)mkdir; > > mkdir(2) requires `#include ' and I added it (while it was > not in the code from the book), but nothing changes. That include is for userland that needs mkdir(2). Your wrapper likely wants to override the in-kernel sys_mkdir() defined in . > What's still wrong? > > After this text, I paste the code and the Makefile (written following > https://docs.freebsd.org/en/books/arch-handbook/driverbasics/). > > Bye! > > Rocky > > > > === code: mkdir_hook.c === > > #include > #include /* defines used in kernel.h */ > #include > #include > #include > #include /* types used in module initialization */ > #include /* uprintf */ > #include > #include > #include /* mkdir(2) */ > > > /* mkdir system call hook. */ > static int > mkdir_hook(struct thread *td, void *syscall_args) > { > struct mkdir_args /* { > char *path; > int mode; > } */ *uap; > > uap = (struct mkdir_args *)syscall_args; > char path[255]; > size_t done; > int error; > error = copyinstr(uap->path, path, 255, &done); > > if (error != 0) > return(error); > /* Print a debug message. */ > uprintf("The directory \"%s\" will be created with the following" > " permissions: %o\n", path, uap->mode); > > return(mkdir(td, syscall_args)); > } > > /* The function called at load/unload. */ > static int > load(struct module *module, int cmd, void *arg) > { > int error = 0; > switch (cmd) { > case MOD_LOAD: > /* Replace mkdir with mkdir_hook. */ > sysent[SYS_mkdir].sy_call = (sy_call_t *)mkdir_hook; > break; > case MOD_UNLOAD: > /* Change everything back to normal. */ > sysent[SYS_mkdir].sy_call = (sy_call_t *)mkdir; > break; > > default: > error = EOPNOTSUPP; > break; > } > > return(error); > } > > static moduledata_t > mkdir_hook_mod = { > "mkdir_hook", /* module name */ > load, /* event handler */ > NULL /* extra data */ > }; > > DECLARE_MODULE(mkdir_hook, mkdir_hook_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); > > > > === Makefile === > > KMOD=mkdir_hook > SRCS=mkdir_hook.c > .include > From nobody Tue Sep 19 09:53:45 2023 X-Original-To: freebsd-hackers@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 4RqcSL3Mhnz4thmm for ; Tue, 19 Sep 2023 09:53:54 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RqcSK5l47z3TD2 for ; Tue, 19 Sep 2023 09:53:53 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.2/8.16.1) with ESMTP id 38J9rjLT067046; Tue, 19 Sep 2023 12:53:45 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.2/8.16.1/Submit) id 38J9rjxs067045; Tue, 19 Sep 2023 12:53:45 +0300 (MSK) (envelope-from dchagin) Date: Tue, 19 Sep 2023 12:53:45 +0300 From: Dmitry Chagin To: Rocky Hotas Cc: freebsd-hackers@freebsd.org Subject: Re: Error while building a kernel module with mkdir(2) Message-ID: References: List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU] X-Rspamd-Queue-Id: 4RqcSK5l47z3TD2 On Mon, Sep 18, 2023 at 11:12:57PM +0200, Rocky Hotas wrote: > Hello! > I hope this is the right ML to discuss about this issue. I am trying to > build the example kernel module presented in paragraph 2.1 of > > Designing BSD Rootkits: An Introduction to Kernel Hacking > by Joseph Kong > > However, I get this error: > > mkdir_hook.c:42:9: error: implicit declaration of function 'mkdir' is invalid in C99 [-Werror,-Wimplicit-function-declaration] > return(mkdir(td, syscall_args)); > ^ > mkdir_hook.c:57:45: error: use of undeclared identifier 'mkdir' > sysent[SYS_mkdir].sy_call = (sy_call_t *)mkdir; > > mkdir(2) requires `#include ' and I added it (while it was > not in the code from the book), but nothing changes. > > What's still wrong? > No more mkdir, look for kern_mkdirat at syscallsubr.h From nobody Tue Sep 19 13:24:52 2023 X-Original-To: freebsd-hackers@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 4Rqj7r1BBHz4tvtl for ; Tue, 19 Sep 2023 13:24:56 +0000 (UTC) (envelope-from rockyhotas@post.com) Received: from mout.gmx.com (mout.gmx.com [74.208.4.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.gmx.com", Issuer "GeoTrust TLS RSA CA G1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rqj7q3xrbz4R85 for ; Tue, 19 Sep 2023 13:24:55 +0000 (UTC) (envelope-from rockyhotas@post.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=post.com; s=s1089575; t=1695129892; x=1695734692; i=rockyhotas@post.com; bh=PkG4IwCvNRlXySz8UQ6Fk7fVI/gVquMJ/+I+1L/vxbM=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=MzpwYCzukGTZVy1dOLPTM10c+u5jIKItXY23WO3o/rd/f//vZfYjOEKcbjS+xQ4MxglYIjV8R/+ XPChGTuskimD9M3/kpHPfQ44uD6Ub499Wyw/upE8AMiR/77GGY1eAO8LvLi93iXXc1QG6vB4duY0q VTMn9Et46iRpEe+QZvscgvLvaDeOL3NNZF6m491e8P6Dpckit0b5+weYxBN0MxYPItgr16JdSAPah fI9Hr11m7iVRLzkQFC90bd2EpgbVJoBHGr5Ak8ftnlcIEPCEcV/E7jGkyf9ff8BUbws7iwvXKTXcR d4nihFBoeDmyFf6wMF2ITEco2pnSeeoY9Wxw== X-UI-Sender-Class: f2cb72be-343f-493d-8ec3-b1efb8d6185a Received: from [5.91.203.148] ([5.91.203.148]) by web-mail.mail.com (3c-app-mailcom-lxa01.server.lan [10.76.45.2]) (via HTTP); Tue, 19 Sep 2023 15:24:52 +0200 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Message-ID: From: Rocky Hotas To: Yuri Cc: freebsd-hackers@freebsd.org Subject: Re: Error while building a kernel module with mkdir(2) Content-Type: text/plain; charset=UTF-8 Date: Tue, 19 Sep 2023 15:24:52 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <36d29d5c-43cd-4e77-9406-e786d08a79e2@aetern.org> References: <36d29d5c-43cd-4e77-9406-e786d08a79e2@aetern.org> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:+kNkh48IyJXPhMa6ZyZv2iTPoCVooIccKwvDN7myCiWYB3rjrktPIKqqrWci/3bv+Pz31 LJmbiP373iEBu7QtvMaLB05IqSbO/x/ykd6ZrVzzcdb9umDPDR19aWg9K52VR88pWod62sYJpQ9s A8/fS7gQi6RDzwS9rrL/UY5iG0SDa3IZBrn70Au+tP5qKOAt9zY7MOahzt/xX1yjZveklQxvlS2m ANqFMga+6W1EjwJuKIu+7hkv98//ZAnbdJ+orKtCwA8d/0UNL0mGOgnWWwMsF3DENTutsc5+I9SK jo= X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:uhpoCAdV1b0=;HduSgyaMBaSFrkT0A+bZO6uxcCL LL4eMZihfno+efaUoEIYaMyaWd7T1NE/VZyA1R1+77o+P3f0/Bf71wahIurwbHx3d4PA+hf2U +hLYk6ryN2kRd6w6YiTyKcAislgFf7whZ1CWTy64SQ4Fs7wyDwSj+mYYz01AoCZuLPAcTalH9 mGoEBOLALUMKvhk5SOZFDFs2icLPaclp/PBrQjKmZv/D4txnIj2XL05vEWb/58bBHpTj5Z9IH 1PzXbrSDqsCnGpTb4U/RHt0CI49DvRpBZ6qjy6lPcEcjV6+l+cG4523hqLicO2gSfTYAb6NhR DKifW4CenF/2k0BgYnC0fh6vuLFdrvm34cdwjPOPjjgAtgjgYSppAhXJz0XnFap4WWrCxYJwQ vKzELVjSCEkunearTm9Y/x+llJi2sdFW7k0UnRT5Dekqm+79A/Wfp33ylgyBkh8NdW2mF+blF bOhPHXS25rqAiQ6yfTv8H5tDbjE98w6V8CRHEBt/DFFAM4M/w5o3byb/FyKSHWPTkSggIOGH+ IK/IspXemBhoSgray/UcuNx41p49X7LPIvYyYHzwfIxh8Egyc1RwmTmXwfc4+HQ3iMIW6XgBE lJWnln3gXfw9gJrQgEuBzJ5/hETLg3ZlbBrVfko1anPY3RscwVg56CaK4ThhuP022rRP3h+Zk XEIcUdFwYMMSYM6wCor42K43BmVLgvY9TWnNxrRmCd5PKgtzK8INGgTxS+5jIMAvkMEFJt3nQ c8zIdX/sXfmL8qyfqZ6BDwC/8E2GBQdfmMIP30/EXPPAlvoZD+kNwMZgm67qNcDsh/OLr0Kxv pOZxXzTDtjSKnBcTA7scStNA== Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:8560, ipnet:74.208.0.0/16, country:DE] X-Rspamd-Queue-Id: 4Rqj7q3xrbz4R85 > Sent: Monday, September 18, 2023 at 11:38 PM > From: "Yuri" > To: freebsd-hackers@freebsd.org > Subject: Re: Error while building a kernel module with mkdir(2) > > That include is for userland that needs mkdir(2). Your wrapper likely > wants to override the in-kernel sys_mkdir() defined in . Yes, it works this way. Thank you so much! Now, searching for sys_mkdir, I also found this post: with the same problem. The book is somewhat outdated. Are such kernel functions documented somewhere? sys_mkdir(9) does not exist. The only manpage I could find with `apropos syscall' is SYSCALL_MODULE(9), but it's not exactly what I was looking for. Rocky From nobody Tue Sep 19 15:28:31 2023 X-Original-To: hackers@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 4Rqltg5CtJz4v3FF for ; Tue, 19 Sep 2023 15:28:43 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rqltf2Bg5z4j76 for ; Tue, 19 Sep 2023 15:28:42 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of sebastian.huber@embedded-brains.de designates 85.10.215.148 as permitted sender) smtp.mailfrom=sebastian.huber@embedded-brains.de; dmarc=none Received: from sslproxy04.your-server.de ([78.46.152.42]) by dedi548.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qiceP-0007oz-9W; Tue, 19 Sep 2023 17:28:33 +0200 Received: from [82.100.198.138] (helo=mail.embedded-brains.de) by sslproxy04.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qiceP-0005eO-5g; Tue, 19 Sep 2023 17:28:33 +0200 Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id CD50A480053; Tue, 19 Sep 2023 17:28:32 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavis, port 10032) with ESMTP id Tq6MKnv1U_vZ; Tue, 19 Sep 2023 17:28:32 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 89549480054; Tue, 19 Sep 2023 17:28:32 +0200 (CEST) X-Virus-Scanned: amavis at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavis, port 10026) with ESMTP id r1e5TGiD6_0v; Tue, 19 Sep 2023 17:28:32 +0200 (CEST) Received: from [10.10.171.34] (unknown [10.10.171.34]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 5A43F480053; Tue, 19 Sep 2023 17:28:32 +0200 (CEST) Message-ID: Date: Tue, 19 Sep 2023 17:28:31 +0200 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Remove timecounter tc_counter_mask member? Content-Language: en-US To: Poul-Henning Kamp Cc: hackers@freebsd.org References: <202309162044.38GKi7RZ022115@critter.freebsd.dk> From: Sebastian Huber In-Reply-To: <202309162044.38GKi7RZ022115@critter.freebsd.dk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Authenticated-Sender: smtp-embedded@poldi-networks.de X-Virus-Scanned: Clear (ClamAV 0.103.10/27036/Tue Sep 19 09:42:31 2023) X-Spamd-Bar: - X-Spamd-Result: default: False [-1.52 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.996]; NEURAL_HAM_LONG(-0.99)[-0.993]; NEURAL_HAM_SHORT(-0.24)[-0.240]; R_SPF_ALLOW(-0.20)[+ip4:85.10.215.148]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; RCPT_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[hackers@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:24940, ipnet:85.10.192.0/18, country:DE]; R_DKIM_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_SEVEN(0.00)[7]; DMARC_NA(0.00)[embedded-brains.de]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; HAS_X_AS(0.00)[] X-Rspamd-Queue-Id: 4Rqltf2Bg5z4j76 On 16.09.23 22:44, Poul-Henning Kamp wrote: > Sebastian Huber writes: >=20 >> the timecounter structure contains a tc_counter_mask which enables >> support for time counters implementing less than 32-bits: >> Is the sys/x86/isa/clock.c still used? Are there chips on the market >> with 24-bit ACPI timers? > ... and are there any FreeBSD platforms using narrow timecounters > outside the src-tree ? >=20 > My personal gut feeling, is that we can get away with it, once i386 > is out of the picture. If it is in principle acceptable to remove the tc_counter_mask at some=20 point in time, would it make sense to issue a warning if a timecounter=20 is installed with a mask not equal to 0xffffffff? --=20 embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.huber@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht M=C3=BCnchen Registernummer: HRB 157899 Vertretungsberechtigte Gesch=C3=A4ftsf=C3=BChrer: Peter Rasmussen, Thomas= D=C3=B6rfler Unsere Datenschutzerkl=C3=A4rung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/ From nobody Tue Sep 19 15:41:33 2023 X-Original-To: hackers@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 4Rqm9f4Qcxz4v3x0 for ; Tue, 19 Sep 2023 15:41:42 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rqm9d6JyXz4lZQ for ; Tue, 19 Sep 2023 15:41:41 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Authentication-Results: mx1.freebsd.org; none Received: from critter.freebsd.dk (unknown [192.168.55.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by phk.freebsd.dk (Postfix) with ESMTPS id AA68E89293; Tue, 19 Sep 2023 15:41:33 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.17.1/8.16.1) with ESMTPS id 38JFfXE9073413 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 19 Sep 2023 15:41:33 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.17.1/8.16.1/Submit) id 38JFfXnb073412; Tue, 19 Sep 2023 15:41:33 GMT (envelope-from phk) Message-Id: <202309191541.38JFfXnb073412@critter.freebsd.dk> To: Sebastian Huber cc: hackers@freebsd.org Subject: Re: Remove timecounter tc_counter_mask member? In-reply-to: From: "Poul-Henning Kamp" References: <202309162044.38GKi7RZ022115@critter.freebsd.dk> List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <73410.1695138093.1@critter.freebsd.dk> Date: Tue, 19 Sep 2023 15:41:33 +0000 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:1835, ipnet:130.225.0.0/16, country:EU] X-Rspamd-Queue-Id: 4Rqm9d6JyXz4lZQ -------- Sebastian Huber writes: > On 16.09.23 22:44, Poul-Henning Kamp wrote: > > Sebastian Huber writes: > > > >> the timecounter structure contains a tc_counter_mask which enables > >> support for time counters implementing less than 32-bits: > >> Is the sys/x86/isa/clock.c still used? Are there chips on the market > >> with 24-bit ACPI timers? > > ... and are there any FreeBSD platforms using narrow timecounters > > outside the src-tree ? > > > > My personal gut feeling, is that we can get away with it, once i386 > > is out of the picture. > > If it is in principle acceptable to remove the tc_counter_mask at some > point in time, would it make sense to issue a warning if a timecounter > is installed with a mask not equal to 0xffffffff? It would be a good a way to warn people... -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From nobody Wed Sep 20 20:50:47 2023 X-Original-To: hackers@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 4RrW060gQPz4v97X for ; Wed, 20 Sep 2023 20:51:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (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 4RrW051PV7z4M36 for ; Wed, 20 Sep 2023 20:51:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20230601.gappssmtp.com header.s=20230601 header.b="Df7/wzFg"; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::32f) smtp.mailfrom=wlosh@bsdimp.com; dmarc=none Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-40528376459so2494235e9.3 for ; Wed, 20 Sep 2023 13:51:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1695243060; x=1695847860; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=K1HjDqIYnlN6YobV00f808dWUy0/HWmdNI2R3sOsB5w=; b=Df7/wzFgCrC7KHVg1Fx3wugLsuo5pRTjG5Qog7mr23PkT8eiw/L/RYUAR9Gf/Pdyaf uu+01U5Uhwpye+UKwQNOq1bA9Ze+c1sq8LUN+qhKA8Vly47by72NyqcI2Z1QhbqvQFKB 8CfsjFKCf7oFHOaRlmS56VgQZOkUffZmYvA/+vppjlMC4a8wP99J5AWKN/itDbe+vXBI KGUHfIOVOQ1W8U5bJGoYE3PRZDpPA/0VrfsdtoByqxvXK7E7KChpwDiDV0Ey6PPV4Nqd UegiKqTvbu4MqXnyc5FISG+VLBLeXUIk1YueF6ayz3cB3bDCwuNbGxRWseF4COKT6FsU /UlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695243060; x=1695847860; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=K1HjDqIYnlN6YobV00f808dWUy0/HWmdNI2R3sOsB5w=; b=VDMkCpv+Yz4o/K8RV0n/pwgmV8bI+jgTfybVW69duD/lRMFo41NbcZLxZbZ77eTThr uE4gQbi09r9bxmmnDawP5Op9RB99rtovX84qth/hU4LG5sEIQe0f0mjXd9o1cSaLjYrL tt5ojUMcFiILGWXUFjYZV4mKUM9tof9DDNIfzqVvT0uTJ9ElChwAtYcU86aUgcz3aYh4 3zs902buoiPaNDybSD5HBrQPxmaBtme/fS/CXOiB2bGRpobJMu3ynBK9Zg+0LmIjdBCg qqR9Gi736kt4NlS4kJdvvOh5a9BaEThLIrNy5uARZ3NXxPSLsW4C5RsqUFqITwDE1/h0 zlqw== X-Gm-Message-State: AOJu0YyMZhBkNaH6I/jBuxJ30xBiTNGTLwslzkrstQaW8ONvgT8RkJap r85DW7MrCv+DyFuZyqT16ntBPLFvXe/MOMOUIulqTA== X-Google-Smtp-Source: AGHT+IFe7iH3S7iSf4diNZMXy/FYDUcDtgeK+DwFMeysfFqFX0gtxGBP+vhb7sOTtCY78gvpg+HvIfvNuk+FrDD9pzI= X-Received: by 2002:a05:6000:141:b0:319:7bec:4f31 with SMTP id r1-20020a056000014100b003197bec4f31mr3192906wrx.10.1695243059778; Wed, 20 Sep 2023 13:50:59 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 References: <202309162044.38GKi7RZ022115@critter.freebsd.dk> <202309191541.38JFfXnb073412@critter.freebsd.dk> In-Reply-To: <202309191541.38JFfXnb073412@critter.freebsd.dk> From: Warner Losh Date: Wed, 20 Sep 2023 21:50:47 +0100 Message-ID: Subject: Re: Remove timecounter tc_counter_mask member? To: Poul-Henning Kamp Cc: Sebastian Huber , "freebsd-hackers@freebsd.org" Content-Type: multipart/alternative; boundary="00000000000062f64d0605d0881c" X-Spamd-Bar: - X-Spamd-Result: default: False [-2.00 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20230601.gappssmtp.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[hackers@freebsd.org]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::32f:from]; MIME_TRACE(0.00)[0:+,1:+,2:~]; BLOCKLISTDE_FAIL(0.00)[2a00:1450:4864:20::32f:server fail]; TO_DN_ALL(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+]; RCPT_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[bsdimp.com]; PREVIOUSLY_DELIVERED(0.00)[hackers@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com] X-Rspamd-Queue-Id: 4RrW051PV7z4M36 --00000000000062f64d0605d0881c Content-Type: text/plain; charset="UTF-8" On Tue, Sep 19, 2023, 11:41 AM Poul-Henning Kamp wrote: > -------- > Sebastian Huber writes: > > On 16.09.23 22:44, Poul-Henning Kamp wrote: > > > Sebastian Huber writes: > > > > > >> the timecounter structure contains a tc_counter_mask which enables > > >> support for time counters implementing less than 32-bits: > > >> Is the sys/x86/isa/clock.c still used? Are there chips on the market > > >> with 24-bit ACPI timers? > > > ... and are there any FreeBSD platforms using narrow timecounters > > > outside the src-tree ? > > > > > > My personal gut feeling, is that we can get away with it, once i386 > > > is out of the picture. > > > > If it is in principle acceptable to remove the tc_counter_mask at some > > point in time, would it make sense to issue a warning if a timecounter > > is installed with a mask not equal to 0xffffffff? > > It would be a good a way to warn people... > I'd warn on first use to cut down on the noise Warner -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. > > --00000000000062f64d0605d0881c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Sep 19, 2023, 11:41 AM Poul-Henning Kamp <<= a href=3D"mailto:phk@phk.freebsd.dk">phk@phk.freebsd.dk> wrote:
<= /div>
--------
Sebastian Huber writes:
> On 16.09.23 22:44, Poul-Henning Kamp wrote:
> > Sebastian Huber writes:
> >
> >> the timecounter structure contains a tc_counter_mask which en= ables
> >> support for time counters implementing less than 32-bits:
> >> Is the sys/x86/isa/clock.c still used? Are there chips on the= market
> >> with 24-bit ACPI timers?
> > ... and are there any FreeBSD platforms using narrow timecounters=
> > outside the src-tree ?
> >
> > My personal gut feeling, is that we can get away with it, once i3= 86
> > is out of the picture.
>
> If it is in principle acceptable to remove the tc_counter_mask at some=
> point in time, would it make sense to issue a warning if a timecounter=
> is installed with a mask not equal to 0xffffffff?

It would be a good a way to warn people...

I'd warn on first use to cut = down on the noise=C2=A0

= Warner

--
Poul-Henning Kamp=C2=A0 =C2=A0 =C2=A0 =C2=A0| UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| TCP/IP since RFC 956
FreeBSD committer=C2=A0 =C2=A0 =C2=A0 =C2=A0| BSD since 4.3-tahoe=C2=A0 =C2= =A0
Never attribute to malice what can adequately be explained by incompetence.=

--00000000000062f64d0605d0881c--