Taken from some Scoob website:
It seems a small percentage of the MY98 cars have had problems with Piston Slap after a period of 10,000 to 20,000 miles has been covered. This manifests itself as a knocking noise which is much more pronounced when the engine is cold. This should not be confused with a ticking/tappet type noise which is common on all Impreza engines , but a distinct knocking noise which is most noticed between 1,500 and 2,000 rpm. In the UK, Subaru have been resolving the problems by fitting an a completely new short engine (block, crank, pistons) , and this cures the problem completely. Some cars are apparently much worse than others, with very lightly driven cars being just as susceptible as those driven hard! All Subaru dealers should be aware of this problem, and offer to resolve (free of charge under warranty) if the problem exists. If your dealer denies all knowledge, then go to another dealer who may be more sympathetic to your cause. The work takes between 2 to 3 days to perform, and as well as running it in again, you must get your ownership document(s) updated with the new engine number. If the problem occurs on a normally aspirated engine, then a simple piston replacement can be used, instead of a whole new block.