Tech Support > Microsoft Windows > Drivers > regular expressions
regular expressions
Posted by H Davies on May 3rd, 2005


I have come accross a situation whereby I need to perform some regular
expressions at a driver level. Does anyone know of any implementations
I could use, or would I have to write my own from scratch?

Posted by Maxim S. Shatskih on May 3rd, 2005


FsRtlIsNameInExpression
It does the filename wildcard matching - * and ?

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

"H Davies" <heath.davies@surfcontrol.com> wrote in message
news:d96f522e.0505030224.2d8747a2@posting.google.c om...


Posted by Doron Holan [MS] on May 3rd, 2005


be very very careful about your implementation. it is a major security hole
in your driver if not implemented properly and defensively. do not assume
anything about the input expression, whether it be format, length, or the
actual buffer character values. if at all possible, move this to user mode.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"H Davies" <heath.davies@surfcontrol.com> wrote in message
news:d96f522e.0505030224.2d8747a2@posting.google.c om...


Posted by Peter Wieland [MSFT] on May 3rd, 2005


that's in a paged code segment - shouldn't be used at "driver level" (which
for now i'm assuming means an IRQL higher than PASSIVE_LEVEL)

-p

--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
news:uBgAWK9TFHA.3652@TK2MSFTNGP10.phx.gbl...


Posted by Peter Wieland [MSFT] on May 3rd, 2005


please define "driver level". do you mean at raised IRQL (dispatch level,
device level)? Or do you just mean within your driver?

-p

--
This posting is provided "AS IS" with no warranties, and confers no rights.
"H Davies" <heath.davies@surfcontrol.com> wrote in message
news:d96f522e.0505030224.2d8747a2@posting.google.c om...


Posted by Maxim S. Shatskih on May 3rd, 2005


Exactly, but possibly the OP wanted to just use regexps in the kernel mode
code. In this case, this function can be helpful.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

"Peter Wieland [MSFT]" <peterwie@online.microsoft.com> wrote in message
news:OLJw12%23TFHA.2996@TK2MSFTNGP15.phx.gbl...


Posted by Tim Roberts on May 5th, 2005


heath.davies@surfcontrol.com (H Davies) wrote:
"Careful" is the key watchword. Most regular expression matchers are
compilers: they produce a pseduo-code intermediate language, then execute
it. There are a plethora of security problems there. Plus, it is not hard
to produce a regular expression that exhibits quadratic behavior, and you
don't want to allow something like that to touch kernel mode.

I would dare to say that most heavy-duty text processing should be
relegated to user-mode.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc

Posted by heath.davies@surfcontrol.com on May 5th, 2005



Peter Wieland [MSFT] wrote:
I just mean within my driver. It is looking like this could be a bit of
a dangerous thing to do in a driver.



Similar Posts