lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACAyw98VyM8a-h_8jtsNdF0KfK69-AxzRR4K28HVsyUecb0a5Q@mail.gmail.com>
Date:   Mon, 1 Jul 2019 10:34:25 +0100
From:   Lorenz Bauer <lmb@...udflare.com>
To:     Song Liu <songliubraving@...com>
Cc:     Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Kernel Team <Kernel-team@...com>, Jann Horn <jannh@...gle.com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf

On Fri, 28 Jun 2019 at 20:10, Song Liu <songliubraving@...com> wrote:
> There should be a master thread, no? Can we do that from the master thread at
> the beginning of the execution?

Unfortunately, no. The Go runtime has no such concept. This is all
that is defined about program start up:

  https://golang.org/ref/spec#Program_initialization_and_execution

Salient section:

  Package initialization—variable initialization and the invocation of init
  functions—happens in a single goroutine, sequentially, one package at
  a time. An init function may launch other goroutines, which can run
  concurrently with the initialization code. However, initialization always
  sequences the init functions: it will not invoke the next one until the
  previous one has returned.

This means that at the earliest possible moment for Go code to run,
the scheduler is already active with at least GOMAXPROCS threads.

-- 
Lorenz Bauer  |  Systems Engineer
6th Floor, County Hall/The Riverside Building, SE1 7PB, UK

www.cloudflare.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ