From nobody Tue Sep 10 13:09:15 2024 X-Original-To: freebsd-net@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 4X33v465Hpz5WTtq; Tue, 10 Sep 2024 13:09:20 +0000 (UTC) (envelope-from vadimnuclight@gmail.com) Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X33v44LG2z4Dl6; Tue, 10 Sep 2024 13:09:20 +0000 (UTC) (envelope-from vadimnuclight@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-5365cc68efaso3536809e87.1; Tue, 10 Sep 2024 06:09:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725973759; x=1726578559; darn=freebsd.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=RkKU7OzzhXolcRcGkGudy213qu3KY/KqHoqUnGVQTPQ=; b=TjIKSiuTIbl6+zsrcY5WHuTne3sayhEsaq05ctDTCdwWOYxKF6lAy0HYjJjFX2tnpK NOluUSyHTxtCEGgxuaf9rIuaUSlkgaRmV7KHAVuYiziMa3eO8Gb4SDPAu2S55CTrF0kH uKVqfwSuHVNzK8Q99JfhPa7dao4cMpzcj2J6lCITJ3h4u7TDASUsyeDmZUDF7tghluZr B0IICSZd0FeYH5ECePlPRK4dMpuCA/AT7nHOzXsBUVryealF17IlnaJK+XmHxCice0aQ RUK+5BjVLR0WDYerZMLnj0d4vjb1ojcfEdL38KFldCgyVHzh7l0JmafqYGCkFvFFmrJL wx4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725973759; x=1726578559; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RkKU7OzzhXolcRcGkGudy213qu3KY/KqHoqUnGVQTPQ=; b=R8jy9qfeNQDxpDKAx52YW0XlvljEN4VblyOX3P32nv2sHS8j2gClezwdpryv3L6y5I KZuBH2vniCjn0R5c6ZO9fRwVJAJyhogJxwE0KnjK3u9UNmDeuU8y2pFoBjmLOuJ/e2G6 Lz82S4Mba9TgMRweggBOGN6lZu4hQrjxm3MdUTyQkJG/XqypOsdqKDddBAZyiZiwk3mj XN8XysnFkwPTd/DUAByG1KcNUvm+EYUYxEEHdhqhcNzvud8FPm8iNUm7zzT5mbnjsYtC HKhT4fdtuZwjPN0ML98Id9m+9l1IhL0KytgeJcH2QA9ZSJOl5QfaePFnTjwsqS86joGy b/7g== X-Forwarded-Encrypted: i=1; AJvYcCVezgU/L3uEP2R0J3jz+xMcVCeVg0GWQv1GO6nTm2h5lc7SUMB0cP7DGQK8Oh6A9Z/1glVwcGPCf4reNUmcszQ=@freebsd.org, AJvYcCXrCqD/Cda2K/UO+KmO4HKjVu/0UM0o93RVDlvwND7ww9aoYsIxZwVRemcJYkC3SdISd6uWfvwWb3qnv0Q=@freebsd.org X-Gm-Message-State: AOJu0YzhHOXgk5vkBqIvh3Jq8jKMhIe5mozxg4Im/YoL6dgLtC8kEM05 3bF+6KL3zMyxsV1Nl9MycWzFMJT/YNC2j5gVib4AENlNxKRiydzE X-Google-Smtp-Source: AGHT+IHCZSlqVTBTlUDxjG0SinNhtLNa+Ng/lDo/GxAOb0zVvoslx8qbRLU0qLFsfO+55WpvVTXp2Q== X-Received: by 2002:a05:6512:15a7:b0:535:6992:f2c3 with SMTP id 2adb3069b0e04-536587f5ce0mr10817602e87.41.1725973758289; Tue, 10 Sep 2024 06:09:18 -0700 (PDT) Received: from nuclight.lan ([37.204.254.214]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5365f90c306sm1153853e87.245.2024.09.10.06.09.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 06:09:18 -0700 (PDT) Date: Tue, 10 Sep 2024 16:09:15 +0300 From: Vadim Goncharov To: "Poul-Henning Kamp" Cc: freebsd-arch@FreeBSD.org, freebsd-hackers@FreeBSD.org, freebsd-net@FreeBSD.org, tech-net@NetBSD.org, Alexander Nasonov Subject: Re: BPF64: proposal of platform-independent hardware-friendly backwards-compatible eBPF alternative Message-ID: <20240910160915.55ff579b@nuclight.lan> In-Reply-To: <202409101224.48ACO7oj094058@critter.freebsd.dk> References: <20240910040544.125245ad@nuclight.lan> <202409100638.48A6cor2090591@critter.freebsd.dk> <20240910144557.4d95052a@nuclight.lan> <202409101224.48ACO7oj094058@critter.freebsd.dk> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; amd64-portbld-freebsd12.4) List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4X33v44LG2z4Dl6 On Tue, 10 Sep 2024 12:24:07 +0000 "Poul-Henning Kamp" wrote: > -------- > Vadim Goncharov writes: >=20 > > It's easy for your Lua code (or whatever) code to hang kernel by > > infinite loop. Or crash it by access on arbitrary pointer. =20 >=20 > Lua has pointers now ? It's implementation has. Do you have mathematical verifier of such loaded bytecode proving it's C interpreter will have no side effects during it's running? > > Your "counter proposal" was essentially available for all these > > decades in form "oh, just write KLD in C instead of that limited > > tcpdump". =20 >=20 > You're yelling at the guy who implemented a (very fast!) firewall > where the rules were compiled to C code in a KLD. That's exactly the way which must be avoided. See 5.2 of https://www.usenix.org/legacy/events/bsdcon02/full_papers/lidl/lidl.pdf > > > If we are going to reinvent "Channel Programs" 67 years after IBM > > > came up with them for their 709 vacuum tube computer, at the very > > > least we should use a sensible language syntax. =20 > > > > Don't know what that is, quick googling [=E2=80=A6] =20 >=20 > Well, you probably should do some more research then, because > unawareness of history is /the/ major cause of pointlessly repeating > mistakes. You're either trolling or completely misunderstand the problem domain.=20 <> (c) https://www.ece.ucdavis.edu/~vojin/CLASSES/EEC272/S2005/Papers/IBM-A= rchitecture-Bashe_sep81.pdf This has nothing to do with BPF at all. Go and read original papers on kernel filters and why they're *such* restricted, e.g. Van Jacobson's paper on BPF/tcpdump, aforementitioned paper on BSD/OS's IPFW (esp. section 5.7 on loops), etc. --=20 WBR, @nuclight