[yocto] Apt-get is not working...
hello everyone, i was trying to build image for rpi 3 using yocto... after few attempts i have build the image...but it not had apt-get so i added IMAGE_INSTALL_append +=" apt" above line local.conf. now i apt-get is working but whenever i try to add any package it will give package not found error, so after digging a bit i found i need source.list and status file in /var/dpkg/ which were absent. i'm working on picamera using python for which i need to add picamera library in order to import its functions so i need apt-get to install that,so is there any way i can use that library without apt-get? so how to make apt-get to work? is there any repository of yocto which i can use in source.list? thanks in advance... -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Machine definition ?
Hi, You should be able to write MACHINE = "orange-pi-one" to set the machine correctly. Giordon On Wed, Aug 16, 2017 at 10:23 PM Rikowrote: > Dear Yocto Members, > > I have a question related with machine, > > If I want to use Orange Pi, how can I define my machine on local.conf ? > > Related with : > > https://github.com/linux-sunxi/meta-sunxi/tree/morty/conf/machine > > > /* > > Sent By > > Ubuntu 16.04 LTS > > Regards, > > Riko H > > */ > > -- > ___ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto > -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] Machine definition ?
Dear Yocto Members, I have a question related with machine, If I want to use Orange Pi, how can I define my machine on local.conf ? Related with : https://github.com/linux-sunxi/meta-sunxi/tree/morty/conf/machine /* Sent By Ubuntu 16.04 LTS Regards, Riko H */ -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] [ANNOUNCEMENT] Milestone 2 for Yocto Project 2.4 now available
The second milestone release for Yocto Project 2.4 is available for download now. Download: http://downloads.yoctoproject.org/releases/yocto/milestones/yocto-2.4_M2/ eclipse-poky-mars 92aa0e79e8b01c56f0670af3cd8296ec68b43350 eclipse-poky-neon 83e0083ef3a71e10039ace7d18057dddc154408b meta-qt3 f33b73a9563f2dfdfd0ee37b61d65d90197a456f meta-qt4 d52c38ad9f0a617b9ad5048a872a9e97b3af5b44 poky 9ed748a542b520c1cb763d981969233c0f5efd4e Test report: https://wiki.yoctoproject.org/wiki/WW32_-_2017-08-09_-_Full_Test_Cycle_2.4_M2_rc3 Thank you. Tracy Graydon Yocto Project Build and Release -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] [meta-oracle-java][PATCH] oracle-java: create directory before creating links
On Wed, Aug 16, 2017 at 5:54 AM, Jan Remmetwrote: > if bindir directory doesn't exists the link is created wrongly: > > file -b > tmp/work/x86_64-linux/oracle-jse-jdk-x86-64-native/1.8.0-u131r0/image/home/yocto/build/tmp/sysroots/x86_64-linux/usr/bin > symbolic link to > `/home/yocto/build/tmp/sysroots/x86_64-linux/usr/lib/jvm/java-8-oracle/bin/javac' > > tested on morty > > Signed-off-by: Jan Remmet > --- > recipes-devtools/oracle-java/oracle-jse-jdk.inc | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/recipes-devtools/oracle-java/oracle-jse-jdk.inc > b/recipes-devtools/oracle-java/oracle-jse-jdk.inc > index 935ad9bc2d9f..a5723879862b 100644 > --- a/recipes-devtools/oracle-java/oracle-jse-jdk.inc > +++ b/recipes-devtools/oracle-java/oracle-jse-jdk.inc > @@ -15,8 +15,11 @@ do_install_class-native() { > install -d -m 0755 ${D}${libdir_jvm} > cp -a ${S}/${JDK_JRE}${PV}_${PV_UPDATE} ${D}${JDK_HOME} > > + install -d -m 0755 ${D}${bindir} I think -m 0755 is redundant here > ln -sf ${JDK_HOME}/bin/java ${D}${bindir} > ln -sf ${JDK_HOME}/bin/javac${D}${bindir} > + > + install -d -m 0755 ${D}${JDK_HOME}/bin > ln -sf javah${D}${JDK_HOME}/bin/gjavah > ln -sf jar ${D}${JDK_HOME}/bin/fastjar > } > -- > 1.9.1 > > -- > ___ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] [meta-oracle-java][PATCH] oracle-java: create directory before creating links
if bindir directory doesn't exists the link is created wrongly: file -b tmp/work/x86_64-linux/oracle-jse-jdk-x86-64-native/1.8.0-u131r0/image/home/yocto/build/tmp/sysroots/x86_64-linux/usr/bin symbolic link to `/home/yocto/build/tmp/sysroots/x86_64-linux/usr/lib/jvm/java-8-oracle/bin/javac' tested on morty Signed-off-by: Jan Remmet--- recipes-devtools/oracle-java/oracle-jse-jdk.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes-devtools/oracle-java/oracle-jse-jdk.inc b/recipes-devtools/oracle-java/oracle-jse-jdk.inc index 935ad9bc2d9f..a5723879862b 100644 --- a/recipes-devtools/oracle-java/oracle-jse-jdk.inc +++ b/recipes-devtools/oracle-java/oracle-jse-jdk.inc @@ -15,8 +15,11 @@ do_install_class-native() { install -d -m 0755 ${D}${libdir_jvm} cp -a ${S}/${JDK_JRE}${PV}_${PV_UPDATE} ${D}${JDK_HOME} + install -d -m 0755 ${D}${bindir} ln -sf ${JDK_HOME}/bin/java ${D}${bindir} ln -sf ${JDK_HOME}/bin/javac${D}${bindir} + + install -d -m 0755 ${D}${JDK_HOME}/bin ln -sf javah${D}${JDK_HOME}/bin/gjavah ln -sf jar ${D}${JDK_HOME}/bin/fastjar } -- 1.9.1 -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] NotImplementedError from sanity check
On 16/08/17 15:42, Vuille, Martin (Martin) wrote: In the process of transitioning from Fido to Morty. In the past, when sanity detected a version mismatch with some of the configuration files (e.g., local.conf, bblayers.conf,) an error message was displayed. Now, we see the below, which I do not find very informative or helpful. Is that a bug or intentional? Is there a way to get back the error message? It's a bug, newer branches have a fix: http://git.yoctoproject.org/clean/cgit.cgi/poky/commit/?id=62b521722ae72bc87d599719b400dab771154fa7 http://git.openembedded.org/openembedded-core/commit/?id=a675b2c89e477af088faee9b3be96eae19a85f0b It would be nice to propose that patch as a backport to morty. Thanks, Joshua MV ERROR: Execution of event handler 'config_reparse_eventhandler' failed Traceback (most recent call last): File "/home/platform/Workspace/dspgbase/poky/meta/classes/sanity.bbclass", line 1006, in config_reparse_eventhandler(e=): python config_reparse_eventhandler() { >sanity_check_conffiles(e.data) } File "/home/platform/Workspace/dspgbase/poky/meta/classes/sanity.bbclass", line 568, in sanity_check_conffiles(d=): except NotImplementedError as e: >bb.fatal(e) d.setVar("BB_INVALIDCONF", True) File "/home/platform/Workspace/dspgbase/poky/bitbake/lib/bb/__init__.py", line 103, in fatal: def fatal(*args, **kwargs): >mainlogger.critical(''.join(args), extra=kwargs) raise BBHandledException() TypeError: sequence item 0: expected str instance, NotImplementedError found ERROR: Error parsing configuration files Traceback (most recent call last): File "/home/platform/Workspace/dspgbase/poky/bitbake/lib/bb/event.py", line 124, in fire_class_handlers(event=, d=): continue >execute_handler(name, handler, event, d) File "/home/platform/Workspace/dspgbase/poky/bitbake/lib/bb/event.py", line 96, in execute_handler(name='config_reparse_eventhandler', handler=, event=, d=): try: >ret = handler(event) except (bb.parse.SkipRecipe, bb.BBHandledException): File "/home/platform/Workspace/dspgbase/poky/meta/classes/sanity.bbclass", line 1006, in config_reparse_eventhandler(e=): python config_reparse_eventhandler() { >sanity_check_conffiles(e.data) } File "/home/platform/Workspace/dspgbase/poky/meta/classes/sanity.bbclass", line 568, in sanity_check_conffiles(d=): except NotImplementedError as e: >bb.fatal(e) d.setVar("BB_INVALIDCONF", True) File "/home/platform/Workspace/dspgbase/poky/bitbake/lib/bb/__init__.py", line 103, in fatal: def fatal(*args, **kwargs): >mainlogger.critical(''.join(args), extra=kwargs) raise BBHandledException() TypeError: sequence item 0: expected str instance, NotImplementedError found -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] NotImplementedError from sanity check
On Wed, 2017-08-16 at 14:42 +, Vuille, Martin (Martin) wrote: > In the process of transitioning from Fido to Morty. > > In the past, when sanity detected a version mismatch with some of > the configuration files (e.g., local.conf, bblayers.conf,) an error message > was displayed. > > Now, we see the below, which I do not find very informative or helpful. > > Is that a bug or intentional? Is there a way to get back the error message? > are you reusing the same build folder? if yes, try a separate folder instead. > MV > > ERROR: Execution of event handler 'config_reparse_eventhandler' failed > Traceback (most recent call last): > File "/home/platform/Workspace/dspgbase/poky/meta/classes/sanity.bbclass", > line 1006, in config_reparse_eventhandler(e= 0x7fc99cba1b00>): > python config_reparse_eventhandler() { > >sanity_check_conffiles(e.data) > } > File "/home/platform/Workspace/dspgbase/poky/meta/classes/sanity.bbclass", > line 568, in sanity_check_conffiles(d= 0x7fc99d00f198>): > except NotImplementedError as e: > >bb.fatal(e) > d.setVar("BB_INVALIDCONF", True) > File "/home/platform/Workspace/dspgbase/poky/bitbake/lib/bb/__init__.py", > line 103, in fatal: > def fatal(*args, **kwargs): > >mainlogger.critical(''.join(args), extra=kwargs) > raise BBHandledException() > TypeError: sequence item 0: expected str instance, NotImplementedError found > > ERROR: Error parsing configuration files > Traceback (most recent call last): > File "/home/platform/Workspace/dspgbase/poky/bitbake/lib/bb/event.py", line > 124, in fire_class_handlers(event= 0x7fc99cba1b00>, d=): > continue > >execute_handler(name, handler, event, d) > > File "/home/platform/Workspace/dspgbase/poky/bitbake/lib/bb/event.py", line > 96, in execute_handler(name='config_reparse_eventhandler', handler= config_reparse_eventhandler at 0x7fc99cbd4a60>, event= object at 0x7fc99cba1b00>, d= 0x7fc99d00f198>): > try: > >ret = handler(event) > except (bb.parse.SkipRecipe, bb.BBHandledException): > File "/home/platform/Workspace/dspgbase/poky/meta/classes/sanity.bbclass", > line 1006, in config_reparse_eventhandler(e= 0x7fc99cba1b00>): > python config_reparse_eventhandler() { > >sanity_check_conffiles(e.data) > } > File "/home/platform/Workspace/dspgbase/poky/meta/classes/sanity.bbclass", > line 568, in sanity_check_conffiles(d= 0x7fc99d00f198>): > except NotImplementedError as e: > >bb.fatal(e) > d.setVar("BB_INVALIDCONF", True) > File "/home/platform/Workspace/dspgbase/poky/bitbake/lib/bb/__init__.py", > line 103, in fatal: > def fatal(*args, **kwargs): > >mainlogger.critical(''.join(args), extra=kwargs) > raise BBHandledException() > TypeError: sequence item 0: expected str instance, NotImplementedError found -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] pkgname QA warnings not displayed
Transitioning from Fido to Morty Noticed that there now QA warnings for packages with incorrect names. But it seems these warnings only show up in tmp/qa.txt, they are not displayed in the build output. Is that a bug or intentional? Is there a way to make them appear in the build output? MV -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] NotImplementedError from sanity check
In the process of transitioning from Fido to Morty. In the past, when sanity detected a version mismatch with some of the configuration files (e.g., local.conf, bblayers.conf,) an error message was displayed. Now, we see the below, which I do not find very informative or helpful. Is that a bug or intentional? Is there a way to get back the error message? MV ERROR: Execution of event handler 'config_reparse_eventhandler' failed Traceback (most recent call last): File "/home/platform/Workspace/dspgbase/poky/meta/classes/sanity.bbclass", line 1006, in config_reparse_eventhandler(e=): python config_reparse_eventhandler() { >sanity_check_conffiles(e.data) } File "/home/platform/Workspace/dspgbase/poky/meta/classes/sanity.bbclass", line 568, in sanity_check_conffiles(d=): except NotImplementedError as e: >bb.fatal(e) d.setVar("BB_INVALIDCONF", True) File "/home/platform/Workspace/dspgbase/poky/bitbake/lib/bb/__init__.py", line 103, in fatal: def fatal(*args, **kwargs): >mainlogger.critical(''.join(args), extra=kwargs) raise BBHandledException() TypeError: sequence item 0: expected str instance, NotImplementedError found ERROR: Error parsing configuration files Traceback (most recent call last): File "/home/platform/Workspace/dspgbase/poky/bitbake/lib/bb/event.py", line 124, in fire_class_handlers(event=, d=): continue >execute_handler(name, handler, event, d) File "/home/platform/Workspace/dspgbase/poky/bitbake/lib/bb/event.py", line 96, in execute_handler(name='config_reparse_eventhandler', handler=, event=, d=): try: >ret = handler(event) except (bb.parse.SkipRecipe, bb.BBHandledException): File "/home/platform/Workspace/dspgbase/poky/meta/classes/sanity.bbclass", line 1006, in config_reparse_eventhandler(e=): python config_reparse_eventhandler() { >sanity_check_conffiles(e.data) } File "/home/platform/Workspace/dspgbase/poky/meta/classes/sanity.bbclass", line 568, in sanity_check_conffiles(d=): except NotImplementedError as e: >bb.fatal(e) d.setVar("BB_INVALIDCONF", True) File "/home/platform/Workspace/dspgbase/poky/bitbake/lib/bb/__init__.py", line 103, in fatal: def fatal(*args, **kwargs): >mainlogger.critical(''.join(args), extra=kwargs) raise BBHandledException() TypeError: sequence item 0: expected str instance, NotImplementedError found -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] [yocto-autobuilder][PATCH] /bin/checkvnc
Thanks, queued for merge (after tweaking the commit message some) Joshua On 15/08/17 22:53, Graydon, Tracy wrote: [Yocto #11897] The checkvnc script uses deprecated netstat command for finding vnc sessions. This breaks on Centos, and will break on other OS as it is removed in the future. Drop the dependency on netstat and instead grep /proc/net/tcp for active sessions on 5901 port. Signed-off-by: Graydon, Tracy--- bin/checkvnc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/checkvnc b/bin/checkvnc index d934dfa..11e03bb 100755 --- a/bin/checkvnc +++ b/bin/checkvnc @@ -2,7 +2,7 @@ # # check if vnc server is running, and if not, cleanup and restart # -netstat -tnl | grep :5901 > /dev/null +grep ':170D' /proc/net/tcp > /dev/null if [ $? != 0 ]; then echo "Xvnc not running, attempting restart" vncserver -kill :1 -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] rpi-basic-image-1.0-r0 do_rootfs: Function failed: do_rootfs
On 8/16/17, mohammed aqdamwrote: > oot@pcz-ee207837-2:/u/my_poky/poky/build# bitbake rpi-hwup-image > Parsing recipes: 100% > |##| > Time: 0:03:19 > Parsing of 1963 .bb files complete (0 cached, 1963 parsed). 2716 > targets, 194 skipped, 0 masked, 0 errors. > NOTE: Resolving any missing task queue dependencies > > Build Configuration: > BB_VERSION= "1.34.0" > BUILD_SYS = "x86_64-linux" > NATIVELSBSTRING = "ubuntu-14.04" > TARGET_SYS= "arm-poky-linux-gnueabi" > MACHINE = "raspberrypi3" > DISTRO= "poky" > DISTRO_VERSION= "2.3.1" > TUNE_FEATURES = "arm armv7ve vfp thumb neon vfpv4 > callconvention-hard cortexa7" > TARGET_FPU= "hard" > meta > meta-poky > meta-yocto-bsp= "pyro:4a39979c8d1e560fa54240e99734a651dfbaa63a" > meta-oe > meta-python > meta-multimedia > meta-networking = "pyro:5e82995148a2844c6f483ae5ddd1438d87ea9fb7" > meta-raspberrypi = "master:f6a2ca21c72b8d97cd0f89a0a436bf90b431698b" > > Initialising tasks: 100% > |###| > Time: 0:00:08 > NOTE: Executing SetScene Tasks > NOTE: Executing RunQueue Tasks > ERROR: rpi-hwup-image-1.0-r0 do_rootfs: Error executing a python > function in exec_python_func() autogenerated: > > The stack trace of python calls that resulted in this exception/failure > was: > File: 'exec_python_func() autogenerated', lineno: 2, function: > 0001: > *** 0002:do_rootfs(d) > 0003: > File: '/u/my_poky/poky/meta/classes/image.bbclass', lineno: 270, > function: do_rootfs > 0266: > 0267:progress_reporter.next_stage() > 0268: > 0269:# generate rootfs > *** 0270:create_rootfs(d, progress_reporter=progress_reporter, > logcatcher=logcatcher) > 0271: > 0272:progress_reporter.finish() > 0273:} > 0274:do_rootfs[dirs] = "${TOPDIR}" > File: '/u/my_poky/poky/meta/lib/oe/rootfs.py', lineno: 1005, function: > create_rootfs > 1001:RpmRootfs(d, manifest_dir, progress_reporter, > logcatcher).create() > 1002:elif img_type == "ipk": > 1003:OpkgRootfs(d, manifest_dir, progress_reporter, > logcatcher).create() > 1004:elif img_type == "deb": > *** 1005:DpkgRootfs(d, manifest_dir, progress_reporter, > logcatcher).create() > 1006: > 1007:os.environ.clear() > 1008:os.environ.update(env_bkp) > 1009: > File: '/u/my_poky/poky/meta/lib/oe/rootfs.py', lineno: 638, function: > __init__ > 0634:bb.utils.remove(self.d.getVar('MULTILIB_TEMP_ROOTFS'), > True) > 0635:self.manifest = DpkgManifest(d, manifest_dir) > 0636:self.pm = DpkgPM(d, d.getVar('IMAGE_ROOTFS'), > 0637: d.getVar('PACKAGE_ARCHS'), > *** 0638: d.getVar('DPKG_ARCH')) > 0639: > 0640: > 0641:def _create(self): > 0642:pkgs_to_install = self.manifest.parse_initial_manifest() > File: '/u/my_poky/poky/meta/lib/oe/package_manager.py', lineno: 1245, > function: __init__ > 1241:self.all_arch_list = archs.split() > 1242:all_mlb_pkg_arch_list = > (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS') or "").split() > 1243:self.all_arch_list.extend(arch for arch in > all_mlb_pkg_arch_list if arch not in self.all_arch_list) > 1244: > *** 1245:self._create_configs(archs, base_archs) > 1246: > 1247:self.indexer = DpkgIndexer(self.d, self.deploy_dir) > 1248: > 1249:""" > File: '/u/my_poky/poky/meta/lib/oe/package_manager.py', lineno: 1483, > function: _create_configs > 1479:if variant_arch not in base_arch_list: > 1480:base_arch_list.append(variant_arch) > 1481: > 1482:with open(self.apt_conf_file, "w+") as apt_conf: > *** 1483:with > open(self.d.expand("${STAGING_ETCDIR_NATIVE}/apt/apt.conf.sample")) as > apt_conf_sample: > 1484:for line in apt_conf_sample.read().split("\n"): > 1485:match_arch = re.match(" Architecture > \".*\";$", line) > 1486:architectures = "" > 1487:if match_arch: > Exception: FileNotFoundError: [Errno 2] No such file or directory: > '/u/my_poky/poky/build/tmp/work/raspberrypi3-poky-linux-gnueabi/rpi-hwup-image/1.0-r0/recipe-sysroot-native/etc/apt/apt.conf.sample' > > ERROR: rpi-hwup-image-1.0-r0 do_rootfs: Function failed: do_rootfs > ERROR: Logfile of failure stored in: > /u/my_poky/poky/build/tmp/work/raspberrypi3-poky-linux-gnueabi/rpi-hwup-image/1.0-r0/temp/log.do_rootfs.8639 > ERROR: Task > (/u/my_poky/poky/meta-raspberrypi/recipes-core/images/rpi-hwup-image.bb:do_rootfs) >
Re: [yocto] Debugging Yocto Project build failures
On Thu, Aug 10, 2017 at 1:36 PM, Never Readwrote: > Hi, > > > > I am trying to build a yocto project for a particular platform and get a > compile error after about 45 minutes or so. > > > > The error is reported as a do_compile error when trying to compile a source > file for jq-1.5-r0 (JSON stream filter as far as I know). It reports that > the file main.c could not be found. I have checked the particular directory > an can see that it is in fact present. > > > > My question is as follows. > > > > Instead of running make to try and debug the problem (which takes ages to > reach the point of error), is there a way to use do_compile to manually > compile/build this one item? > > > > I have tried running make in projects directory (where its Makefile is > located) but this does not work because perhaps it is first necessary to > setup the build environment first. > > It appears that it needs x86_64-poky-linux-gcc to do the compile and on > searching for this file there are about 8 or 9 versions/copies of this file, > none of which are on the current path. > > > > If this is the case how would I go about doing this? > You should be able to run "bitbake -c devshell" to get a development shell for that recipe with the PATH set up. See http://www.yoctoproject.org/docs/2.3.1/mega-manual/mega-manual.html#platdev-appdev-devshell. Cheers, -- Paul Barker Togán Labs Ltd -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[linux-yocto] [PATCH 4/4] nfsd: encoders mustn't use unitialized values in error cases
From: "J. Bruce Fields"commit: f961e3f2acae94b727380c0b74e2d3954d0edf79 upstream In error cases, lgp->lg_layout_type may be out of bounds; so we shouldn't be using it until after the check of nfserr. This was seen to crash nfsd threads when the server receives a LAYOUTGET request with a large layout type. GETDEVICEINFO has the same problem. Reported-by: Ari Kauppi Reviewed-by: Christoph Hellwig Cc: sta...@vger.kernel.org Signed-off-by: J. Bruce Fields Signed-off-by: Jianchuan Wang --- fs/nfsd/nfs4xdr.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 8fae53c..58b9d41 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -4112,8 +4112,7 @@ nfsd4_encode_getdeviceinfo(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_getdeviceinfo *gdev) { struct xdr_stream *xdr = >xdr; - const struct nfsd4_layout_ops *ops = - nfsd4_layout_ops[gdev->gd_layout_type]; + const struct nfsd4_layout_ops *ops; u32 starting_len = xdr->buf->len, needed_len; __be32 *p; @@ -4130,6 +4129,7 @@ nfsd4_encode_getdeviceinfo(struct nfsd4_compoundres *resp, __be32 nfserr, /* If maxcount is 0 then just update notifications */ if (gdev->gd_maxcount != 0) { + ops = nfsd4_layout_ops[gdev->gd_layout_type]; nfserr = ops->encode_getdeviceinfo(xdr, gdev); if (nfserr) { /* @@ -4182,8 +4182,7 @@ nfsd4_encode_layoutget(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_layoutget *lgp) { struct xdr_stream *xdr = >xdr; - const struct nfsd4_layout_ops *ops = - nfsd4_layout_ops[lgp->lg_layout_type]; + const struct nfsd4_layout_ops *ops; __be32 *p; dprintk("%s: err %d\n", __func__, nfserr); @@ -4206,6 +4205,7 @@ nfsd4_encode_layoutget(struct nfsd4_compoundres *resp, __be32 nfserr, *p++ = cpu_to_be32(lgp->lg_seg.iomode); *p++ = cpu_to_be32(lgp->lg_layout_type); + ops = nfsd4_layout_ops[lgp->lg_layout_type]; nfserr = ops->encode_layoutget(xdr, lgp); out: kfree(lgp->lg_content); -- 2.8.1 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 3/4] nfsd: fix undefined behavior in nfsd4_layout_verify
From: Ari Kauppicommit: b550a32e60a4941994b437a8d662432a486235a5 upstream UBSAN: Undefined behaviour in fs/nfsd/nfs4proc.c:1262:34 shift exponent 128 is too large for 32-bit type 'int' Depending on compiler+architecture, this may cause the check for layout_type to succeed for overly large values (which seems to be the case with amd64). The large value will be later used in de-referencing nfsd4_layout_ops for function pointers. Reported-by: Jani Tuovila Signed-off-by: Ari Kauppi [colin.k...@canonical.com: use LAYOUT_TYPE_MAX instead of 32] Cc: sta...@vger.kernel.org Reviewed-by: Dan Carpenter Reviewed-by: Christoph Hellwig Signed-off-by: J. Bruce Fields Signed-off-by: Jianchuan Wang --- fs/nfsd/nfs4proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 74a6e57..d76c944 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -1255,7 +1255,8 @@ nfsd4_layout_verify(struct svc_export *exp, unsigned int layout_type) return NULL; } - if (!(exp->ex_layout_types & (1 << layout_type))) { + if (layout_type >= LAYOUT_TYPE_MAX || + !(exp->ex_layout_types & (1 << layout_type))) { dprintk("%s: layout type %d not supported\n", __func__, layout_type); return NULL; -- 2.8.1 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 1/4] brcmfmac: fix possible buffer overflow in brcmf_cfg80211_mgmt_tx()
From: Arend van Sprielcommit 8f44c9a41386729fea410e688959ddaa9d51be7c upstream The lower level nl80211 code in cfg80211 ensures that "len" is between 25 and NL80211_ATTR_FRAME (2304). We subtract DOT11_MGMT_HDR_LEN (24) from "len" so thats's max of 2280. However, the action_frame->data[] buffer is only BRCMF_FIL_ACTION_FRAME_SIZE (1800) bytes long so this memcpy() can overflow. memcpy(action_frame->data, [DOT11_MGMT_HDR_LEN], le16_to_cpu(action_frame->len)); Cc: sta...@vger.kernel.org # 3.9.x Fixes: 18e2f61db3b70 ("brcmfmac: P2P action frame tx.") Reported-by: "freenerguo(郭大兴)" Signed-off-by: Arend van Spriel Signed-off-by: David S. Miller Signed-off-by: Jianchuan Wang --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 7ffc4ab..baa12e9 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -4839,6 +4839,11 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, cfg80211_mgmt_tx_status(wdev, *cookie, buf, len, true, GFP_KERNEL); } else if (ieee80211_is_action(mgmt->frame_control)) { + if (len > BRCMF_FIL_ACTION_FRAME_SIZE + DOT11_MGMT_HDR_LEN) { + brcmf_err("invalid action frame length\n"); + err = -EINVAL; + goto exit; + } af_params = kzalloc(sizeof(*af_params), GFP_KERNEL); if (af_params == NULL) { brcmf_err("unable to allocate frame\n"); -- 2.8.1 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [linux-yocto-4.10][PATCH 0/4] For CVE-2017-1000380, CVE-2017-7541 and CVE-2017-10911
Hi, Bruce, This series of patches are for CVE, including CVE-2017-1000380, CVE-2017-7541 and CVE-2017-10911. Arend van Spriel (1): brcmfmac: fix possible buffer overflow in brcmf_cfg80211_mgmt_tx() Ari Kauppi (1): nfsd: fix undefined behavior in nfsd4_layout_verify J. Bruce Fields (1): nfsd: encoders mustn't use unitialized values in error cases Jan Beulich (1): xen-blkback: don't leak stack data via response ring drivers/block/xen-blkback/blkback.c| 23 ++-- drivers/block/xen-blkback/common.h | 25 +- .../broadcom/brcm80211/brcmfmac/cfg80211.c | 5 + fs/nfsd/nfs4proc.c | 3 ++- fs/nfsd/nfs4xdr.c | 8 +++ 5 files changed, 28 insertions(+), 36 deletions(-) -- 2.8.1 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto