Re: [Xen-devel] Outreachy Application
Hello, My initial contribution can be found at: http://lists.xen.org/archives/html/xen-devel/2015-10/msg02921.html On Mon, Mar 21, 2016 at 4:56 PM, Lars Kurth wrote: > Hi Lasya, (adding xen-devel@) > > On 21 Mar 2016, at 11:17, Lasya Venneti wrote: > > Hi Lars, Jesus! > > This is Lasya from India, if you recall. I had worked with Xen before the > last Outreachy round, however I could not get selected for the same as the > program rules had changed and they wanted fulltime participants. > > This time, however, I could not contribute much as I have a heavy semester > going on, but I will be completely free during the duration of May-July as > we have summer vacations, hence I will be able to do the project justice. I > have submitted an outreachy proposal for the *Xen Code Review Dashboard. *I > request you to have a look at it, and give me valuable feedback. It's > rudimentary as of now, but I assure you I can improve on it as I start > working on it. Looking forward to getting shortlisted, in case the > participants have not yet been finalized, and you don't have someone else > in mind.. > > > I will have a look. But the Outreachy program does require an initial > contribution. You may want to search > http://lists.xenproject.org/archives/html/xen-devel/2016-03/threads.html for > Outreachy > Lars > > > ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v3] dom variable error handled in Xenstore
On 29 October 2015 at 15:41, Dario Faggioli wrote: > On Thu, 2015-10-29 at 10:07 +, Wei Liu wrote: > > On Thu, Oct 29, 2015 at 12:42:18AM +0530, Lasya Venneti wrote: > > > > I must also add errno.h header to the file, I forgot to do that. I > > > shall > > > do so in the next version. > > > > > > > Other xc functions that issue hypercall (that is, you can trace the > > call chain to do_xen_hypercall) end up calling ioctl in both Linux > > and > > NetBSD, and they have the same behaviour to return -1 on error and > > set > > errno to appropriate *Xen* errno. > > > Aha, I just wrote an email very similar to this... this is a typical > example of a race condition, someone should invent spinlocks for RL !! > :-D > > > As for xc_dom_allocate, the only failure path at the moment is malloc > > failure, which would be appropriate to use ENOMEM to represent. > > > > However if it causes too many faffs, you can just set rv to -1 and > > return to caller. I think the main point is to handle the error, > > either > > -1 or ENOMEM is fine by me. > > > Agreed but, I personally prefer -1, for consistency. :-) > > So should I proceed with -1? In that case I don't need to add the header... > Regards, > Dario > -- > <> (Raistlin Majere) > - > Dario Faggioli, Ph.D, http://about.me/dario.faggioli > Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) > > ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v3] dom variable error handled in Xenstore
On 28 October 2015 at 06:30, Dario Faggioli wrote: > On Wed, 2015-10-28 at 05:42 +0530, Lasya wrote: > > xc_dom_allocate function in build function in init-xenstore-domain.c > > returns NULL on failure. > > In that case, variable rv is set to ENOMEM and directed to failure > > path err. > > > > > So, about the subject line: > - we want tags (as in "tag: does some stuff"), in order to help people >figure out quickly (and/or filter in their mail readers) what >component of Xen the patch is about. In your case, a suitable tag >would be "tools/xenstore:", or even just "xenstore:"; > - it should hint at and summarize very very briefly what is being >done. In this case, for instance, something like this: >"xenstore: check for domain allocation errors". > > Dario, I will trim down the content, and send another in. > About the actual changelog: > - wrap lines a bit more, ideally around 70 characters per line. The >point being, it should display well in things like `git log', which >typically indents it a bit; > - it should describe what the patch does, at a higher abstraction >level (e.g., why the patch is necessary, why a particular approach >has been taken, etc.). What you have up here, can pretty much all >be inferred already reading the code. So, for instance, something >like this: >"When building xenstore domain, failure at allocating the memory > for it was not handled. Fix that" > - since you are (I think) fixing an issue identified by Coverity, >you should mention the Coverity ID in the changelog somehow as well. > I shall mention the coverity ID this time , and will keep this is mind. As I didn't have knowledge about the code base, I used the variable names. I will definitely explain the bug in conceptual terms this time. > > About the code: > > > Signed-off-by: Lasya Venneti > > > diff --git a/tools/xenstore/init-xenstore-domain.c > > @@ -42,6 +42,10 @@ static int build(xc_interface *xch, int argc, > > char** argv) > > snprintf(cmdline, 512, "--event %d --internal-db", rv); > > > > dom = xc_dom_allocate(xch, cmdline, NULL); > > + if (dom == NULL) { > > + rv = ENOMEM; > > + goto err; > > + } > > > On what basis did you decide that ENOMEM was a good return value? > > I mean, have you checked what kind of value / error code is being > returned in the other cases (e.g., , xc_domain_setmaxmem(), > xc_domain_max_vcpus(), etc), if something goes wrong? > > Thanks and Regards, > Dario > Wei had advised me to raise ENOMEM (Out of memory). However, on your advice I checked the xc_domain_setmaxmem() and xc_domain_max_vcpus(). On failure: ->xc_domain_setmaxmem returns a negative value. function libxl__build_pre in xen/tools/libxl/libxl_dom.c returns ERROR_FAIL when xc_domain_setmaxmem fails. ->xc_domain_max_vcpus returns a non zero value. It returns the same error value for libxl_build_pre function as above. I must also add errno.h header to the file, I forgot to do that. I shall do so in the next version. Request your comments, should I go with ENOMEM as we are finding (I think) 'amount' of dom memory allocation, and on failure it returns NULL, or with the generic ERROR_FAIL. Regards Lasya V -- > <> (Raistlin Majere) > - > Dario Faggioli, Ph.D, http://about.me/dario.faggioli > Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) > > ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH] 'dom' error handled, by raising ENOMEM if failure occurs. 'xs_fd' leak handled in success path.
On 27 October 2015 at 16:37, George Dunlap wrote: > On 27/10/15 11:04, Lasya Venneti wrote: > > On 27 October 2015 at 16:25, Dario Faggioli > > wrote: > > > >> On Wed, 2015-10-28 at 03:49 +0530, Lasya wrote: > >> > >> The description of the patch, that you previously put in a separate > >> email, should live here. > >> > > Oh, I had thought no cover letter was needed. Hence, I didn't put in a > > description, I shall add it in v3. :) > > Please also read carefully the section titled "Making good patches" in > the Submitting Xen Project Patches wiki page [1]. > > [1] http://wiki.xenproject.org/wiki/Submitting_Xen_Project_Patches > I will definitely go through this thoroughly. Thank you for the resource. Regards Lasya V > > -George > > > > >> > >> Also, this is the second version of a patch. That should be evident > >> from the subject line (something like "[PATCH v2]"). > >> > >> And still about the subject line, it's a bit long. It must contain a > >> very quick hint at what the patch is about, then all the details go in > >> the patch description (also called changelog), i.e., right in here. :-) > >> > > The subject line was picked up from the commit message, I shall put a > > concise one this time. > > > >> > >>> Signed-off-by: Lasya Venneti > >>> --- > >>> tools/xenstore/init-xenstore-domain.c | 7 ++- > >>> 1 file changed, 6 insertions(+), 1 deletion(-) > >>> > >>> diff --git a/tools/xenstore/init-xenstore-domain.c > >>> b/tools/xenstore/init-xenstore-domain.c > >>> index 0d12169..b413b09 100644 > >>> --- a/tools/xenstore/init-xenstore-domain.c > >>> +++ b/tools/xenstore/init-xenstore-domain.c > >>> @@ -42,6 +42,10 @@ static int build(xc_interface *xch, int argc, > >>> char** argv) > >>> snprintf(cmdline, 512, "--event %d --internal-db", rv); > >>> > >>> dom = xc_dom_allocate(xch, cmdline, NULL); > >>> + if(dom==NULL) { > >>> + rv=ENOMEM; > >>> + goto err; > >>> + } > >>> > >> A lot of spaces are missing... > >> > >>> rv = xc_dom_kernel_file(dom, argv[1]); > >> ^ ^ > >> | | > >> --- > >> | > >> Just, for instance, compare what you added with this: --- > >> > >>> if (rv) goto err; > >> ^ > >> | > >> > >> | > >> And with this: --- > >> > >>> @@ -70,7 +74,8 @@ static int build(xc_interface *xch, int argc, > >>> char** argv) > >>> if (rv) goto err; > >>> rv = xc_domain_unpause(xch, domid); > >>> if (rv) goto err; > >>> - > >>> + > >>> > >> > > Dario, I wasn't look at the individual spaces, just the line breaks. Will > > be careful this time. > > > >> What happened here? > >> > >>> + close(xs_fd); > >>> return 0; > >>> > >> Also, Wei suggested to send two patches, one for fixing the error > >> handling for xc_dom_allocate(), and another one for stopping leaking > >> the fd on the success path. > >> > >> Regards, > >> Dario > >> > > Okay. I shall send them in as two patches. > > > > Thank you for being so patient with this. > > Regards > > Lasya V > > > >> -- > >> <> (Raistlin Majere) > >> - > >> Dario Faggioli, Ph.D, http://about.me/dario.faggioli > >> Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) > >> > >> > > > > ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH] 'dom' error handled, by raising ENOMEM if failure occurs. 'xs_fd' leak handled in success path.
On 27 October 2015 at 16:25, Dario Faggioli wrote: > On Wed, 2015-10-28 at 03:49 +0530, Lasya wrote: > > The description of the patch, that you previously put in a separate > email, should live here. > Oh, I had thought no cover letter was needed. Hence, I didn't put in a description, I shall add it in v3. :) > > Also, this is the second version of a patch. That should be evident > from the subject line (something like "[PATCH v2]"). > > And still about the subject line, it's a bit long. It must contain a > very quick hint at what the patch is about, then all the details go in > the patch description (also called changelog), i.e., right in here. :-) > The subject line was picked up from the commit message, I shall put a concise one this time. > > > Signed-off-by: Lasya Venneti > > --- > > tools/xenstore/init-xenstore-domain.c | 7 ++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > diff --git a/tools/xenstore/init-xenstore-domain.c > > b/tools/xenstore/init-xenstore-domain.c > > index 0d12169..b413b09 100644 > > --- a/tools/xenstore/init-xenstore-domain.c > > +++ b/tools/xenstore/init-xenstore-domain.c > > @@ -42,6 +42,10 @@ static int build(xc_interface *xch, int argc, > > char** argv) > > snprintf(cmdline, 512, "--event %d --internal-db", rv); > > > > dom = xc_dom_allocate(xch, cmdline, NULL); > > + if(dom==NULL) { > > + rv=ENOMEM; > > + goto err; > > + } > > > A lot of spaces are missing... > > > rv = xc_dom_kernel_file(dom, argv[1]); > ^ ^ > | | > --- > | > Just, for instance, compare what you added with this: --- > > > if (rv) goto err; > ^ > | > > | > And with this: --- > > > @@ -70,7 +74,8 @@ static int build(xc_interface *xch, int argc, > > char** argv) > > if (rv) goto err; > > rv = xc_domain_unpause(xch, domid); > > if (rv) goto err; > > - > > + > > > Dario, I wasn't look at the individual spaces, just the line breaks. Will be careful this time. > What happened here? > > > + close(xs_fd); > > return 0; > > > Also, Wei suggested to send two patches, one for fixing the error > handling for xc_dom_allocate(), and another one for stopping leaking > the fd on the success path. > > Regards, > Dario > Okay. I shall send them in as two patches. Thank you for being so patient with this. Regards Lasya V > -- > <> (Raistlin Majere) > - > Dario Faggioli, Ph.D, http://about.me/dario.faggioli > Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) > > ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH] Fixing coverity bug CID1311511
Thank you for pointing out the changelog errors to me, I will definitely keep those in mind and be careful next time. Thanks Lasya V On 26 October 2015 at 14:48, Lasya Venneti wrote: > Hello, > > I just wanted to submit this as one of the bugs, the one which George > assigned to me is still pending(it's a patch series), I will submit that > ASAP. As for this bug, if I have incorrectly handled it, can you please > point out my mistake, I will correct it and re-submit. > > Thanks > Lasya V > > > > On 26 October 2015 at 14:39, Dario Faggioli > wrote: > >> On Sun, 2015-10-25 at 15:32 +0530, Lasya Venneti wrote: >> > *This is part of my 'bite sized contribution' to Xen for the >> > OutreachY program. >> > >> > *The change handles the return value of the function xc_dom_allocate, >> > if the function returns NULL the function returns -1. It would not be >> > useful to jump to err as err would check !dom for NULL. >> > >> But then you're not closing xs_fd, is that ok? (I'm asking, because I >> am not at all a xenstore expert, but, FWIW, it does not feel right to >> me). >> >> > *Changes have been made in the build function in init-xenstore >> > -domain.c >> > >> > *I have taken these discussions for reference: >> > https://www.choon.net/forum/read.php?22,3805351,3805351 >> > >> > Signed-off: Lasya Venneti >> > >> Most of this (except the first bullet point, perhaps), and especially >> the Signed-off-by (it's 'Signed-off-by:', not 'Signed-off') tag goes in >> the patch changelog. >> >> In fact: >> - this looks like a cover letter for a patch series, but there is >>only one patch in this case. Usually, when there is only one patch, >>you don't need a cover letter (there are exceptions, but I don't >>think this qualifies); >> - cover letters, no matter whether for series or single patches, do >>not become part of the source tree, when the patch (series) is >>committed. That is why, information about the patch >>content/design/etc. and the tags must live in the changelog. If you >>do like this, someone looking at `git log' wouldn't see it. >> >> Regards, >> Dario >> -- >> <> (Raistlin Majere) >> - >> Dario Faggioli, Ph.D, http://about.me/dario.faggioli >> Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) >> >> > ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH] Fixing coverity bug CID1311511
Hello, I just wanted to submit this as one of the bugs, the one which George assigned to me is still pending(it's a patch series), I will submit that ASAP. As for this bug, if I have incorrectly handled it, can you please point out my mistake, I will correct it and re-submit. Thanks Lasya V On 26 October 2015 at 14:39, Dario Faggioli wrote: > On Sun, 2015-10-25 at 15:32 +0530, Lasya Venneti wrote: > > *This is part of my 'bite sized contribution' to Xen for the > > OutreachY program. > > > > *The change handles the return value of the function xc_dom_allocate, > > if the function returns NULL the function returns -1. It would not be > > useful to jump to err as err would check !dom for NULL. > > > But then you're not closing xs_fd, is that ok? (I'm asking, because I > am not at all a xenstore expert, but, FWIW, it does not feel right to > me). > > > *Changes have been made in the build function in init-xenstore > > -domain.c > > > > *I have taken these discussions for reference: > > https://www.choon.net/forum/read.php?22,3805351,3805351 > > > > Signed-off: Lasya Venneti > > > Most of this (except the first bullet point, perhaps), and especially > the Signed-off-by (it's 'Signed-off-by:', not 'Signed-off') tag goes in > the patch changelog. > > In fact: > - this looks like a cover letter for a patch series, but there is >only one patch in this case. Usually, when there is only one patch, >you don't need a cover letter (there are exceptions, but I don't >think this qualifies); > - cover letters, no matter whether for series or single patches, do >not become part of the source tree, when the patch (series) is >committed. That is why, information about the patch >content/design/etc. and the tags must live in the changelog. If you >do like this, someone looking at `git log' wouldn't see it. > > Regards, > Dario > -- > <> (Raistlin Majere) > - > Dario Faggioli, Ph.D, http://about.me/dario.faggioli > Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) > > ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
[Xen-devel] [PATCH] Handles the error returned by the xc_dom_allocate function
--- tools/xenstore/init-xenstore-domain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/xenstore/init-xenstore-domain.c b/tools/xenstore/init-xenstore-domain.c index 0d12169..d17aab5 100644 --- a/tools/xenstore/init-xenstore-domain.c +++ b/tools/xenstore/init-xenstore-domain.c @@ -42,6 +42,8 @@ static int build(xc_interface *xch, int argc, char** argv) snprintf(cmdline, 512, "--event %d --internal-db", rv); dom = xc_dom_allocate(xch, cmdline, NULL); + if(dom==NULL) + return -1; rv = xc_dom_kernel_file(dom, argv[1]); if (rv) goto err; -- 1.9.1 ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
[Xen-devel] [PATCH] Fixing coverity bug CID1311511
*This is part of my 'bite sized contribution' to Xen for the OutreachY program. *The change handles the return value of the function xc_dom_allocate, if the function returns NULL the function returns -1. It would not be useful to jump to err as err would check !dom for NULL. *Changes have been made in the build function in init-xenstore-domain.c *I have taken these discussions for reference: https://www.choon.net/forum/read.php?22,3805351,3805351 Signed-off: Lasya Venneti ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
[Xen-devel] Fwd: Work on a project: Refactor Linux hotplug scripts
Hello, I want to take up this bug CID1311511. xc_dom_allocate assigns return value to variable dom which is of type *struct xc_dom_image* dom = xc_dom_allocate(xch, cmdline, NULL); what kind of error checking is supposed to be implemented here? Kindly advise. Thanks Lasya V wh On 23 October 2015 at 19:00, Roger Pau Monné wrote: > El 23/10/15 a les 13.33, Roger Pau Monné ha escrit: > > El 23/10/15 a les 7.53, Надежда Ампилогова ha escrit: > >> Hi all, > >> > >> I am interested in the project Refactor Linux hotplug scripts for > Outreachy(Round 11). I am more of an intermediate-beginner in c. Please can > anyone provide some pointers and helper about the things I need to do to > join this project. > > > > Hello, > > > > You have to start by setting up your development system, there's a lot > > of information about how to do this on the Xen wiki: > > > > http://wiki.xenproject.org/wiki/Getting_Started > > http://wiki.xenproject.org/wiki/Compiling_Xen_From_Source > > http://wiki.xenproject.org/wiki/Xen_Serial_Console > > > > Since you have to submit a patch before formally applying for OPW, you > > will have to get used to git (if you are not yet familiar with it), we > > also have a couple of wiki pages about this: > > > > http://wiki.xenproject.org/wiki/Submitting_Xen_Project_Patches > > > > I personally use stgit in order to manage my patches: > > > > http://wiki.xenproject.org/wiki/Submitting_Xen_Patches_with_StGit > > > > Maybe during this process you will find issues or things that you think > > can be improved, if that's the case those patch(es) could be used in > > order to fulfil your application. If not, reply back and we will try to > > find a suitable small task. > > Here are some simple tasks that are suitable in order to complete your > application (if you pick one of them please say so in order to avoid > collisions with other applicants): > > http://www.gossamer-threads.com/lists/xen/devel/34#34 > > Roger. > > > ___ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel > ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
[Xen-devel] Task for OPW
Hello :-) Could you please give me a small task I can complete for Outreachy/OPW, before the deadline? Thanks Lasya V ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
[Xen-devel] Credit scheduler
Hi, Can somebody please point me to a resource that talks about scheduler design for VMs , in contrast with a standard scheduler ( I have consulted Remzi, Operating Systems for this which is pretty easy to understand conceptually ). I need to understand the working of the credit scheduler. Thanks! Sincerely, Lasya V ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] Newbie - OutreachY round 11 (Dec 7 to March 7)
Hi everyone, Thanks for your prompt reply. @Lars- I think I would like to work in a Mirage OS related project as of now. Because I'm fairly new to it, request you to give me a few small bugs to solve. Sincerely, Lasya V On 18 September 2015 at 01:44, Konrad Rzeszutek Wilk wrote: > On Thu, Sep 17, 2015 at 12:03:27PM +, Lars Kurth wrote: > > Hi all, > > > > we do have two OutreachY slots and I just received information related > > about the timeline for OutreachY yesterday. See below > > > > September 28 organizations' landing pages need to be ready with project > > ideas > > September 29 application process opens > > November 2 application deadline > > November 17 accepted applicants announced > > December 7 - March 7 internship dates > > > > > > For now, we can use the information on > > http://wiki.xenproject.org/wiki/Outreachy/Round10 and then update the > > project lists (under "Community Reviewed Project List") > > > > @Lasya, is your interest in Hypervisor work? Or higher level work such as > > Mirage OS? > > For the former starting information can be found at > > http://wiki.xenproject.org/wiki/Category:Developers - but we should also > > possibly haver some projects in areas such as Xen - OpenStack > integration, > > Xen - Libvirt integration, Raisin > > (https://blog.xenproject.org/2015/06/28/project-raisin-raise-xen/), and > > many other areas that are not reflected in the project list > > > > Depending on your interest, the existing project list or some areas you > > may be interested in, we can start updating "Community Reviewed Project > > List" > > > > @Wei, @Stefano, @Konrad and everyone else: do we have any smaller work > > items / bug fixes / etc. that need doing and would be suitable for Lasya? > > Remember, the purpose of these items, is to get familiar with set-up and > > the community processes. Maybe some stuff coverity has thrown up to start > > with and then maybe something more complex a little later. We then also > > need to find mentors and update projects. > > I've a bunch of work on http://wiki.xen.org/wiki/XSplice - from which > the non-hypervisor parts could be spun off. I can certainly stick > some of them in the proper sections. > > > > Best Regards > > Lars > > > > On 17/09/2015 12:49, "Wei Liu" wrote: > > > > >Cc Lars > > > > > >On Thu, Sep 17, 2015 at 02:33:43PM +0530, Lasya Venneti wrote: > > >> Hi everyone, > > >> > > >> I'm Lasya a student studying in IIIT-H, Hyderabad, India. > > >> > > >> I wish to participate in round 11 of Outreachy this time. I would be > > >> grateful if someone would direct me as to how I am supposed to start > > >> contributing to Xen Project for this Outreachy round. > > >> > > >> Sincerely, > > >> Lasya V > > > > > >> ___ > > >> Xen-devel mailing list > > >> Xen-devel@lists.xen.org > > >> http://lists.xen.org/xen-devel > > > > > > ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
[Xen-devel] Newbie
Hi everyone, I'm Lasya a student studying in IIIT-H, Hyderabad, India. I wish to participate in round 11 of Outreachy this time. I would be grateful if someone would direct me as to how I am supposed to start contributing to Xen Project for this Outreachy round. Sincerely, Lasya V ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel