BPF Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH bpf-next] bpf: Drop imprecise log message
@ 2021-02-21 19:57 Dmitrii Banshchikov
  2021-02-22  9:10 ` [PATCH v1 " Dmitrii Banshchikov
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitrii Banshchikov @ 2021-02-21 19:57 UTC (permalink / raw)
  To: bpf
  Cc: Dmitrii Banshchikov, ast, daniel, andrii, kafai, songliubraving,
	yhs, john.fastabend, kpsingh, rdna

After 4ddb74165ae5 it is possible for global function to have a pointer
argument that points to something different than struct. Drop the
irrelevant log message and keep the logic same.

Fixes: 4ddb74165ae5 ("bpf: Extract nullable reg type conversion into a helper function")
Signed-off-by: Dmitrii Banshchikov <me@ubique.spb.ru>
---
 kernel/bpf/btf.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index 2efeb5f4b343..b1a76fe046cb 100644
--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -4321,8 +4321,6 @@ btf_get_prog_ctx_type(struct bpf_verifier_log *log, struct btf *btf,
 		 * is not supported yet.
 		 * BPF_PROG_TYPE_RAW_TRACEPOINT is fine.
 		 */
-		if (log->level & BPF_LOG_LEVEL)
-			bpf_log(log, "arg#%d type is not a struct\n", arg);
 		return NULL;
 	}
 	tname = btf_name_by_offset(btf, t->name_off);
-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v1 bpf-next] bpf: Drop imprecise log message
  2021-02-21 19:57 [PATCH bpf-next] bpf: Drop imprecise log message Dmitrii Banshchikov
@ 2021-02-22  9:10 ` Dmitrii Banshchikov
  2021-02-22 19:31   ` Martin KaFai Lau
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitrii Banshchikov @ 2021-02-22  9:10 UTC (permalink / raw)
  To: bpf
  Cc: Dmitrii Banshchikov, ast, daniel, andrii, kafai, songliubraving,
	yhs, john.fastabend, kpsingh, rdna

Now it is possible for global function to have a pointer argument that
points to something different than struct. Drop the irrelevant log
message and keep the logic same.

Fixes: 4ddb74165ae5 ("bpf: Extract nullable reg type conversion into a helper function")
Signed-off-by: Dmitrii Banshchikov <me@ubique.spb.ru>
---
 v0 -> v1: drop redundant commit hash mention

 kernel/bpf/btf.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index 2efeb5f4b343..b1a76fe046cb 100644
--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -4321,8 +4321,6 @@ btf_get_prog_ctx_type(struct bpf_verifier_log *log, struct btf *btf,
 		 * is not supported yet.
 		 * BPF_PROG_TYPE_RAW_TRACEPOINT is fine.
 		 */
-		if (log->level & BPF_LOG_LEVEL)
-			bpf_log(log, "arg#%d type is not a struct\n", arg);
 		return NULL;
 	}
 	tname = btf_name_by_offset(btf, t->name_off);
-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v1 bpf-next] bpf: Drop imprecise log message
  2021-02-22  9:10 ` [PATCH v1 " Dmitrii Banshchikov
@ 2021-02-22 19:31   ` Martin KaFai Lau
  2021-02-22 19:53     ` Dmitrii Banshchikov
  2021-02-23  9:04     ` [PATCH v2] " Dmitrii Banshchikov
  0 siblings, 2 replies; 7+ messages in thread
From: Martin KaFai Lau @ 2021-02-22 19:31 UTC (permalink / raw)
  To: Dmitrii Banshchikov
  Cc: bpf, ast, daniel, andrii, songliubraving, yhs, john.fastabend,
	kpsingh, rdna

On Mon, Feb 22, 2021 at 01:10:50PM +0400, Dmitrii Banshchikov wrote:
> Now it is possible for global function to have a pointer argument that
> points to something different than struct. Drop the irrelevant log
> message and keep the logic same.
Acked-by: Martin KaFai Lau <kafai@fb.com>

> Fixes: 4ddb74165ae5 ("bpf: Extract nullable reg type conversion into a helper function")
Should be this: e5069b9c23b3 ("bpf: Support pointers in global func args")?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v1 bpf-next] bpf: Drop imprecise log message
  2021-02-22 19:31   ` Martin KaFai Lau
@ 2021-02-22 19:53     ` Dmitrii Banshchikov
  2021-02-22 20:02       ` Dmitrii Banshchikov
  2021-02-23  9:04     ` [PATCH v2] " Dmitrii Banshchikov
  1 sibling, 1 reply; 7+ messages in thread
From: Dmitrii Banshchikov @ 2021-02-22 19:53 UTC (permalink / raw)
  To: Martin KaFai Lau
  Cc: bpf, ast, daniel, andrii, songliubraving, yhs, john.fastabend,
	kpsingh, rdna

On Mon, Feb 22, 2021 at 11:31:11AM -0800, Martin KaFai Lau wrote:
> On Mon, Feb 22, 2021 at 01:10:50PM +0400, Dmitrii Banshchikov wrote:
> > Now it is possible for global function to have a pointer argument that
> > points to something different than struct. Drop the irrelevant log
> > message and keep the logic same.
> Acked-by: Martin KaFai Lau <kafai@fb.com>
> 
> > Fixes: 4ddb74165ae5 ("bpf: Extract nullable reg type conversion into a helper function")
> Should be this: e5069b9c23b3 ("bpf: Support pointers in global func args")?

Yeah, sorry for it.


-- 

Dmitrii Banshchikov

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v1 bpf-next] bpf: Drop imprecise log message
  2021-02-22 19:53     ` Dmitrii Banshchikov
@ 2021-02-22 20:02       ` Dmitrii Banshchikov
  0 siblings, 0 replies; 7+ messages in thread
From: Dmitrii Banshchikov @ 2021-02-22 20:02 UTC (permalink / raw)
  To: Martin KaFai Lau
  Cc: bpf, ast, daniel, andrii, songliubraving, yhs, john.fastabend,
	kpsingh, rdna

On Mon, Feb 22, 2021 at 11:53:38PM +0400, Dmitrii Banshchikov wrote:
> On Mon, Feb 22, 2021 at 11:31:11AM -0800, Martin KaFai Lau wrote:
> > On Mon, Feb 22, 2021 at 01:10:50PM +0400, Dmitrii Banshchikov wrote:
> > > Now it is possible for global function to have a pointer argument that
> > > points to something different than struct. Drop the irrelevant log
> > > message and keep the logic same.
> > Acked-by: Martin KaFai Lau <kafai@fb.com>
> > 
> > > Fixes: 4ddb74165ae5 ("bpf: Extract nullable reg type conversion into a helper function")
> > Should be this: e5069b9c23b3 ("bpf: Support pointers in global func args")?
> 
> Yeah, sorry for it.
> 

Shall I respin it?


-- 

Dmitrii Banshchikov

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2] bpf: Drop imprecise log message
  2021-02-22 19:31   ` Martin KaFai Lau
  2021-02-22 19:53     ` Dmitrii Banshchikov
@ 2021-02-23  9:04     ` Dmitrii Banshchikov
  2021-02-24 15:50       ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 7+ messages in thread
From: Dmitrii Banshchikov @ 2021-02-23  9:04 UTC (permalink / raw)
  To: bpf
  Cc: Dmitrii Banshchikov, ast, daniel, andrii, kafai, songliubraving,
	yhs, john.fastabend, kpsingh, rdna

Now it is possible for global function to have a pointer argument that
points to something different than struct. Drop the irrelevant log
message and keep the logic same.

Fixes: e5069b9c23b3 ("bpf: Support pointers in global func args")
Signed-off-by: Dmitrii Banshchikov <me@ubique.spb.ru>
Acked-by: Martin KaFai Lau <kafai@fb.com>
---
 v1 -> v2:
  * mention correct commit by hash
  * bpf-next -> bpf

 v0 -> v1: drop redundant commit hash mention

 kernel/bpf/btf.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index 2efeb5f4b343..b1a76fe046cb 100644
--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -4321,8 +4321,6 @@ btf_get_prog_ctx_type(struct bpf_verifier_log *log, struct btf *btf,
 		 * is not supported yet.
 		 * BPF_PROG_TYPE_RAW_TRACEPOINT is fine.
 		 */
-		if (log->level & BPF_LOG_LEVEL)
-			bpf_log(log, "arg#%d type is not a struct\n", arg);
 		return NULL;
 	}
 	tname = btf_name_by_offset(btf, t->name_off);
-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] bpf: Drop imprecise log message
  2021-02-23  9:04     ` [PATCH v2] " Dmitrii Banshchikov
@ 2021-02-24 15:50       ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-02-24 15:50 UTC (permalink / raw)
  To: Dmitrii Banshchikov
  Cc: bpf, ast, daniel, andrii, kafai, songliubraving, yhs,
	john.fastabend, kpsingh, rdna

Hello:

This patch was applied to bpf/bpf.git (refs/heads/master):

On Tue, 23 Feb 2021 13:04:16 +0400 you wrote:
> Now it is possible for global function to have a pointer argument that
> points to something different than struct. Drop the irrelevant log
> message and keep the logic same.
> 
> Fixes: e5069b9c23b3 ("bpf: Support pointers in global func args")
> Signed-off-by: Dmitrii Banshchikov <me@ubique.spb.ru>
> Acked-by: Martin KaFai Lau <kafai@fb.com>
> 
> [...]

Here is the summary with links:
  - [v2] bpf: Drop imprecise log message
    https://git.kernel.org/bpf/bpf/c/f4eda8b6e4a5

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-21 19:57 [PATCH bpf-next] bpf: Drop imprecise log message Dmitrii Banshchikov
2021-02-22  9:10 ` [PATCH v1 " Dmitrii Banshchikov
2021-02-22 19:31   ` Martin KaFai Lau
2021-02-22 19:53     ` Dmitrii Banshchikov
2021-02-22 20:02       ` Dmitrii Banshchikov
2021-02-23  9:04     ` [PATCH v2] " Dmitrii Banshchikov
2021-02-24 15:50       ` patchwork-bot+netdevbpf

BPF Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/bpf/0 bpf/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 bpf bpf/ https://lore.kernel.org/bpf \
		bpf@vger.kernel.org
	public-inbox-index bpf

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.bpf


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git