Patch "bpf: Clarify error expectations from bpf_clone_redirect" has been added to the 6.5-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    bpf: Clarify error expectations from bpf_clone_redirect

to the 6.5-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     bpf-clarify-error-expectations-from-bpf_clone_redire.patch
and it can be found in the queue-6.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9e9f5aa37827ba0396ff2bff95ee6d8ef013186b
Author: Stanislav Fomichev <sdf@xxxxxxxxxx>
Date:   Mon Sep 11 12:47:30 2023 -0700

    bpf: Clarify error expectations from bpf_clone_redirect
    
    [ Upstream commit 7cb779a6867fea00b4209bcf6de2f178a743247d ]
    
    Commit 151e887d8ff9 ("veth: Fixing transmit return status for dropped
    packets") exposed the fact that bpf_clone_redirect is capable of
    returning raw NET_XMIT_XXX return codes.
    
    This is in the conflict with its UAPI doc which says the following:
    "0 on success, or a negative error in case of failure."
    
    Update the UAPI to reflect the fact that bpf_clone_redirect can
    return positive error numbers, but don't explicitly define
    their meaning.
    
    Reported-by: Daniel Borkmann <daniel@xxxxxxxxxxxxx>
    Signed-off-by: Stanislav Fomichev <sdf@xxxxxxxxxx>
    Signed-off-by: Daniel Borkmann <daniel@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/bpf/20230911194731.286342-1-sdf@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 60a9d59beeabb..25f668165b567 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -1897,7 +1897,9 @@ union bpf_attr {
  * 		performed again, if the helper is used in combination with
  * 		direct packet access.
  * 	Return
- * 		0 on success, or a negative error in case of failure.
+ * 		0 on success, or a negative error in case of failure. Positive
+ * 		error indicates a potential drop or congestion in the target
+ * 		device. The particular positive error codes are not defined.
  *
  * u64 bpf_get_current_pid_tgid(void)
  * 	Description
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 60a9d59beeabb..25f668165b567 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -1897,7 +1897,9 @@ union bpf_attr {
  * 		performed again, if the helper is used in combination with
  * 		direct packet access.
  * 	Return
- * 		0 on success, or a negative error in case of failure.
+ * 		0 on success, or a negative error in case of failure. Positive
+ * 		error indicates a potential drop or congestion in the target
+ * 		device. The particular positive error codes are not defined.
  *
  * u64 bpf_get_current_pid_tgid(void)
  * 	Description



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux