Hello,
Let me invite you to the monthly status meeting taking place this
Thursday, 25th of August, 19:00 UTC.
IRC service will only be started shortly before the meeting. Your
participation passwords and server address will be emailed to you
shortly before the meeting starts, and they are going to be different
once again as they are not stored in any database. Hopefully it's not
much of inconvenience.
The backup place to conduct meetings is #reactos-meeting channel on
Freenode.
Please send agenda proposals to me before the meeting so we don't waste
time trying to setup the agenda directly during the meeting.
Regards,
Aleksey Bragin
Sorry, I had forgotten this:
Le 23/08/2016 à 00:24, jgardou(a)svn.reactos.org a écrit :
> Author: jgardou
> Date: Mon Aug 22 22:24:30 2016
> New Revision: 72435
>
> URL: http://svn.reactos.org/svn/reactos?rev=72435&view=rev
> Log:
> [KDGDB]
> - Implement setting and removing breakpoints
> - Implement single-stepping
> - Only get past the breakpoint instruction when it comes from RtlpBreakWithStatus
> - Implement writing to memory
> - Always send the thread raising the exception to GDB to avoid confusing it
> - Let GDB find the program counter alone by querying the registers (support was already there before.)
> - Properly escape special characters on input
> Ladies and gentlemen : the almost-fully functional GDB stub. (still no real multi-process support :-( )
> To enable , in CMakeCache.txt :
> - Set GDB:BOOL=TRUE
> - Set _WINKD_:BOOL=TRUE
> - Set KDBG:BOOL=FALSE
> To do : give GDB the list of loaded drivers. Loading ntoskrnl.exe symbols at 0x80801000 already does a good enough job.
> Default output is on COM1. Can be configure to any othe COM port with usual kernel options.
> Hope you'll like it as much as I do ;-)
>
> Modified:
> trunk/reactos/drivers/base/kdgdb/gdb_input.c
> trunk/reactos/drivers/base/kdgdb/gdb_receive.c
> trunk/reactos/drivers/base/kdgdb/gdb_send.c
> trunk/reactos/drivers/base/kdgdb/i386_sup.c
> trunk/reactos/drivers/base/kdgdb/kdcom.c
> trunk/reactos/drivers/base/kdgdb/kdgdb.h
> trunk/reactos/drivers/base/kdgdb/kdpacket.c
>
> Modified: trunk/reactos/drivers/base/kdgdb/gdb_input.c
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kdgdb/gdb_inp…
> ==============================================================================
> --- trunk/reactos/drivers/base/kdgdb/gdb_input.c [iso-8859-1] (original)
> +++ trunk/reactos/drivers/base/kdgdb/gdb_input.c [iso-8859-1] Mon Aug 22 22:24:30 2016
> @@ -9,6 +9,11 @@
>
> /* LOCALS *********************************************************************/
> static ULONG_PTR gdb_run_tid;
> +static struct
> +{
> + ULONG_PTR Address;
> + ULONG Handle;
> +} BreakPointHandles[32];
>
>
> /* GLOBALS ********************************************************************/
> @@ -203,16 +208,15 @@
>
> if (!Resuming)
> {
> + /* Report the idle thread */
> +#if MONOPROCESS
> + ptr += sprintf(ptr, "1");
> +#else
> + ptr += sprintf(gdb, "p1.1");
> +#endif
That looks highly suspicious?
Shouldn't it be ptr += sprintf(ptr, "p1.1");
--
Pierre Schweitzer <pierre at reactos.org>
System & Network Administrator
Senior Kernel Developer
ReactOS Deutschland e.V.
Hello,
Let me invite you to the monthly status meeting taking place this
Thursday, 28th of June, 19:00 UTC.
IRC service will only be started shortly before the meeting. Your
participation passwords and server address will be emailed to you
shortly before the meeting starts, and they are going to be different
once again as they are not stored in any database. Hopefully it's not
much of inconvenience.
The backup place to conduct meetings is #reactos-meeting channel on
Freenode.
Please send agenda proposals to me before the meeting so we don't waste
time trying to setup the agenda directly during the meeting.
Regards,
Aleksey Bragin
Comment inline
Le 15/07/2016 à 17:27, tthompson(a)svn.reactos.org a écrit :
> Author: tthompson
> Date: Fri Jul 15 15:27:04 2016
> New Revision: 71945
>
> URL: http://svn.reactos.org/svn/reactos?rev=71945&view=rev
> Log:
> [NTFS]
> *AddRun() - Don't leak RunBuffer when encountering errors.
> Handle exception from FsRtlAddLargeMcbEntry().
>
> Modified:
> branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c
>
> Modified: branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c
> URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2016/NTFS/drivers/filesyst…
> ==============================================================================
> --- branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c [iso-8859-1] (original)
> +++ branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c [iso-8859-1] Fri Jul 15 15:27:04 2016
> @@ -88,25 +88,40 @@
> ULONGLONG NextVBN = AttrContext->Record.NonResident.LowestVCN;
>
> // Allocate some memory for the RunBuffer
> - PUCHAR RunBuffer = ExAllocatePoolWithTag(NonPagedPool, Vcb->NtfsInfo.BytesPerFileRecord, TAG_NTFS);
> + PUCHAR RunBuffer;
> int RunBufferOffset = 0;
>
> if (!AttrContext->Record.IsNonResident)
> return STATUS_INVALID_PARAMETER;
> +
> + RunBuffer = ExAllocatePoolWithTag(NonPagedPool, Vcb->NtfsInfo.BytesPerFileRecord, TAG_NTFS);
>
> // Convert the data runs to a map control block
> Status = ConvertDataRunsToLargeMCB(DataRun, &DataRunsMCB, &NextVBN);
> if (!NT_SUCCESS(Status))
> {
> DPRINT1("Unable to convert data runs to MCB (probably ran out of memory)!\n");
> + ExFreePoolWithTag(RunBuffer, TAG_NTFS);
> return Status;
> }
>
> // Add newly-assigned clusters to mcb
> - FsRtlAddLargeMcbEntry(&DataRunsMCB,
> - NextVBN,
> - NextAssignedCluster,
> - RunLength);
> + _SEH2_TRY{
> + if (!FsRtlAddLargeMcbEntry(&DataRunsMCB,
> + NextVBN,
> + NextAssignedCluster,
> + RunLength))
> + {
> + FsRtlUninitializeLargeMcb(&DataRunsMCB);
> + ExFreePoolWithTag(RunBuffer, TAG_NTFS);
> + return STATUS_INSUFFICIENT_RESOURCES;
> + }
> + } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) {
> + FsRtlUninitializeLargeMcb(&DataRunsMCB);
> + ExFreePoolWithTag(RunBuffer, TAG_NTFS);
> + _SEH2_YIELD(return STATUS_INSUFFICIENT_RESOURCES);
> + } _SEH2_END;
Purely cosmetic one here. You should, in your try block, call
ExRaiseStatus with the appropriate status and do the cleanup in the
exception handler. That avoids code duplication.
This also implies you don't want to force the status code, but rather
use _SEH2_GetExceptionCode().
Also note that FsRtlAddLargeMcbEntry may fail for various reasons. I
don't really know which status code to use as you have no way to know
why it failed.
--
Pierre Schweitzer <pierre at reactos.org>
System & Network Administrator
Senior Kernel Developer
ReactOS Deutschland e.V.
Comment inline.
Le 19/07/2016 à 17:31, tthompson(a)svn.reactos.org a écrit :
> Author: tthompson
> Date: Tue Jul 19 15:31:22 2016
> New Revision: 71968
>
> URL: http://svn.reactos.org/svn/reactos?rev=71968&view=rev
> Log:
> [NTFS]
> +FreeClusters(). Fix a DPRINT.
>
> Modified:
> branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c
> branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c
> branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/ntfs.h
>
> Modified: branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c
> URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2016/NTFS/drivers/filesyst…
> ==============================================================================
> --- branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c [iso-8859-1] (original)
> +++ branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c [iso-8859-1] Tue Jul 19 15:31:22 2016
> @@ -409,6 +409,208 @@
> return TRUE;
> }
>
> +/**
> +* @name FreeClusters
> +* @implemented
> +*
> +* Shrinks the allocation size of a non-resident attribute by a given number of clusters.
> +* Frees the clusters from the volume's $BITMAP file as well as the attribute's data runs.
> +*
> +* @param Vcb
> +* Pointer to an NTFS_VCB for the destination volume.
> +*
> +* @param AttrContext
> +* Pointer to an NTFS_ATTR_CONTEXT describing the attribute from which the clusters will be freed.
> +*
> +* @param AttrOffset
> +* Byte offset of the destination attribute relative to its file record.
> +*
> +* @param FileRecord
> +* Pointer to a complete copy of the file record containing the attribute. Must be at least
> +* Vcb->NtfsInfo.BytesPerFileRecord bytes long.
> +*
> +* @param ClustersToFree
> +* Number of clusters that should be freed from the end of the data stream. Must be no more
> +* Than the number of clusters assigned to the attribute (HighestVCN + 1).
> +*
> +* @return
> +* STATUS_SUCCESS on success. STATUS_INVALID_PARAMETER if AttrContext describes a resident attribute,
> +* or if the caller requested more clusters be freed than the attribute has been allocated.
> +* STATUS_INSUFFICIENT_RESOURCES if ConvertDataRunsToLargeMCB() fails.
> +* STATUS_BUFFER_TOO_SMALL if ConvertLargeMCBToDataRuns() fails.
> +*
> +*
> +*/
> +NTSTATUS
> +FreeClusters(PNTFS_VCB Vcb,
> + PNTFS_ATTR_CONTEXT AttrContext,
> + ULONG AttrOffset,
> + PFILE_RECORD_HEADER FileRecord,
> + ULONG ClustersToFree)
> +{
> + NTSTATUS Status = STATUS_SUCCESS;
> + ULONG ClustersLeftToFree = ClustersToFree;
> +
> + // convert data runs to mcb
> + PUCHAR DataRun = (PUCHAR)&AttrContext->Record + AttrContext->Record.NonResident.MappingPairsOffset;
> + PNTFS_ATTR_RECORD DestinationAttribute = (PNTFS_ATTR_RECORD)((ULONG_PTR)FileRecord + AttrOffset);
> + LARGE_MCB DataRunsMCB;
> + ULONG NextAttributeOffset = AttrOffset + AttrContext->Record.Length;
> + PNTFS_ATTR_RECORD NextAttribute = (PNTFS_ATTR_RECORD)((ULONG_PTR)FileRecord + NextAttributeOffset);
> + ULONGLONG NextVBN = AttrContext->Record.NonResident.LowestVCN;
> +
> + // Allocate some memory for the RunBuffer
> + PUCHAR RunBuffer = ExAllocatePoolWithTag(NonPagedPool, Vcb->NtfsInfo.BytesPerFileRecord, TAG_NTFS);
> + ULONG RunBufferOffset = 0;
Two notes regarding this allocation:
- You should check allocation worked (obviously ;-));
- You should start memory work only after checking the record is not
resident.
--
Pierre Schweitzer <pierre at reactos.org>
System & Network Administrator
Senior Kernel Developer
ReactOS Deutschland e.V.
On 2016-07-08 19:52, zhu(a)svn.reactos.org wrote:
> --- branches/GSoC_2016/lwIP-tcpip/drivers/network/tcpip/address.c [iso-8859-1] (original)
> +++ branches/GSoC_2016/lwIP-tcpip/drivers/network/tcpip/address.c [iso-8859-1] Fri Jul 8 17:52:42 2016
> @@ -33,6 +33,8 @@
> static LIST_ENTRY AddressListHead;
>
> /* implementation in testing */
> +/* Must already hold the Context->RequestListLock */
> +/* Context should be in ->FileObject->FsContext */
You know there is a way to actually tell that to MSVC's static
analyzer, right? ;)
You want something like
_IRQL_requires_(DISPATCH_LEVEL)
_IRQL_requires_same_
_Requires_lock_held_(((PTCP_CONTEXT)IrpSp->FileObject->FsContext)->RequestListLock)
The last one might be a little too complicated to actually include, but
the IRQL ones are easy to help indicate things like this.
> NTSTATUS
> PrepareIrpForCancel(
> PIRP Irp,