From patchwork Thu Apr 26 02:26:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 134399 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp1639446lji; Wed, 25 Apr 2018 19:27:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx49jB6G/QuvA1k0Y/htTpBUfa5+AbzrXbs9Lj5XeoSRXxLxn8sEwscV1DyHYrP0gvWtwItLU X-Received: by 2002:a17:902:9a0c:: with SMTP id v12-v6mr30890714plp.162.1524709636896; Wed, 25 Apr 2018 19:27:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524709636; cv=none; d=google.com; s=arc-20160816; b=spUUNqp+PTOFI1fcvPGFNWiQpjDAT/cmMdq3E0IjOvRHoNpFjjg4lstXpJd2tT1cx7 fxWyDZOKf5xn1aFp9Af/+FULwBfeC9IzOuTSu97G40GXZO9ksnOcuTGVdvB30Dk6Wixn 3kIjFkSH3nPgk2HBFmtcSlX321e/otBnj8ClQ9rpjD8hV609wn3Wu1WsxhKV93HX/9Bf jjwxDgKGPrpMak7At9BbA+uByHOkFTs2L5ZAXmHTMEeM5N6/2AbcZ/sv1qVuS3eXK2nu xq5UKNZLiw3I2+fHaSowOVQu8xhG5RlXRin9qKsgtOC2q3Eca5WKzDFfk/G6f0QkthOG Plzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=BGn9RurNL8JCQhf6cDNAQ8blDFcwJiAtHhzz92PlreM=; b=A3pUhXpHHkmFieeBEmBOWKkc+YwYjDEtpud40bbsOadYA80PKuN3BNo0/F1t7PoKC7 UCL0XmUHCZY8IW/PZDjCv0UJJNbCFFI5Zc9c4udv3c8XBkpKm2Oq3ZRmvPnnE7NvZA7L 7LIFolr3OfC/GEBdDPM9dkNaEKq5AOYzijdrODJwbzSdsfl0Q4Siuc2EkXtJI35I6gsO OprldPSGI3xiQPkTGQzaHLZLFpkyrI6ktF68QJEA0X3OBg6guyJX1LrFTBdBWT2k7JiG JtSmJ/4sWGZBme3iiSK33Rt2TdQ02IvKCePO8gebF5rcT9qORO9xlrsHUu/IYeiw6fmp mOZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VRp83QKW; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i2si9629031pgo.289.2018.04.25.19.27.16; Wed, 25 Apr 2018 19:27:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VRp83QKW; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752048AbeDZC1O (ORCPT + 9 others); Wed, 25 Apr 2018 22:27:14 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:39766 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751487AbeDZC1M (ORCPT ); Wed, 25 Apr 2018 22:27:12 -0400 Received: by mail-pg0-f68.google.com with SMTP id b9so14719870pgf.6 for ; Wed, 25 Apr 2018 19:27:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=BGn9RurNL8JCQhf6cDNAQ8blDFcwJiAtHhzz92PlreM=; b=VRp83QKWbQ8vgyFKl4i0ohQ5v3DG7+6wyPj7IWJgOCiUbNUgaSKrHxWrRjPeNMz8FY suTGtMxcpmvjgg4lBI8y5prgEHKk3sxuQLit0dcrpgZ5gnMh99F27gutyZkZ7myZeiCi HoY+L1C7eSHKAazsc4EMgJC1SyuDU+hpvf72c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BGn9RurNL8JCQhf6cDNAQ8blDFcwJiAtHhzz92PlreM=; b=FwxTYJoU4WsinYSr+xP0muDhUT7MACBjzBxxrGXdDTUgkB0htYxEl9F9PReoZGOZFk /4YiTlkGIbv7HlJg7fg1CpfxEG1Sd2tYVadrTC6un+UfWZt9DXRSbnyIKTXWYB0LvH7F gMPcIv5XecqcOD5MicWteJhhGsg151u2QckiCixScmtGTzh/pJPfbBRmE2dkw5ERK3Zz XzFWRneee7YpCtZ47AuK/R50i3el0nrr+WJOncEvvPQak26j/ESmR9yVHrlcToDKkeRQ 9Oma5yifx1Adk4JOkC93qO2h7Laka6vOa+yQPvrFwrLedbFp2Fq97T9SesJsW3rosPZs LUUw== X-Gm-Message-State: ALQs6tDCsbWMX0lDuxZPMeA6J2/piKyOIEyqEX42IQWsiMMtW7RqGQPw SSYCg4x3C79Mjo4u5s7AqiwMAli8rO0= X-Received: by 10.98.103.86 with SMTP id b83mr30273948pfc.76.1524709631529; Wed, 25 Apr 2018 19:27:11 -0700 (PDT) Received: from localhost.localdomain (li1168-94.members.linode.com. [45.79.69.94]) by smtp.gmail.com with ESMTPSA id w17sm38598161pfa.141.2018.04.25.19.27.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Apr 2018 19:27:10 -0700 (PDT) From: Leo Yan To: Alexei Starovoitov , Daniel Borkmann , "David S. Miller" , Jonathan Corbet , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: Leo Yan Subject: [PATCH bpf-next] bpf, doc: Update bpf_jit_enable limitation for CONFIG_BPF_JIT_ALWAYS_ON Date: Thu, 26 Apr 2018 10:26:51 +0800 Message-Id: <1524709611-29437-1-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When CONFIG_BPF_JIT_ALWAYS_ON is enabled, kernel has limitation for bpf_jit_enable, so it has fixed value 1 and we cannot set it to 2 for JIT opcode dumping; this patch is to update the doc for it. Signed-off-by: Leo Yan --- Documentation/networking/filter.txt | 6 ++++++ 1 file changed, 6 insertions(+) -- 1.9.1 diff --git a/Documentation/networking/filter.txt b/Documentation/networking/filter.txt index fd55c7d..feddab9 100644 --- a/Documentation/networking/filter.txt +++ b/Documentation/networking/filter.txt @@ -483,6 +483,12 @@ Example output from dmesg: [ 3389.935851] JIT code: 00000030: 00 e8 28 94 ff e0 83 f8 01 75 07 b8 ff ff 00 00 [ 3389.935852] JIT code: 00000040: eb 02 31 c0 c9 c3 +When CONFIG_BPF_JIT_ALWAYS_ON is enabled, bpf_jit_enable is set to 1 by default +and it returns failure if change to any other value from proc node; this is +for security consideration to avoid leaking info to unprivileged users. In this +case, we can't directly dump JIT opcode image from kernel log, alternatively we +need to use bpf tool for the dumping. + In the kernel source tree under tools/bpf/, there's bpf_jit_disasm for generating disassembly out of the kernel log's hexdump: