From: Robert W. <ro...@us...> - 2003-04-30 20:58:56
|
I believe the test description states the author's intentions: DESCRIPTION * Verify that, : : * 8. create_module(2) returns -1 and sets errno to ENOMEM, if module * size parameter is too large. I can possibly see the ambiguity in the statement "too large", b/c what that is varies from one arch to another. However, I would think that the chosen value would work for all. - Robbie Robert V. Williamson <ro...@us...> Linux Test Project IBM Linux Technology Center Phone: (512) 838-9295 T/L: 678-9295 Fax: (512) 838-4603 Web: http://ltp.sourceforge.net IRC: #ltp on freenode.irc.net ==================== "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." -Albert Einstein David Engebretsen/Rochester/IBM To: Robert Williamson/Austin/IBM@IBMUS @IBMUS cc: Julie DeWandel <jd...@re...>, John Engel/Rochester/Contr/IBM@IBMUS, Sent by: ltp...@li..., ms...@re... ltp...@li...ur Subject: [LTP] Re: LTP Testcase Question - create_module02 ceforge.net 04/30/2003 03:49 PM No, that size of allocation is not really possible. My point is that the 0xffffffffffffffff value is rather arbitrary -- what is it that you are actually trying to test here? Dave Engebretsen Ph.D. Linux on PowerPC-64 Architecture and Development Dept 8DNA, Bldg 030-2, E306 (507) 253-2925, t/l 553-2925 eng...@us... Robert Williamson To: Julie DeWandel <jd...@re...> 04/30/2003 03:46 cc: David Engebretsen/Rochester/IBM@IBMUS, John Engel/Rochester/Contr/IBM@IBMUS, ms...@re..., PM ltp...@li... From: Robert Williamson/Austin/IBM@IBMUS Subject: Re: LTP Testcase Question - create_module02(Document link: David Engebretsen) Julie, We can actually get by with changing the size to 0xffffffffffffffff, which works on both 32bit and 64bit archs....this should solve your potential problem. Dave, Since this interface has become obsolete in 2.5, and already removed from the automatic run in the LTP's runalltests.sh script, I have no problem removing test #8 for ENOMEM. One more question though, is their a conceivable case where the kernel could allocate a _contiguous_ block of 16 million terabytes (~0xffffffffffffffff) of memory, and cause the test to pass? LTP users, Any problems with/thoughts about me removing (commenting out) the ENOMEM test (#8) in create_module02? - Robbie Robert V. Williamson <ro...@us...> Linux Test Project IBM Linux Technology Center Phone: (512) 838-9295 T/L: 678-9295 Fax: (512) 838-4603 Web: http://ltp.sourceforge.net IRC: #ltp on freenode.irc.net ==================== "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." -Albert Einstein Julie DeWandel <jdewand@redhat.c To: David Engebretsen/Rochester/IBM@IBMUS om> cc: Robert Williamson/Austin/IBM@IBMUS, John Engel/Rochester/Contr/IBM@IBMUS, ms...@re... Subject: Re: LTP Testcase Question - create_module02 04/30/2003 02:38 PM In our particular case, we were running a 32-bit application (the test program) on a 64-bit kernel. So we'd still have the same issue -- a 0xffffffff would be passed in as the size to the kernel. A kernel running on a machine with more than 4 GB of memory would find this (unsigned size) acceptable and may successfully allocate that amount. I don't know how to solve the problem in this case, but I just wanted to make this point. Regards, Julie David Engebretsen wrote: >Robbie, > >If you make that change, I expect that the test case would not fail as it >does today. However, it seems a bit dubious to have a test in which the >root user is telling the kernel to allocate a large quantity of memory, and >then expecting deterministic results. This seems to be testing a specific >implementation, rather than the architected interface, IMHO. The choice of >0xffffffffffffffff is rather arbitrary. > >Thanks - > >Dave Engebretsen Ph.D. >Linux on PowerPC-64 Architecture and Development >Dept 8DNA, Bldg 030-2, E306 >(507) 253-2925, t/l 553-2925 >eng...@us... > > > > > Robert Williamson > To: David Engebretsen/Rochester/IBM@IBMUS > 04/30/2003 10:37 cc: Julie DeWandel <jd...@re...>, John Engel/Rochester/Contr/IBM@IBMUS, ms...@re... > AM From: Robert Williamson/Austin/IBM@IBMUS > Subject: Re: LTP Testcase Question - create_module02(Document link: David Engebretsen) > > > > > >Dave, > > I agree that this test is not 64bit compatible. Many of the tests >written by the folks from Wipro assume 32bit architectures. I have no >problems with fixing this test or applying a suggested fix...it shouldn't >take much work. However, I'm curious as to which kernels you are seeing >this fail on. I ask this, because a bug was found in 2.4.21-pre3, with >vmalloc.c, and the fix was included in 2.4.21-pre5. The bugzilla number is >#1849....I'm sure you could forward the info to the Red Hat recipients. >I'm assuming this is 2.4 related because of the module changes that went >into 2.5 which virtually eliminated this system call. > >Let me know on what you think the best 64bit solution is, i.e.: > > #ifdef __WORDSIZE == 32 > #define MAXMODSIZE 0xffffffff > #elif defined (__WORDSIZE == 64) > #define MAXMODSIZE 0xffffffffffffffff > >Thanks, > >- Robbie > >Robert V. Williamson <ro...@us...> >Linux Test Project >IBM Linux Technology Center >Phone: (512) 838-9295 T/L: 678-9295 >Fax: (512) 838-4603 >Web: http://ltp.sourceforge.net >IRC: #ltp on freenode.irc.net >==================== >"Only two things are infinite, the universe and human stupidity, and I'm >not sure about the former." -Albert Einstein > > > > David Engebretsen > To: Robert Williamson/Austin/IBM@IBMUS > 04/29/2003 05:11 cc: ms...@re..., Julie DeWandel <jd...@re...>, John Engel/Rochester/Contr/IBM@IBMUS > PM From: David Engebretsen/Rochester/IBM@IBMUS > Subject: LTP Testcase Question - create_module02 > > > > >Robbie, > >A couple of us spent some time today looking at why test 8 in the >create_module02 test causes considerable problems on some kernel levels. >In the end, it appears to me that the test case is making some bad >assumptions, and that it really should be changed to avoid these cases. > >What we belive is happening is that it passes in 0xffffffff as a module >size, expecting this to not be a valid amount of module memory to allocate. >However on 64b systems this is a perfectly valid value for a size (albeit >rather large for a module), so the kernel goes ahead and attempts to >allocate this storage. Since root made the request, this is valid. > >Now, on a system with < 4GB, it will fail as there is not enough real >storage in the system. Presumably, on a system with >> 4GB it will succeed >(but I suppose the test case will fail as ENOMEM is not returned). On a >system with 4GB the kernel can get wound up trying to allocate this much >storage and hang the system. > >Net is that at best this test will produce non deterministic results, and >at worst it can hang as system as it is running at root priviledge. > >Thoughts? > >Dave Engebretsen Ph.D. >Linux on PowerPC-64 Architecture and Development >Dept 8DNA, Bldg 030-2, E306 >(507) 253-2925, t/l 553-2925 >eng...@us... > > > > > > > > -- Julie DeWandel <jd...@re...> Red Hat, Inc. Tel (978) 692-3113 x23251 ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Ltp-list mailing list Ltp...@li... https://lists.sourceforge.net/lists/listinfo/ltp-list |