[ros-dev] [ros-diffs] [gedmurphy] 70408: [NTOSKRNL] - Raise the IRQL when enumerating device lists so it doesn't get edited mid-listing - Don't hardcode the pointer size when checking the buffer size
Also in NT6+, the kernel seems to always be multiprocessor. And yes, the KeAcquire(queued)SpinLock becomes KeRaiseIrql in a SP kernel. Finally, directly using the correct function (AcquireSpinLock) would be better to know have to hack again the kernel to add support for MP afterwards. Better do it correctly now.
-----Message d'origine-----
De : Hermès BÉLUSCA - MAÏTO [mailto:hermes.belusca at sfr.fr]
Envoyé : mercredi 30 décembre 2015 11:16
À : 'ReactOS Development List'
Objet : RE: [ros-dev] [ros-diffs] [gedmurphy] 70408: [NTOSKRNL] - Raise the IRQL when enumerating device lists so it doesn't get edited mid-listing - Don't hardcode the pointer size when checking the buffer size
To answer Ged's worry, I don't think here people would get angry, since that spinlock is also used there: https://git.reactos.org/?p=reactos.git&a=search&h=HEAD&st=grep&s=LockQueueIoDatabaseLock (see iomgr/file.c and volume.c) .
-----Message d'origine-----
De : Ros-dev [mailto:ros-dev-bounces at reactos.org] De la part de Thomas Faber Envoyé : mardi 29 décembre 2015 22:07 À : ReactOS Development List Objet : Re: [ros-dev] [ros-diffs] [gedmurphy] 70408: [NTOSKRNL] - Raise the IRQL when enumerating device lists so it doesn't get edited mid-listing - Don't hardcode the pointer size when checking the buffer size
I think this might be an SP/MP difference?
Would make sense if KeAcquireSpinLock inside an SP kernel becomes KeRaiseIrql. But even for a 2003 MP kernel this would serve no purpose.
On 2015-12-29 21:48, Ged Murphy wrote:
> It depends on whether we want to emulate the 2k3 kernel or not.
>> I noticed in my 2k3 fltmgr testing that IoEnumerateDeviceObjectList
> runs at DPC for the entirety of the function. This was changed in the
> NT6 kernel to use a lock, which is indeed the LockQueueIoDatabaseLock Hermes mentioned.
>> I'm happy to use the spinlock (and would prefer to myself), but any
> move towards NT6 normally results in an angry email, so I opted for
> the 2k3 approach ;)
>> Ged.
>>> -----Original Message-----
> From: Ros-dev [mailto:ros-dev-bounces at reactos.org] On Behalf Of Hermès
> BÉLUSCA - MAÏTO
> Sent: 29 December 2015 16:08
> To: 'ReactOS Development List' <ros-dev at reactos.org>
> Subject: Re: [ros-dev] [ros-diffs] [gedmurphy] 70408: [NTOSKRNL] -
> Raise the IRQL when enumerating device lists so it doesn't get edited
> mid-listing - Don't hardcode the pointer size when checking the buffer
> size
>> Yes this should be a spinlock involved instead, for example the
> "LockQueueIoDatabaseLock" (queued) spinlock that we already use in
> other places in the code.
>> -----Message d'origine-----
> De : Ros-dev [mailto:ros-dev-bounces at reactos.org] De la part de Thomas
> Faber Envoyé : mardi 29 décembre 2015 13:20 À : ros-dev at reactos.org Objet : Re:
> [ros-dev] [ros-diffs] [gedmurphy] 70408: [NTOSKRNL] - Raise the IRQL
> when enumerating device lists so it doesn't get edited mid-listing -
> Don't hardcode the pointer size when checking the buffer size
>> Uhm... raising the IRQL is not a synchronization mechanism. Should
> there be a spinlock involved?
>>> On 2015-12-23 12:26, gedmurphy at svn.reactos.org wrote:
>> Author: gedmurphy
>> Date: Wed Dec 23 11:26:28 2015
>> New Revision: 70408
>>>> URL: http://svn.reactos.org/svn/reactos?rev=70408&view=rev
>> Log:
>> [NTOSKRNL]
>> - Raise the IRQL when enumerating device lists so it doesn't get
>> edited mid-listing
>> - Don't hardcode the pointer size when checking the buffer size
>>>> Modified:
>> trunk/reactos/ntoskrnl/io/iomgr/device.c
>>>> Modified: trunk/reactos/ntoskrnl/io/iomgr/device.c
>> URL:
>> http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/de
>> v ice.c?rev=70408&r1=70407&r2=70408&view=diff
>>> ======================================================================
> ======
> ==
>> --- trunk/reactos/ntoskrnl/io/iomgr/device.c [iso-8859-1] (original)
>> +++ trunk/reactos/ntoskrnl/io/iomgr/device.c [iso-8859-1] Wed Dec 23
> 11:26:28 2015
>> @@ -1088,6 +1088,10 @@
>> {
>> ULONG ActualDevices = 1;
>> PDEVICE_OBJECT CurrentDevice = DriverObject->DeviceObject;
>> + KIRQL OldIrql;
>> +
>> + /* Raise to dispatch level */
>> + KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
>>>> /* Find out how many devices we'll enumerate */
>> while ((CurrentDevice = CurrentDevice->NextDevice))
>> ActualDevices++; @@ -1099,13 +1103,14 @@
>> *ActualNumberDeviceObjects = ActualDevices;
>>>> /* Check if we can support so many */
>> - if ((ActualDevices * 4) > DeviceObjectListSize)
>> + if ((ActualDevices * sizeof(PDEVICE_OBJECT)) >
>> + DeviceObjectListSize)
>> {
>> /* Fail because the buffer was too small */
>> + KeLowerIrql(OldIrql);
>> return STATUS_BUFFER_TOO_SMALL;
>> }
>>>> - /* Check if the caller only wanted the size */
>> + /* Check if the caller wanted the device list */
>> if (DeviceObjectList)
>> {
>> /* Loop through all the devices */ @@ -1123,6 +1128,9 @@
>> DeviceObjectList++;
>> }
>> }
>> +
>> + /* Return back to previous IRQL */
>> + KeLowerIrql(OldIrql);
>>>> /* Return the status */
>> return STATUS_SUCCESS;
>>>>
_______________________________________________
Ros-dev mailing list
Ros-dev at reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev
More information about the Ros-dev
mailing list
CHAPTER VII. THE FOUR CLASSES OF SOCIETY. THE FOUR CLASSES OF SOCIETY. "After the herald had given the names of the wrestlers who were to make the first round, the fellows came in. They were dressed without any clothes to speak of, or rather they were quite undressed, with the exception of a cloth around their loins. They came in on opposite sides of the ring, and stood there about five feet apart, each man resting his hands on his knees, and glaring at the other like a wild beast. They[Pg 231] looked more like a pair of tigers than human beings, and for a moment I thought it was not at all unlike what a bull-fight in Spain might be. I turned upon her choking with anger, but her melting beauty rendered me helpless. Black woods were on our left. "Shall we turn in here?" I asked. "None of that with me," he growled. "Do you know who I am, Countess Lalage? I am Leon Lagage, Count of the Holy Roman Empire, and your husband. Incomparable woman, you cannot alter that fact. For better or worse, for richer or poorer, till death do us part!" I have in this way imperfectly indicated a methodical plan of generating a design, as far as words alone will serve, beginning with certain premises based upon a particular work to be performed, and then proceeding to consider in consecutive order the general character of the machine, mode of operation, movements and adjustments, general arrangement, strains, special arrangement, and proportions. ‘Alas! what is life, what is death, what are we, 11th January two best dresses. Commencement was as usual, with a few showers “All right,” agreed Sandy. “Dick, you and I are the ground crew. As soon as you’re ready, Mr. Whiteside, we’ll take hold!” Effects of Walpole's Administration—Formation of the new Ministry—Attitude of the Malcontents—Committee of Inquiry into Walpole's Administration—Walpole's Protectors—Ministerial Measures—Prorogation of Parliament—Disasters of the French—British Division in the Netherlands—Opening of Parliament—The German Mercenaries—Amendment of the Gin Act—George goes to Germany—Stair and De Noailles in Franconia—Stair in a Trap—Bold Resolution of King George—The Battle of Dettingen—Resignation of Stair—Retreat of the French—Negotiations for Peace—Treaty of Worms—Pelham becomes Prime Minister—The Attacks of Pitt on Carteret—Attempted Invasion of England—Its Failure—Progress of the French Arms—Frederick II. invades Bohemia—His Retirement—Resignation of Carteret—Pelham strengthens his Ministry—Death of the Emperor—Campaign in Flanders—Battle of Fontenoy—Campaign of Frederick II.—The Young Pretender's Preparations—Loss of the Elizabeth—Landing in the Hebrides—The Highland Clans join him—The First Brush—Raising of the Standard—Cope's Mistake—He turns aside at Dalwhinnie—Charles makes a Dash for Edinburgh—The March to Stirling—Right of the Dragoons—The "Canter of Coltbridge"—Edinburgh surprised by the Highlanders—Charles marching against Cope—Battle of Prestonpans—Delay in marching South—Discontent of the Highland Chiefs—The Start—Preparations in England—Apathy of the Aristocracy—Arrival of the Duke of Cumberland—Charles crosses the Border—Capture of Carlisle—The March to Derby—Resolution to retreat—"Black Friday"—The Retreat—Recapture of Carlisle—Siege of Stirling—Battle of Falkirk—Retreat to the Highlands—Cumberland's Pursuit—Gradual Collapse of the Highlanders—Battle of Culloden—Termination of the Rebellion—Cruelty of the Duke of Cumberland—Adventures of the Young Pretender—Trials and Executions—Ministerial Crisis. The next morning he was up betimes, and cooked the boys as good a breakfast as he could out of the remainder of his store and what he could get from the hospital, and then gave what was left to whoever came. The comfortable crib, which had cost the Deacon so much labor, had been pre-empted by the Surgeon for some of his weakest patients. "You two step forward one pace," he commanded. "Gentleman, I've got my six. The rest are yours." "Where are you goin'?" he said sternly. Every now and then the crowd would break into the latest rhymings of MacKinnon's poet: A large thicket, at this moment, gave the dusty foot an opportunity of doubling, and, for an instant, diverging from the straightforward course, though it availed him little, he seemed to feel the breath of his pursuer on the back of his neck; his foot sounded as if at his heels; he drew his garment closely around him, turned suddenly to the right, and, bounding from the ground, the next instant a splash was heard in the little river, and the fugitive was safe from his pursuer. HoME明日之后怎么免费刷一级纳米材料
ENTER NUMBET 0018candice.net.cn www.jinliqiwin.com.cn 387878.org.cn www.yjhl.net.cn www.dbjt789.com.cn www.lwtzj.com.cn www.senbank.com.cn gzgjzg.com.cn www.hd-house.com.cn www.shzhk.com.cn