Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 685214 - net-wireless/broadcom-sta on sys-kernel/gentoo-sources-5.1.0: implicit declaration of function 'get_ds'
Summary: net-wireless/broadcom-sta on sys-kernel/gentoo-sources-5.1.0: implicit declar...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gilles Dartiguelongue (RETIRED)
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks:
 
Reported: 2019-05-06 17:50 UTC by Doppler
Modified: 2019-08-20 11:47 UTC (History)
5 users (show)

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


Attachments
broadcom-sta-6.30.223.271-r4-linux-5.1.patch (broadcom-sta-6.30.223.271-r4-linux-5.1.patch,599 bytes, patch)
2019-05-06 17:50 UTC, Doppler
Details | Diff
build.log (build.log,13.91 KB, text/x-log)
2019-05-06 17:53 UTC, Doppler
Details
Patch to replace get_ds with KERNEL DS as per https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=736706bee3298208343a76096370e4f6a5c55915 (broadcom-sta-6.30.223.271-r4-linux-5.0.13.patch,705 bytes, patch)
2019-05-12 09:42 UTC, Benjamin Southall
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Doppler 2019-05-06 17:50:43 UTC
Created attachment 575414 [details, diff]
broadcom-sta-6.30.223.271-r4-linux-5.1.patch

While attempting to compile this for the recently-released 5.1.0 release, it failed, citing a missing get_ds definition. Taking a quick look at arch/x86/include/asm/uaccess.h from 5.0.13, I put together a small patch to work around it. So far, it appears to work.
Comment 1 Doppler 2019-05-06 17:53:59 UTC
Created attachment 575416 [details]
build.log
Comment 2 matoro archtester 2019-05-07 16:55:53 UTC
(In reply to Doppler from comment #0)
> Created attachment 575414 [details, diff] [details, diff]
> broadcom-sta-6.30.223.271-r4-linux-5.1.patch
> 
> While attempting to compile this for the recently-released 5.1.0 release, it
> failed, citing a missing get_ds definition. Taking a quick look at
> arch/x86/include/asm/uaccess.h from 5.0.13, I put together a small patch to
> work around it. So far, it appears to work.

Works beautifully, thank you!
Comment 3 Benjamin Southall 2019-05-12 09:42:21 UTC
Created attachment 576146 [details, diff]
Patch to replace get_ds with KERNEL DS as per https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=736706bee3298208343a76096370e4f6a5c55915

Signed-off-by: Benjamin Southall applemansigloo@gmail.com

I also wrote a patch for this based on https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=736706bee3298208343a76096370e4f6a5c55915 , I don't know if it is cleaner or dirtier than your patch, but it works on my machine and aligns better with the action taken in the rest of the kernel.
Comment 4 Doppler 2019-05-12 11:54:19 UTC
(In reply to Benjamin Southall from comment #3)
> Created attachment 576146 [details, diff] [details, diff]
> Patch to replace get_ds with KERNEL DS as per
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/
> ?id=736706bee3298208343a76096370e4f6a5c55915
> 
> Signed-off-by: Benjamin Southall applemansigloo@gmail.com
> 
> I also wrote a patch for this based on
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/
> ?id=736706bee3298208343a76096370e4f6a5c55915 , I don't know if it is cleaner
> or dirtier than your patch, but it works on my machine and aligns better
> with the action taken in the rest of the kernel.

Using the KERNEL_DS macro instead of manually resolving it is probably better, yeah.
Comment 5 Nicholas Fish 2019-05-25 17:08:24 UTC
Another one, checking the kernel version as well.

https://github.com/antoineco/broadcom-wl/commit/c393e8aa87d286708bcb868549bcb2013391c5f7
Comment 6 Daniel Kicsak 2019-06-16 02:11:59 UTC
Had the issue today (fresh install on new PC). Resolved this by creating a local patch changing get_fs(get_ds()) to get_fs(KERNEL_DS) in src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c.

From what I can see, this is just the macro for what Doppler has proposed, and exactly what Benjamin Southall has proposed. Either one will ultimately fix the current issue.
Comment 7 Larry the Git Cow gentoo-dev 2019-08-20 11:47:52 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50d614cc8c602bbc5ced0bab0c5de1ca3a91567d

commit 50d614cc8c602bbc5ced0bab0c5de1ca3a91567d
Author:     Louis Sautier <sbraz@gentoo.org>
AuthorDate: 2019-07-21 19:16:54 +0000
Commit:     Louis Sautier <sbraz@gentoo.org>
CommitDate: 2019-08-20 11:47:03 +0000

    net-wireless/broadcom-sta: fix build for kernel 5.1, EAPI=7
    
    * Apply Ubuntu's patch for the 5.1 kernel, taken from
      http://launchpadlibrarian.net/429676743/bcmwl_6.30.223.271+bdcom-0ubuntu4_6.30.223.271+bdcom-0ubuntu5.diff.gz.
    * Bump to EAPI 7 and use an array for PATCHES, fix one patch that didn't
      apply with -p1.
    
    Closes: https://bugs.gentoo.org/685214
    Closes: https://github.com/gentoo/gentoo/pull/12500
    Package-Manager: Portage-2.3.69, Repoman-2.3.16
    Signed-off-by: Louis Sautier <sbraz@gentoo.org>

 ....ebuild => broadcom-sta-6.30.223.271-r5.ebuild} | 32 ++++++++++------------
 .../files/broadcom-sta-6.30.223.141-makefile.patch |  4 +--
 .../broadcom-sta-6.30.223.271-r5-linux-5.1.patch   | 29 ++++++++++++++++++++
 3 files changed, 46 insertions(+), 19 deletions(-)