Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 458426 - =sys-kernel/gentoo-sources-3.8.0 fails to compile: invalid operands to binary == (have ‘kuid_t’ and ‘kuid_t’)
Summary: =sys-kernel/gentoo-sources-3.8.0 fails to compile: invalid operands to binary...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
: 458442 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-20 09:58 UTC by Nick Novikov
Modified: 2013-03-02 20:59 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
kernel config (.config,78.95 KB, text/plain)
2013-02-20 09:59 UTC, Nick Novikov
Details
modified kcopy patch (2400_kcopy-patch-for-infiniband-driver.patch,15.76 KB, patch)
2013-02-22 16:51 UTC, Yvan Royon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Novikov 2013-02-20 09:58:09 UTC
drivers/char/kcopy/kcopy.c: In function ‘kcopy_validate_task’:
drivers/char/kcopy/kcopy.c:257:31: error: invalid operands to binary == (have ‘kuid_t’ and ‘kuid_t’)
drivers/char/kcopy/kcopy.c:257:67: error: invalid operands to binary == (have ‘kuid_t’ and ‘kuid_t’)


Reproducible: Always




Looks like CONFIG_UIDGID_STRICT_TYPE_CHECKS makes 'kuid_t' a struct, not uid_t
Comment 1 Nick Novikov 2013-02-20 09:59:12 UTC
Created attachment 339486 [details]
kernel config
Comment 2 Markos Chandras (RETIRED) gentoo-dev 2013-02-20 11:25:11 UTC
*** Bug 458442 has been marked as a duplicate of this bug. ***
Comment 3 Yvan Royon 2013-02-22 16:49:30 UTC
To trigger this bug, you need:

1) KCopy enabled, under Device Drivers -> Character Devices.
This comes from the Gentoo patchset: 2400_kcopy-patch-for-infiniband-driver.patch

2) The User Namespace stuff (USER_NS under General Setup -> Namespaces support).

I suggest modifying the function kcopy_validate_task in the aforementioned Gentoo patch:

static int kcopy_validate_task(struct task_struct *p)
{
    return p && (uid_eq(current_euid(), task_euid(p)) || uid_eq(current_euid(), task_uid(p)));
}

instead of:

static int kcopy_validate_task(struct task_struct *p)
{
    return p && ((current_euid() == task_euid(p)) || (current_euid() == task_uid(p)));
}
Comment 4 Yvan Royon 2013-02-22 16:51:53 UTC
Created attachment 339724 [details, diff]
modified kcopy patch

The Gentoo kcopy patch with modified function kcopy_validate_task.

Please test, I didn't...
Comment 5 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-03-02 20:59:32 UTC
*gentoo-sources-3.8.1 (01 Mar 2013)
*gentoo-sources-3.7.10 (01 Mar 2013)

  01 Mar 2013; Tom Wijsman <TomWij@gentoo.org> +gentoo-sources-3.7.10.ebuild,
  +gentoo-sources-3.8.1.ebuild:
  Linux patches 3.7.10 and 3.8.1. Updated fbcondecor-0.9.6 to properly work with
  the 3.7 and 3.8 kernel branches according to bug #459060 thanks to Robert
  Cabrera. Modified kcopy patch according to bug #458426 thanks to Yvan Royon,
  since that was focused on 3.7 I have made that apply cleanly in 3.8 as well.