From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA3C9C433B4 for ; Mon, 17 May 2021 03:36:22 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4DB93611EE for ; Mon, 17 May 2021 03:36:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4DB93611EE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Fk4YK0rv3z3bxD for ; Mon, 17 May 2021 13:36:21 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=J7lw4EVm; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::102d; helo=mail-pj1-x102d.google.com; envelope-from=jniethe5@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=J7lw4EVm; dkim-atps=neutral Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) (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 lists.ozlabs.org (Postfix) with ESMTPS id 4Fk4VT1lz0z308p for ; Mon, 17 May 2021 13:33:52 +1000 (AEST) Received: by mail-pj1-x102d.google.com with SMTP id t11so2917353pjm.0 for ; Sun, 16 May 2021 20:33:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zwESIBZpnR2m975fHalvCep9CeFwEanqy1akHv4NJIU=; b=J7lw4EVm7AC9ahoMtQkOYSo+707+XcWiq+0qwiknJ80mnPZ9BPBl+OUU2RLD8eB30g uztA2WI6cohxJzasaRlkZB7/0X+GKFjWgT69BYDIX/OJj4n4CQBZyAMRS5TL/Ux+Cw2i IxYNotxJU3DsFbVcCXdvUem1nic7vU05yZPusKZUMpurd7j0D+7IEvSiI8JH9neoccsY 2v7Dt1EZQ5TF1fNGmUxkV2fflV9J7W9MCwzVkcspUF1ozzBLUNRgtdkLpPxK1MCO3EPw t64SqR+/gGl3mImvDifkazfyfZYAj0lwMeLRTU6+o4nUWUgRyuBmNLnsU3vsG73InQpr 5SxA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=zwESIBZpnR2m975fHalvCep9CeFwEanqy1akHv4NJIU=; b=hytVV6lJvK2USuUWq7nHwGwFmhBwhnQJouggh7sAMU7ToxKsWBWaB5/ztrlClL+oC2 hMsBxBvfr3A+YlbTPy24rJcv/LoS4MjaDDyx7GB6uLyzx1JoZpCcjVrUkpCzwVayi0vL gqOPFvA0jz+7+wloh987a6XKFiwOo/0DtkTsvwss4XlDlboeBcnjC4tgpHkqsReBmMkt QTIdZVGNGPA+mxHWVIWjIPEu+gfoJEiJOS992qFr/EaWMWuKJkcYI+gTV9mRYgOLsRvl pScX2LZJQIyUWZGZrOCspRcRX7ouHGVaXtI/HI1i0yLBNbzk5dyiZehoo6wmipefm60y LWzQ== X-Gm-Message-State: AOAM533h2tSQQxnl6nsPj/Fw0ktMdDhqbvmxJ3T86wedxbWMWAPFlTB7 XAo0q5q1NyDpKofQFDFPftMSBa7IJMI= X-Google-Smtp-Source: ABdhPJwviFL6uWapgv6dPFvplwxHbjylI/ubSTRklJ/d7X//zJ+LJEW3Mu6tCdN+iVdE6UuTakchnw== X-Received: by 2002:a17:90a:1782:: with SMTP id q2mr65065666pja.73.1621222431024; Sun, 16 May 2021 20:33:51 -0700 (PDT) Received: from tee480.ibm.com (159-196-117-139.9fc475.syd.nbn.aussiebb.net. [159.196.117.139]) by smtp.gmail.com with ESMTPSA id s3sm9785418pgs.62.2021.05.16.20.33.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 May 2021 20:33:50 -0700 (PDT) From: Jordan Niethe To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH v14 5/9] powerpc/bpf: Remove bpf_jit_free() Date: Mon, 17 May 2021 13:28:06 +1000 Message-Id: <20210517032810.129949-6-jniethe5@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210517032810.129949-1-jniethe5@gmail.com> References: <20210517032810.129949-1-jniethe5@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ajd@linux.ibm.com, cmr@codefail.de, npiggin@gmail.com, aneesh.kumar@linux.ibm.com, naveen.n.rao@linux.ibm.com, Jordan Niethe , dja@axtens.net Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Commit 74451e66d516 ("bpf: make jited programs visible in traces") added a default bpf_jit_free() implementation. Powerpc did not use the default bpf_jit_free() as powerpc did not set the images read-only. The default bpf_jit_free() called bpf_jit_binary_unlock_ro() is why it could not be used for powerpc. Commit d53d2f78cead ("bpf: Use vmalloc special flag") moved keeping track of read-only memory to vmalloc. This included removing bpf_jit_binary_unlock_ro(). Therefore there is no reason powerpc needs its own bpf_jit_free(). Remove it. Reviewed-by: Christophe Leroy Signed-off-by: Jordan Niethe --- v11: New to series --- arch/powerpc/net/bpf_jit_comp.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c index 798ac4350a82..6c8c268e4fe8 100644 --- a/arch/powerpc/net/bpf_jit_comp.c +++ b/arch/powerpc/net/bpf_jit_comp.c @@ -257,15 +257,3 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *fp) return fp; } - -/* Overriding bpf_jit_free() as we don't set images read-only. */ -void bpf_jit_free(struct bpf_prog *fp) -{ - unsigned long addr = (unsigned long)fp->bpf_func & PAGE_MASK; - struct bpf_binary_header *bpf_hdr = (void *)addr; - - if (fp->jited) - bpf_jit_binary_free(bpf_hdr); - - bpf_prog_unlock_free(fp); -} -- 2.25.1