skb->data contiguous

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

 



I need to be able to encrypt skb->data as contiguous blocks of memory. 
So,
	skb_linearize(skb...);

but, I need to be able to change any value within skb->data.  According to various comments in kernel source, only data that is 'private' can be written to (i.e. use memcpy or skb_copy).  That is, get_random_bytes(skb->data, skb->len) by itself will not change all parts of skb->data.  So, is this what I'm expected to do?:


skb_linearize(skb...);
new_skb = skb_copy(skb...);

<encrypt>

skb_push(skb->len...);
skb->data = new_skb->data;

<minus obvious errors>

This is really tacky and I want to be able to avoid the expensive skb_copy() func.


-Mazhar Memon
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux