並び順

ブックマーク数

期間指定

  • から
  • まで

81 - 120 件 / 123件

新着順 人気順

bpfの検索結果81 - 120 件 / 123件

  • TIL: eBPF is awesome

    A blog about programming, technology and open-source stuff. I was doing some research at work for tracing and observability for microservices, when I came across Pixielabs. This tool advertises that you can instantly troubleshoot applications without any instrumentation or special code inside the apps, which sounded ✨magical✨ to me. So naturally I wanted to know a little more about what enables th

    • BPF In Depth: Communicating with Userspace

      Notes on BPF (3) - How BPF communicates with userspace - BPF maps, perf events, bpf_trace_printk Oracle Linux kernel developer Alan Maguire presents this six-part series on BPF, wherein he presents an in depth look at the kernel's "Berkeley Packet Filter" -- a useful and extensible kernel function for much more than packet filtering. We've seen how userspace sets up BPF programs, but once a progra

      • BPF at Facebook (and beyond) [LWN.net]

        LWN.net needs you!Without subscribers, LWN would simply not exist. Please consider signing up for a subscription and helping to keep LWN publishing It is no secret that much of the work on the in-kernel BPF virtual machine and associated user-space support code is being done at Facebook. But less is known about how Facebook is actually using BPF. At Kernel Recipes 2019, BPF developer Alexei Starov

        • How To Add eBPF Observability To Your Product

          This is based on my bcc Tutorial, and many also exist in bpftrace. I chose these to find the most performance wins with the fewest tools. Note that runqlat and profile can have noticable overheads, so I'd run these tools for between 10 and 60 seconds only and generate a report. Some are low enough overhead to be run 24x7 if desired (e.g., execsnoop, biolatency, tcplife, tcpretrans). There is alrea

          • eBPFプログラムの実行方法を調べる - Hash λ Bye

            はじめに eBPFがLinuxカーネル内で実行されるプログラムの仕組みであることは知っている。 けれどそれ以上の情報をよく知らないので実際に動かしてみて解った振りをしたい。 いろいろeBPFプログラムを書いて試したいので実行方法をまずは確認することにした。 その前に eBPFプログラムの実行方法に関するサンプルは既にLinuxカーネルのリポジトリに大量に提供されている。 Linux 5.7.7 の samples/bpf なのでC言語で遊びたい人はそこを読んで、manでリファレンス引けば特に苦労せずにeBPFプログラムを実行することができるはず。 つまりここから先は読む必要ないので読まなくても良いと思う。 問題: eBPFプログラムを実行する小さいプログラムが欲しい eBPFプログラムを実行するにはどうすればよいのだろうか。 といってもHello Worldを印字するプログラムを作って実行

              eBPFプログラムの実行方法を調べる - Hash λ Bye
            • A Deep Dive into eBPF: The Technology that Powers Tracee

              Gain total lifecycle visibility, reduce risks and stop attacks with the most comprehensive, fully integrated Cloud Native Application Protection Platform (CNAPP)

                A Deep Dive into eBPF: The Technology that Powers Tracee
              • Kinvolk: Inside Kinvolk Labs: Investigating Kubernetes performance issues with BPF

                Inside Kinvolk Labs: Investigating Kubernetes performance issues with BPF By Alban Crequy · April 24, 2020 One of the things we do in the Kinvolk Labs team is provide expert technical consulting for customers who are experiencing issues with their Kubernetes or Linux environments — from security audits to networking troubles to troubleshooting puzzling performance problems. A few weeks back, video

                  Kinvolk: Inside Kinvolk Labs: Investigating Kubernetes performance issues with BPF
                • cgroup v2の、BPFによるデバイスアクセス制御を試す - ローファイ日記

                  RubyKaigiも近付いたしeBPFの機運を高めようとしている。 タイトルですが、そういうことができます。 www.kernel.org このドキュメントにも「どうすればできる」と言うところが書いておらず、最終的にカーネルのサンプルを眺めることになる。 elixir.bootlin.com elixir.bootlin.com 下準備 まず、cgroup v2が有効なカーネルを使う必要がある。いったん。Ubuntu Groovy(5.8.0-53-generic)を使う。 その上で、cgroup v1のdevicesコントローラを一応umountしておいいた。必要なのかはわからないが...。 $ sudo umount -l /sys/fs/cgroup/devices その上で cgroup v2のグループを作成。 $ sudo mkdir /sys/fs/cgroup/unified

                    cgroup v2の、BPFによるデバイスアクセス制御を試す - ローファイ日記
                  • BPF Theremin, Tetris, and Typewriters

                    For my AWS re:Invent talk on BPF Performance Analysis at Netflix, I began with a demo of "BPF superpowers" (aka eBPF). The video is on youtube and the demo starts at 0:50 (the slides are here or as a PDF): I'm demonstrating a tool I developed to turn my laptop's wifi signal strength into audio (someone described this as a BPF theremin.) I first developed it as this bpftrace one-liner: bpftrace -e

                    • yuuk1/logbook

                      yuuk1の研究開発日誌

                        yuuk1/logbook
                      • BPF CO-RE バイナリはどのようにビルドされるか - ローファイ日記

                        そろそろBPFのことを思い出そうと思って記事を書く。 シリーズです: udzura.hatenablog.jp udzura.hatenablog.jp 前回まででRustでのBPF CO-REバイナリの作成方法をまとめたが、C言語などで使う場合の細かい手順を追ってみる。 ちゃんとドキュメントを追い切れていないところがあり、今回は、iovisor/bccのlibbpf-toolsにあるMakefileなどを参照したことは了解願いたい。 github.com さて、利用するBPFプログラムは以下のようにする。 vfs_read をトレースして、読み込みに成功いたバイト数を、log2をbinとするヒストグラムにする。 #include "vmlinux.h" #include <bpf/bpf_helpers.h> #include <bpf/bpf_tracing.h> #include <

                          BPF CO-RE バイナリはどのようにビルドされるか - ローファイ日記
                        • tc/BPF and XDP/BPF

                          What is eBPFReference: bpf The extended Berkeley Packet Filter (eBPF) has first appeared in Kernel 3.18. The original version is being referred to “classic” BPF (cBPF) . cBPF is known to many as being the packet filter language used by tcpdump. Nowadays, the Linux kernel runs eBPF only and loaded cBPF bytecode is transparently translated into an eBPF representation in the kernel before program exe

                          • クラウドネイティブ開発の文脈で人気の「eBPF」調査レポートを公開 Meta、Google、Netflixが活用

                            eBPF FoundationとLinux Foundation Researchは、2024年1月30日(米国時間)、「The State of eBPF」を発表した。このレポートは、「eBPF」(extended BPF)の現状、eBPFのユースケースや今後などについて紹介している。内容は以下の通り。 eBPFの現状 Linuxカーネルは、ソフトウェアとハードウェアのインタフェースとして機能し、アプリケーションのさまざまなタスクを処理する。カーネルは約3000万行のコードを有し、重要な役割を果たすが、変更に時間がかかる。これを解決するのがeBPFだ。eBPFはLinuxカーネル内の仮想マシンで、開発者が小さな専門化されたプログラムを記述できるようにする。これらのプログラムは安全性を確保するために検証を経て、JIT(Just-In-Time)コンパイルされ、ファイルのオープニングなどのイ

                              クラウドネイティブ開発の文脈で人気の「eBPF」調査レポートを公開 Meta、Google、Netflixが活用
                            • sandbox/linux/seccomp-bpf/sandbox_bpf.cc - chromium/src - Git at Google

                              // Use of this source code is governed by a BSD-style license that can be

                              • Liz Rice on Programming the Linux Kernel with eBPF, Cilium and Service Meshes

                                Transcript Introductions [00:36] Charles Humble: Hello and welcome to the The InfoQ Podcast, I'm Charles Humble, one of the co-hosts of the show, and editor-in-chief of Cloud Native consultancy firm Container Solutions. My guest this week is Liz Rice. Liz is Chief Opensource Officer with cloud native networking and security specialists Isovalent, creators of the Cilium eBPF based networking projec

                                  Liz Rice on Programming the Linux Kernel with eBPF, Cilium and Service Meshes
                                • [Rust] AyaでeBPFプログラムをつくってみる | DevelopersIO

                                  Introduction eBPFは、Linuxカーネル対して動的に機能を拡張する技術で、 カーネルで独自のプログラムを安全に実行することができます。 これらのプログラムは任意のポイントに設定可能で、さまざまなタイミングで 実行できます。 eBPFは、カーネル再構築なしでカーネルの動作をカスタマイズすることができるため、 近年いろいろな用途に使われています。 今回はBCC/bpftoolで少しeBPFを使ってみた後、 Aya(eBPF用Rustフレームワーク)を使ってXDPのサンプルをつくってみます。 eBPF? eBPFはExtended Berkeley Packet Filterの略で、 もともとはLinuxでデータパケットを効率的にフィルタリングするために 開発された技術ですが、現在はその機能が拡張されて、 カーネルのコード変更やモジュール追加なしで 独自のプログラムをカーネルで実

                                    [Rust] AyaでeBPFプログラムをつくってみる | DevelopersIO
                                  • GKE上で動くPodでeBPFを使ってみる - CubicLouve

                                    GKEのバージョン 1.16.13-gke.1 Node Container-Optimized OS from Google コンテナのOS OSは下記を使うのでちょっと特殊 https://console.cloud.google.com/gcr/images/gcp-runtimes/GLOBAL/ubuntu_18_0_4?gcrImageListsize=30 # cat /etc/os-release NAME="Ubuntu" VERSION="18.04.4 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.4 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.u

                                      GKE上で動くPodでeBPFを使ってみる - CubicLouve
                                    • eBPF: BPF_MAP_TYPE_SK_STORAGE が Invalid argument - Unyablog.

                                      Linux の eBPF で BPF_MAP_TYPE_SK_STORAGE を使おうとして、map を定義して bpftool で流し込んだけど Invalid argument でうまく動かなかった。調べてもヒットしなくて長時間費やしたのでメモ。 環境は ArchLinux で Kernel release は 5.7.10-arch1-1。 TL;DR BTF に対応する必要がある。 詳細 struct bpf_map_def SEC("maps") sk_storage_map = { .type = BPF_MAP_TYPE_SK_STORAGE, .map_flags = BPF_F_NO_PREALLOC, .key_size = sizeof(int), .value_size = sizeof(int), }; このような map を作って、それを使ったプログラムを lo

                                        eBPF: BPF_MAP_TYPE_SK_STORAGE が Invalid argument - Unyablog.
                                      • Linux Observability with BPF 1人輪読会(3) - /dev/blog

                                        前回 tsunomur.hateblo.jp Chapter 1: introduction 問題定義 ログとメトリック 昨今の複雑なコンピューターシステムを可視化するためには、アプリケーションのログを分析することが重要。 ログは、アプリケーションの正確な動作を確認することが出来る。 しかし、ログは、アプリケーション開発者にしか出力させることが出来ず、開発者以外が調査するときの制約になる。 あらゆるアプリケーションのログを取るということは、アプリケーションのリバースエンジニアリング等と同様のチャレンジが必要になってくる。 ログ以外にも、メトリックを取得する方法がある。しかし、メトリックは、特定の一時点のアプリケーションの動作を測定するためのデータである。 Observability - 可観測性 Observability はこの問題を別の角度からアプローチする創発的なプラクティスである

                                          Linux Observability with BPF 1人輪読会(3) - /dev/blog
                                        • BPFによるパケットトレース――C言語によるBPFプログラムの作り方、使い方

                                          BPFによるパケットトレース――C言語によるBPFプログラムの作り方、使い方:Berkeley Packet Filter(BPF)入門(5)(1/2 ページ) Linuxにおける利用が急速に増えている「Berkeley Packet Filter(BPF)」について、基礎から応用まで幅広く紹介する連載。今回は、最も基本となるC言語によるBPFプログラム作成方法および使用方法について。 Linuxにおける利用が急速に増えている「Berkeley Packet Filter(BPF)」について、基礎から応用まで幅広く紹介する連載「Berkeley Packet Filter(BPF)入門」。前々回までは、BPFの基本やBPFのプログラムの作成方法を説明しました。前回から、「LinuxのBPFで何ができるのか」について詳しく見ています。 今回からさまざまなBPFプログラムを作成してBPFの使い

                                            BPFによるパケットトレース――C言語によるBPFプログラムの作り方、使い方
                                          • 今「eBPFを使ったカーネルの拡張」が熱い! eBPFで“カーネルを拡張できるおもちゃ”を作ってみた話

                                            Kernel/VM探検隊は、カーネルやVM、およびその他なんでもIT技術の話題ジャンルについて誰でも何でも発表してワイワイ盛り上がろうという会です。西村啓佑氏は、eBPFを使ったカーネル拡張の開発について発表しました。 eBPFの概要 西村啓佑氏:あらためまして、mumumuです。「eBPFを使ったオレオレカーネル拡張入門」というタイトルで発表を始めます。今日の発表の目次は(スライドを示して)こんな感じです。 まず、eBPF(extended Berkeley Packet Filter)がけっこう背景になってくるのですが、概要としては、カーネルの中で動いているVM。Kernel/VMの両方を回収できるすごいやつなんですね。こいつは実行前にバイトコードを検証するので、安全に実行できるというのが売りです。基本的には、イベントトリガーで動作するプログラムになっていて、それぞれのイベントに対応す

                                              今「eBPFを使ったカーネルの拡張」が熱い! eBPFで“カーネルを拡張できるおもちゃ”を作ってみた話
                                            • 【記事移転いたしました】eBPFでお手軽?ファジング|ラック・セキュリティごった煮ブログ編集部

                                              セキュリティエンジニアがエンジニアの方に向けて、 セキュリティやIT技術に関する情報を発信していくアカウントです。

                                                【記事移転いたしました】eBPFでお手軽?ファジング|ラック・セキュリティごった煮ブログ編集部
                                              • eBPF assembly with LLVM

                                                From C to Object File Down to the Instructions eBPF Step by Step with LLVM Compiling from C to eBPF Assembly Assembling to an ELF Object File A Human-Friendly Output with llvm-objdump Inline Assembly Conclusion This post was left aside as a draft for a long time. Most of it was written in December 2017. I publish it with the hope it can still be helpful today, even though the Cilium guide also cov

                                                  eBPF assembly with LLVM
                                                • BPF、eBPF、XDPそしてBpfilter...

                                                  Netronomeより。 By Nic Viljoen あなたは3.15以降、カーネルコミュニティで拡張Berkeley Packet Filter(eBPF)の開発をフォローしているかも知れません。あるいは、1992年にバン・ジェイコブソンが行った仕事とBerkeley Packet Filterを関連付けるかも知れません。あなたは、tcpdumpを何年も使っているかも知れない、あるいは既にデータプレーンでそれを詳細に調べ始めているかも知れません! このブログでは、パフォーマンス・ネットワーキングの観点からの重要な開発、そして大規模なデータセンター・オペレータが始まって以来、関連がある同じ方法で、ネットワーク・オペレータ、システム管理者、エンタープライズ・ソリューション・プロバイダにとって重要になっている理由を非常に高いレベルで説明することを目的としています。 BPF or eBPF—違

                                                    BPF、eBPF、XDPそしてBpfilter...
                                                  • USENIX LISA2021 BPF Internals (eBPF)

                                                    Recent posts: 24 Mar 2024 » Linux Crisis Tools 17 Mar 2024 » The Return of the Frame Pointers 10 Mar 2024 » eBPF Documentary 28 Apr 2023 » eBPF Observability Tools Are Not Security Tools 01 Mar 2023 » USENIX SREcon APAC 2022: Computing Performance: What's on the Horizon 17 Feb 2023 » USENIX SREcon APAC 2023: CFP 02 May 2022 » Brendan@Intel.com 15 Apr 2022 » Netflix End of Series 1 09 Apr 2022 » Te

                                                    • A thorough introduction to eBPF [LWN.net]

                                                      Benefits for LWN subscribersThe primary benefit from subscribing to LWN is helping to keep us publishing, but, beyond that, subscribers get immediate access to all site content and access to a number of extra site features. Please sign up today! In his linux.conf.au 2017 talk [YouTube] on the eBPF in-kernel virtual machine, Brendan Gregg proclaimed that "super powers have finally come to Linux". G

                                                      • データセンター向けTCPとeBPF実装|oraccha

                                                        最近のLinuxではeBPFで輻輳制御アルゴリズムを実装し、カーネル内で実行できる。今日はDCTCP実装を眺めてみたいと思う。その前にオリジナルのDCTCPについて確認する。マージされたのはバージョン3.17の頃。 commit e3118e8359bb7c59555aca60c725106e6d78c5ce Author: Daniel Borkmann <daniel@iogearbox.net> Date: Fri Sep 26 22:37:36 2014 +0200 net: tcp: add DCTCP congestion control algorithmDCTCPはRFCにもなっているけど、オリジナルは2010年にMSRとスタンフォード大のチームによって提案された(Data Center TCP (DCTCP) [SIGCOMM2010])。一般的な輻輳制御アルゴリズムでは

                                                          データセンター向けTCPとeBPF実装|oraccha
                                                        • Detecting Kernel Hooking using eBPF

                                                          tl;dr I demonstrate an example project that uses eBPF and stack traces to detect syscall-hooking kernel rootkits. Maybe? Rootkits and hooking A common technique of Linux kernel rootkits is to overwrite the function addresses in the syscall table. Syscalls are the main way usermode programs interact with the kernel and underlying hardware, so by altering (or ‘hooking’) the syscall table, rootkits c

                                                          • RubyKaigi takeoutでRuby to BPF compilerの話をした話 - ローファイ日記

                                                            Rubyアドベントカレンダー(カレンダー2)の2日目です。 qiita.com 今見たらカレンダー2も半分以上埋まってて嬉しい... Ruby is alive now!!! ということで、RubyKaigi takeout 2021の振り返りも兼ねて作ったものの話です。 rubykaigi.org Rucy: A Ruby Compiler github.com RucyはRubyのスクリプトをコンパイルして直接特定のフォーマットのバイナリを吐き出すツールです。今のところBPFのバイナリにのみ対応しています。 ちなみに "Ru"by "C"ompiler -> RuC -> Rucy という経緯で、Rucyという綴りがそれなりにRubyと空目する点含めて(?) 気に入った名付けです。 Rucyについて把握する前にBPFの説明からしないといけないのですが、要するにLinuxの機能の一つで、

                                                              RubyKaigi takeoutでRuby to BPF compilerの話をした話 - ローファイ日記
                                                            • GDBがeBPFのデバッグをサポートした

                                                              GDBがeBPFのデバッグをサポートした。 GNU Debugger Adding eBPF Debugging Support - Phoronix eBPFというのはLinuxカーネル内の仮想マシンだ。 もともと、BPF(Barkley Packet Filter)という仮想マシンがあった。これはネットワークのパケットフィルタリングをするための仮想マシンで、レジスターベースのRISCプロセッサーを模した命令セットになっている。 カーネル内で安全にユーザーコードを実行するというのは需要があるので、BPFをより汎用的に使いたいという声は多かったのだが、何分BPFは設計が古い。レジスタは2個で32bit、命令セットはatomic compare exchangeのようなモダンなプロセッサーに搭載されている命令がない。 そのためeBPF(extended BPF)が設計された。レジスタは10個

                                                              • The BPF extensible scheduler class [LWN.net]

                                                                It was only a matter of time before somebody found a way to inject BPF into the CPU scheduler. This patch series, posted by Tejun Heo and containing work by David Vernet, Josh Don, and Barret Rhoden, does exactly that. The cover letter covers the motivation behind this work in detail: One of our main goals was to lower the barrier to entry for experimenting with the scheduler. sched_ext provides e

                                                                • The Evolving eBPF Toolchain

                                                                  These days there is an ever-growing list of tools and frameworks for working with eBPF, all at varying levels of abstraction. There does seem to be a few that sit at the core of the rest of the eBPF ecosystem. However, the ecosystem is changing rapidly, and I’ve found it to be a bit difficult to navigate through the sea of information that’s out there and understand which tools are the current “st

                                                                    The Evolving eBPF Toolchain
                                                                  • Routing traffic in Rust using eBPF

                                                                    At InfinyOn we are seeing an increasing amount of traffic in Infinyon Cloud. Given our current projections we anticipate over 1 million edges to connect our platform in the next 12-18 months. One of bottlenecks is the compute resources needed to process ingress traffic. We have a couple of places in our cloud offering where we needed to intercept TCP network traffic, perform some analysis on the f

                                                                      Routing traffic in Rust using eBPF
                                                                    • BPF Isn’t Just About Speed

                                                                      In a recent blog post, Alban Crequy and Mauricio Vásquez benchmarked egress filtering solutions in the Linux kernel and compared iptables, ipsets, and BPF at the tc hook. That is exciting, not only because egress benchmarks are missing with everyone focusing on ingress (e.g., XDP), but also because they: included short CPU traces, allowing us to understand what is happening. provided the code and

                                                                        BPF Isn’t Just About Speed
                                                                      • BPF and async Rust

                                                                        With libbpf-rs, bindings to libbpf (canonical C BPF library), building BPF applications in Rust is easy. However, libbpf-rs doesn't work with async/await. Say, to send information from kernel with BPF over protocols like gRPC, you have to implement lots instead of using the existing async libraries. To address the above problem, I implemented libbpf-async, complementary to libbpf-rs, providing API

                                                                          BPF and async Rust
                                                                        • eBPF Documentary

                                                                          Recent posts: 17 Mar 2024 » The Return of the Frame Pointers 10 Mar 2024 » eBPF Documentary 28 Apr 2023 » eBPF Observability Tools Are Not Security Tools 01 Mar 2023 » USENIX SREcon APAC 2022: Computing Performance: What's on the Horizon 17 Feb 2023 » USENIX SREcon APAC 2023: CFP 02 May 2022 » Brendan@Intel.com 15 Apr 2022 » Netflix End of Series 1 09 Apr 2022 » TensorFlow Library Performance 19 M

                                                                          • TIL: eBPFは素晴らしい

                                                                            Filip Nikolovskiのブログより。 仕事でマイクロ・サービスのトレースや可観測性(Observability)について仕事で調べていた時に、Pixielabsに出くわしました。このツールは、アプリの内部にインスツルメンテーション(計器一式)や特別なコードを入れなくても、アプリのトラブルシューティングを即座に行えると宣伝していて、私には✨魔法✨のように聞こえました。だから当然、この技術が機能する理由について、もう少し詳しく知りたいと思い、サイトをスクロールしていくと、「インスツルメンテーションなし」のセクションの下に、この頭文字をとったeBPFがありました。 インターネットでさらに調べて、デザインペーパーを読んで、いくつかのビデオを見た後、この技術が私の目に留まったと言っても過言ではないので、メモを書きたいと思いました。この投稿があなたの興味をさらに刺激することを願っています。

                                                                              TIL: eBPFは素晴らしい
                                                                            • eBPFって何だろう|oraccha

                                                                              eBPFには前々から興味があったので、ちょっと調べてみた。資料はいろいろある。日本語だと(会員登録が必要なので最後まで読めないが)「Berkeley Packet Filter入門」が詳しい。英語でよければ「BPF: Linux kernel code execution engine」とか。 eBPF以前オリジナルのBPF (Berkeley Packet Filter)が登場したのは90年代初頭で、tcpdumpに組み込まれているので知らずにお世話になっている人も多いかと。論文(「The BSD Packet Filter: A New Architecture for User-level Packet Capture」[USENIX93])が出版されたのが1993年で、著者の一人はEDTモデルでも言及したVan Jacobson先生。 tcpdumpやwiresharkのようなツー

                                                                                eBPFって何だろう|oraccha
                                                                              • BPF to transform SSH Sessions to Structured Event

                                                                                The Teleport Access PlatformThe easiest, most secure way to access and protect your infrastructure Teleport Access On-demand, least privileged access, on a foundation of cryptographic identity and zero trust

                                                                                  BPF to transform SSH Sessions to Structured Event
                                                                                • Let's build a simple system calls monitoring dashboard using bpftrace and streamlit

                                                                                  % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 49.67 0.000301 301 1 execve 14.69 0.000089 11 8 mmap 6.44 0.000039 13 3 openat 4.46 0.000027 9 3 mprotect 4.46 0.000027 6 4 newfstatat 3.47 0.000021 5 4 pread64 3.14 0.000019 19 1 munmap 2.81 0.000017 8 2 close 2.64 0.000016 5 3 brk 2.15 0.000013 6 2 read 2.15 0.000013 13 1 1 access 1

                                                                                    Let's build a simple system calls monitoring dashboard using bpftrace and streamlit