[LU-2221] Kerberos support for kernel >= 2.6.24 is broken Created: 24/Oct/12  Updated: 17/Oct/13  Resolved: 19/Feb/13

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.3.0
Fix Version/s: Lustre 2.4.0

Type: Improvement Priority: Blocker
Reporter: Thomas Stibor Assignee: nasf (Inactive)
Resolution: Fixed Votes: 0
Labels: kerberos, patch
Environment:

Linux distributions running kernel >= 2.6.24


Issue Links:
Duplicate
is duplicated by LU-867 Fails to build with gss (lustre 2.1) Resolved
Epic: client, server
Rank (Obsolete): 5279

 Description   

Since kernel version 2.6.24 the scatterlist struct has no field "page".
The related Lustre kerberos code in gss_krb5_mech.c is not working anymore,
as for instance:

static
void buf_to_sg(struct scatterlist *sg, void *ptr, int len)
{
sg->page = virt_to_page(ptr);
sg->offset = offset_in_page(ptr);
sg->length = len;
}

access the field page in scatterlist struct.

The new struct provided in the Linux kernel >= 2.6.24 is

struct scatterlist {
#ifdef CONFIG_DEBUG_SG
unsigned long sg_magic;
#endif
unsigned long page_link;
unsigned int offset;
unsigned int length;
dma_addr_t dma_address;
unsigned int dma_length;
};

The problem can be fixed by using the scatterlist sg_set_page function, e.g:

static
void buf_to_sg(struct scatterlist *sg, void *ptr, int len)

{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) + sg_set_page(sg, virt_to_page(ptr), + len, offset_in_page(ptr)); +#else sg->page = virt_to_page(ptr); sg->offset = offset_in_page(ptr); sg->length = len; +#endif }

I will prepare a patch to fix this problem.



 Comments   
Comment by Peter Jones [ 24/Oct/12 ]

http://review.whamcloud.com/#change,4379

Comment by nasf (Inactive) [ 23/Jan/13 ]

patches have been updated:

For master:
http://review.whamcloud.com/#change,4394,set5

For b2_3:
http://review.whamcloud.com/#change,4379,set2

Comment by nasf (Inactive) [ 16/Feb/13 ]

4394 has been landed to Lustre-2.4

4379 still needs to be inspected.

Comment by nasf (Inactive) [ 17/Feb/13 ]

Thomas, would you please to verify whether the patches works on your branch or not? Thanks!

Since b2_3 is feature release, related fixes are landed to master (Lustre-2.4) already.

Comment by Thomas Stibor [ 18/Feb/13 ]

Yes, the patches are also working for b2_3.

Comment by nasf (Inactive) [ 18/Feb/13 ]

Good, then I will mark it as resolved and close it.

Generated at Sat Feb 10 01:23:23 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.